Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Hello Piotr Kliczewski, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/47040 to review the following change. Change subject: tests: Wait for udev events after unmounting .. tests: Wait for udev events after unmounting Even after fixing unmounting of loop mounts using the freeLoop parameter, we still have random mount failures like: File "/home/.../vdsm/storage/mount.py", line 241, in _runcmd raise MountError(rc, ";".join((out, err))) MountError: (32, ';mount: /tmp/vdsm-mkimage-tests.03sjxb/images/vmId_floppy...img: failed to setup loop device: No such file or directory\n') It seems that loop device detach is asynchronous, thanks to good old udev. Waiting until things settle down can avoid this issue. Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Bug-Url: https://bugzilla.redhat.com/1267851 Signed-off-by: Nir Soffer Signed-off-by: pkliczewski Reviewed-on: https://gerrit.ovirt.org/46702 Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani Reviewed-by: Dan Kenigsberg --- M tests/mkimageTests.py 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/47040/1 diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py index 027516c..0c1d88c 100644 --- a/tests/mkimageTests.py +++ b/tests/mkimageTests.py @@ -35,7 +35,7 @@ from testrunner import VdsmTestCase, permutations, expandPermutations from testValidation import checkSudo, ValidateRunningAsRoot -from vdsm.utils import execCmd +from vdsm.utils import execCmd, stopwatch import storage import mkimage @@ -174,7 +174,9 @@ self._check_label(floppy, label) finally: m.umount(force=True, freeloop=True) -os.unlink(floppy) +# TODO: Use libudev to wait for specific event +with stopwatch("Wait for udev events"): +storage.udevadm.settle(5) @permutations([[None], ['fslabel']]) def test_mkIsoFs(self, label): @@ -204,7 +206,9 @@ (stat.S_IXOTH, False))) finally: m.umount(force=True, freeloop=True) -os.unlink(iso_img) +# TODO: Use libudev to wait for specific event +with stopwatch("Wait for udev events"): +storage.udevadm.settle(5) def test_removeFs(self): """ -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Piotr Kliczewski ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
automat...@ovirt.org has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 1: * Update tracker::#1267851::OK * Check Bug-Url::OK * Check Public Bug::#1267851::OK, public bug * Check Product::#1267851::OK, Correct classification oVirt * Check TR::#1267851::ERROR, wrong target release for stable branch, --- should match ^3.[54321].* * warn_if_not_merged_to_previous_branch: OK -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Francesco Romani has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 1: Verified+1 verified running the tests. It helps, maybe not sufficient to fully fix the failures in mocked el6. On real el6 seems to work fine. -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Nir Soffer has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 1: Code-Review-1 (2 comments) https://gerrit.ovirt.org/#/c/47040/1/tests/mkimageTests.py File tests/mkimageTests.py: Line 173 Line 174 Line 175 Line 176 Line 177 Not related, you should cherry-pick the patch that removed this. Line 203 Line 204 Line 205 Line 206 Line 207 Same -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
automat...@ovirt.org has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 2: * Update tracker::#1267851::OK * Check Bug-Url::OK * Check Public Bug::#1267851::OK, public bug * Check Product::#1267851::OK, Correct classification oVirt * Check TR::#1267851::ERROR, wrong target release for stable branch, --- should match ^3.[54321].* * warn_if_not_merged_to_previous_branch: OK -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Piotr Kliczewski has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Nir Soffer has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
automat...@ovirt.org has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 3: * Update tracker::#1267851::OK * Check Bug-Url::OK * Check Public Bug::#1267851::OK, public bug * Check Product::#1267851::OK, Correct classification oVirt * Check TM::#1267851::ERROR, wrong target milestone for stable branch, should match ^.*3.5.* * Check merged to previous::OK, change not open on any previous branch -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Francesco Romani has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 3: Continuous-Integration+1 Verified+1 CI scripts run manually verified running the test itself -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Francesco Romani has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
Francesco Romani has submitted this change and it was merged. Change subject: tests: Wait for udev events after unmounting .. tests: Wait for udev events after unmounting Even after fixing unmounting of loop mounts using the freeLoop parameter, we still have random mount failures like: File "/home/.../vdsm/storage/mount.py", line 241, in _runcmd raise MountError(rc, ";".join((out, err))) MountError: (32, ';mount: /tmp/vdsm-mkimage-tests.03sjxb/images/vmId_floppy...img: failed to setup loop device: No such file or directory\n') It seems that loop device detach is asynchronous, thanks to good old udev. Waiting until things settle down can avoid this issue. Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Bug-Url: https://bugzilla.redhat.com/1267851 Signed-off-by: Nir Soffer Signed-off-by: pkliczewski Reviewed-on: https://gerrit.ovirt.org/46702 Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani Reviewed-by: Dan Kenigsberg Reviewed-on: https://gerrit.ovirt.org/47040 Continuous-Integration: Francesco Romani Tested-by: Francesco Romani --- M tests/mkimageTests.py 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Nir Soffer: Looks good to me, but someone else must approve Francesco Romani: Verified; Looks good to me, approved; Passed CI tests -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.5]: tests: Wait for udev events after unmounting
automat...@ovirt.org has posted comments on this change. Change subject: tests: Wait for udev events after unmounting .. Patch Set 4: * Update tracker::#1267851::OK * Set MODIFIED::bug 1267851#1267851IGNORE, not oVirt prod but vdsm -- To view, visit https://gerrit.ovirt.org/47040 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bd2737dae37f944cb314077a77b29c27db44677 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches