Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

machines: Robustify testAddDisk #9952

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Aug 31, 2018

selectFromDropDown does not distinguish between options that one is substring
of the other thus choice can be random.

This commit is also part of #9240

I sent it also separately from the libvirt-dbus PR so that it's visible that testAddDisk failure it's not related to the aforementioned PR but this commit just uncovers the actual existing issue.

@KKoukiou
Copy link
Contributor Author

testAddDisk failing with:

error: internal error: unable to execute QEMU command 'device_add': Failed to get "write" lock

is because of issue #9945 and not related to this change.

@martinpitt
Copy link
Member

There's something wrong here. It's now by and large impossible to get this test to green. Either it fails due to the "write lock" (#9945) or it fails like here where apparently the same disk is added twice?

@KKoukiou KKoukiou mentioned this pull request Sep 3, 2018
8 tasks
@martinpitt
Copy link
Member

On my system (otherwise quiet) I can perfectly well and easily reproduce the Failed to get "write" lock failure, on fedora-28. It failed in 3 out of 3 cases.

@martinpitt
Copy link
Member

Some debugging notes:

  • I (locally, not pushed yet) added the same _temporary suffix to mydiskofpoolone, for the same reason. This makes no difference.
  • I added a sit() right before the adding of mydiskofpooltwo_temporary to the VM (i. e. before the block that fails). Waiting for several minutes makes no difference, so this is not a race condition in that block.
  • The file is not busy. The UI, virsh dumpxml, and # fuser /mnt/*/*all agree that the three other disks are busy (by the running qemu), but mydiskofpooltwo_temporary is not.
  • The three files which are being used are owned by qemu:qemu (0600 perms), while mydiskofpooltwo_temporary is owned by root:root (0600 perms). This might explain the "write lock" error, as qemu is running as user qemu and cannot write that file. However, chowning it to qemu:qemu makes no difference, and after the failing test something changes mydiskofpooltwo_permanent to root:root. But I think the permissions are a red herring.

This really looks like libvirt gets confused. The debian-stable failure shows this - even though the test adds mydiskofpooltwo_temporary, the screenshot shows that it really seems to be mydiskofpooltwo_permanent again:

screenshot

As a result, I disable this fourth test case for now. This is tracked in #9945.

selectFromDropDown does not distinguish between options that one is substring
of the other thus choice can be random.

Disable the fourth test case for `mydiskofpooltwo_temporary` for now.
This causes either "unable to execute QEMU command 'device_add': Failed
to get "write" lock" or adding the _temporary volume results in showing
that the _permanent one actually gets added.

This works around issue cockpit-project#9945 for now.

Closes cockpit-project#9952
@martinpitt martinpitt merged commit bcc738b into cockpit-project:master Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants