Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 8: * Update tracker: IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Dan Kenigsberg has submitted this change and it was merged. Change subject: mount: Wait for systemd temporary mount unit .. mount: Wait for systemd temporary mount unit Systemd is monitoring mountpoints created during runtime by creating a temporary mount units. For example: # systemctl status /tmp/mount-1.DUNxySxI2R/wrk ● tmp-mount\x2d1.DUNxySxI2R-wrk.mount - /tmp/mount-1.DUNxySxI2R/wrk Loaded: loaded (/proc/self/mountinfo) Active: active (mounted) since Sun 2016-04-24 22:37:55 IDT; 14ms ago Where: /tmp/mount-1.DUNxySxI2R/wrk What: /dev/loop2 Mounting and unmounting quickly as we do in the tests, or when creating a floppy image may confuse systemd, and lead to various errors: - mountpoint is not mounted when trying to access files or unmount - mountpoint is busy when trying to unmount These are probably systemd or mount bugs. Until these issues are resolve, we need to find a workaround to avoid failures in the tests or when creating a floppy images. This patch add udevadm.settle() call after successful mount and umount operations. Change-Id: I9b0318eb534f781f127882983527e1a221820478 Signed-off-by: Nir SofferReviewed-on: https://gerrit.ovirt.org/56544 Reviewed-by: Dan Kenigsberg Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani --- M lib/vdsm/storage/mount.py M tests/mkimageTests.py M tests/mountTests.py 3 files changed, 18 insertions(+), 16 deletions(-) Approvals: Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Francesco Romani has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: (1 comment) https://gerrit.ovirt.org/#/c/56544/6/lib/vdsm/storage/mount.py File lib/vdsm/storage/mount.py: Line 208: Line 209: TODO: find a way to wait for the specific event. Line 210: """ Line 211: with utils.stopwatch("Waiting for udev mount events", log=self.log): Line 212: timeout = config.getint('irs', 'scsi_settle_timeout') > Correct, I'll rename the option in the next patch. Handled in https://gerrit.ovirt.org/64064 Line 213: udevadm.settle(timeout) Line 214: Line 215: def isMounted(self): Line 216: try: -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: (1 comment) https://gerrit.ovirt.org/#/c/56544/6/lib/vdsm/storage/mount.py File lib/vdsm/storage/mount.py: Line 208: Line 209: TODO: find a way to wait for the specific event. Line 210: """ Line 211: with utils.stopwatch("Waiting for udev mount events", log=self.log): Line 212: timeout = config.getint('irs', 'scsi_settle_timeout') > mount is unrelated to scsi! but so be it. Correct, I'll rename the option in the next patch. Line 213: udevadm.settle(timeout) Line 214: Line 215: def isMounted(self): Line 216: try: -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Dan Kenigsberg has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: Code-Review+2 (1 comment) https://gerrit.ovirt.org/#/c/56544/6/lib/vdsm/storage/mount.py File lib/vdsm/storage/mount.py: Line 208: Line 209: TODO: find a way to wait for the specific event. Line 210: """ Line 211: with utils.stopwatch("Waiting for udev mount events", log=self.log): Line 212: timeout = config.getint('irs', 'scsi_settle_timeout') mount is unrelated to scsi! but so be it. Line 213: udevadm.settle(timeout) Line 214: Line 215: def isMounted(self): Line 216: try: -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: Here example mount tests from next patch: 23:47:09 mountTests.MountTests 23:47:09 testLoopMount('000')OK 23:47:09 testLoopMount('001')OK 23:47:09 testLoopMount('002')OK 23:47:09 testLoopMount('003')OK 23:47:09 testLoopMount('004')OK 23:47:10 testLoopMount('005')OK 23:47:10 testLoopMount('006')OK 23:47:10 testLoopMount('007')OK 23:47:10 testLoopMount('008')OK 23:47:10 testLoopMount('009')OK 23:47:10 testLoopMount('010')OK 23:47:11 testLoopMount('011')OK 23:47:11 testLoopMount('012')OK 23:47:11 testLoopMount('013')OK 23:47:11 testLoopMount('014')OK 23:47:11 testLoopMount('015')OK 23:47:12 testLoopMount('016')OK 23:47:12 testLoopMount('017')OK 23:47:12 testLoopMount('018')OK 23:47:12 testLoopMount('019')OK 23:47:12 testLoopMount('020')OK 23:47:12 testLoopMount('021')OK 23:47:13 testLoopMount('022')OK 23:47:13 testLoopMount('023')OK 23:47:13 testLoopMount('024')OK 23:47:13 testLoopMount('025')OK 23:47:13 testLoopMount('026')OK 23:47:13 testLoopMount('027')OK 23:47:14 testLoopMount('028')OK 23:47:14 testLoopMount('029')OK 23:47:14 testLoopMount('030')OK 23:47:14 testLoopMount('031')OK 23:47:14 testLoopMount('032')OK 23:47:14 testLoopMount('033')OK 23:47:15 testLoopMount('034')OK 23:47:15 testLoopMount('035')OK 23:47:15 testLoopMount('036')OK 23:47:15 testLoopMount('037')OK 23:47:15 testLoopMount('038')OK 23:47:15 testLoopMount('039')OK 23:47:15 testLoopMount('040')OK 23:47:16 testLoopMount('041')OK 23:47:16 testLoopMount('042')OK 23:47:16 testLoopMount('043')OK 23:47:16 testLoopMount('044')OK 23:47:16 testLoopMount('045')OK 23:47:16 testLoopMount('046')OK 23:47:17 testLoopMount('047')OK 23:47:17 testLoopMount('048')OK 23:47:17 testLoopMount('049')OK 23:47:17 testLoopMount('050')OK 23:47:17 testLoopMount('051')OK 23:47:17 testLoopMount('052')OK 23:47:18 testLoopMount('053')OK 23:47:18 testLoopMount('054')OK 23:47:18 testLoopMount('055')OK 23:47:18 testLoopMount('056')OK 23:47:18 testLoopMount('057')OK 23:47:18 testLoopMount('058')OK 23:47:19 testLoopMount('059')OK 23:47:19 testLoopMount('060')OK 23:47:19 testLoopMount('061')OK 23:47:19
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: Verified+1 Verified again using the tests, see the next patch running about 2000 mount tests. -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: This version uses the current option instead of a magic 5 seconds, remove the ugly duplicate code, and improve documentation. -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 5: Code-Review-1 (3 comments) https://gerrit.ovirt.org/#/c/56544/5/lib/vdsm/storage/mount.py File lib/vdsm/storage/mount.py: Line 224: Line 225: def mount(self, mntOpts=None, vfstype=None, timeout=None, cgroup=None): Line 226: mount = supervdsm.getProxy().mount if os.geteuid() != 0 else _mount Line 227: self.log.info("mounting %s at %s", self.fs_spec, self.fs_file) Line 228: > spurious? I think it was intended, breaking the code to 3 "paragraphs", see umount(). Line 229: with utils.stopwatch("%s mounted" % self.fs_file, log=self.log): Line 230: mount(self.fs_spec, self.fs_file, mntOpts=mntOpts, vfstype=vfstype, Line 231: timeout=timeout, cgroup=cgroup) Line 232: Line 229: with utils.stopwatch("%s mounted" % self.fs_file, log=self.log): Line 230: mount(self.fs_spec, self.fs_file, mntOpts=mntOpts, vfstype=vfstype, Line 231: timeout=timeout, cgroup=cgroup) Line 232: Line 233: # This is a hack to wait unilt the udev events generated when adding a unilt > until Line 234: # new mount are processed. Line 235: # TODO: use pyudev to wait for more specific event Line 236: with utils.stopwatch("Waiting for mount udev events", log=self.log): Line 237: udevadm.settle(5) Line 233: # This is a hack to wait unilt the udev events generated when adding a Line 234: # new mount are processed. Line 235: # TODO: use pyudev to wait for more specific event Line 236: with utils.stopwatch("Waiting for mount udev events", log=self.log): Line 237: udevadm.settle(5) > Could you drop a word about this magical 5 seconds? I think we need to add This was copied from the tests, I think we should use the configuration for this so we can tweak this in the field. We have now irs:scsi_settle_timeout used after iscsi/fc rescan and after connecting to scsi target. For long term we should get rid of settle and wait for the specific udev event instead, just need more time to work on this. Line 238: Line 239: def umount(self, force=False, lazy=False, freeloop=False, timeout=None): Line 240: umount = supervdsm.getProxy().umount if os.geteuid() != 0 else _umount Line 241: self.log.info("unmounting %s", self.fs_file) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Dan Kenigsberg has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 5: Code-Review+1 (1 comment) https://gerrit.ovirt.org/#/c/56544/5/lib/vdsm/storage/mount.py File lib/vdsm/storage/mount.py: PS5, Line 237: 5 Could you drop a word about this magical 5 seconds? I think we need to add an "apology" about the racefulness of this settle() call. -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Francesco Romani has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 5: Code-Review+1 (1 comment) https://gerrit.ovirt.org/#/c/56544/5/lib/vdsm/storage/mount.py File lib/vdsm/storage/mount.py: Line 224: Line 225: def mount(self, mntOpts=None, vfstype=None, timeout=None, cgroup=None): Line 226: mount = supervdsm.getProxy().mount if os.geteuid() != 0 else _mount Line 227: self.log.info("mounting %s at %s", self.fs_spec, self.fs_file) Line 228: spurious? Line 229: with utils.stopwatch("%s mounted" % self.fs_file, log=self.log): Line 230: mount(self.fs_spec, self.fs_file, mntOpts=mntOpts, vfstype=vfstype, Line 231: timeout=timeout, cgroup=cgroup) Line 232: -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 4: Verified+1 -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Idan Shaby Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
gerrit-hooks has posted comments on this change. Change subject: mount: Wait for systemd temporary mount unit .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6']) -- To view, visit https://gerrit.ovirt.org/56544 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b0318eb534f781f127882983527e1a221820478 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir SofferGerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: mount: Wait for systemd temporary mount unit
Nir Soffer has uploaded a new change for review. Change subject: mount: Wait for systemd temporary mount unit .. mount: Wait for systemd temporary mount unit Systemd is monitoring mountpoints created during runtime by creating a temporary mount units. For example: # systemctl status /tmp/mount-1.DUNxySxI2R/wrk ● tmp-mount\x2d1.DUNxySxI2R-wrk.mount - /tmp/mount-1.DUNxySxI2R/wrk Loaded: loaded (/proc/self/mountinfo) Active: active (mounted) since Sun 2016-04-24 22:37:55 IDT; 14ms ago Where: /tmp/mount-1.DUNxySxI2R/wrk What: /dev/loop2 Mounting and unmounting quickly as we do in the tests, or when creating a floppy image may confuse systemd, and lead to various errors: - mountpoint is not mounted when trying to access files or unmount - mountpoint is busy when trying to unmount These are probably systemd or mount bugs. Until these issues are resolve, we need to find a workaround to avoid failures in the tests or when creating a floppy images. This patch add udevadm.settle() call after successful mount and umount operations. Change-Id: I9b0318eb534f781f127882983527e1a221820478 Signed-off-by: Nir Soffer--- M lib/vdsm/storage/mount.py M tests/mkimageTests.py M tests/mountTests.py 3 files changed, 15 insertions(+), 16 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/56544/1 diff --git a/lib/vdsm/storage/mount.py b/lib/vdsm/storage/mount.py index 2fd7237..51b7f96 100644 --- a/lib/vdsm/storage/mount.py +++ b/lib/vdsm/storage/mount.py @@ -34,6 +34,7 @@ from vdsm import commands from vdsm import constants from vdsm import supervdsm +from vdsm import udevadm from vdsm import utils # Common vfs types @@ -221,17 +222,31 @@ def mount(self, mntOpts=None, vfstype=None, timeout=None, cgroup=None): mount = supervdsm.getProxy().mount if os.geteuid() != 0 else _mount self.log.info("mounting %s at %s", self.fs_spec, self.fs_file) + with utils.stopwatch("%s mounted" % self.fs_file, log=self.log): mount(self.fs_spec, self.fs_file, mntOpts=mntOpts, vfstype=vfstype, timeout=timeout, cgroup=cgroup) +# This is a hack to wait unilt the udev events generated when adding a +# new mount are processed. +# TODO: use pyudev to wait for more specific event +with utils.stopwatch("Waiting for mount udev events", log=self.log): +udevadm.settle(5) + def umount(self, force=False, lazy=False, freeloop=False, timeout=None): umount = supervdsm.getProxy().umount if os.geteuid() != 0 else _umount self.log.info("unmounting %s", self.fs_file) + with utils.stopwatch("%s unmounted" % self.fs_file, log=self.log): umount(self.fs_file, force=force, lazy=lazy, freeloop=freeloop, timeout=timeout) +# This is a hack to wait unilt the udev events generated when removing +# a mount are processed. +# TODO: use pyudev to wait for more specific event +with utils.stopwatch("Waiting for umount udev events", log=self.log): +udevadm.settle(5) + def isMounted(self): try: self.getRecord() diff --git a/tests/mkimageTests.py b/tests/mkimageTests.py index fa18908..b0e1e5d 100644 --- a/tests/mkimageTests.py +++ b/tests/mkimageTests.py @@ -36,9 +36,7 @@ from testlib import VdsmTestCase, permutations, expandPermutations from testValidation import checkSudo, ValidateRunningAsRoot -from vdsm import udevadm from vdsm.commands import execCmd -from vdsm.utils import stopwatch from vdsm.storage import mount import mkimage @@ -176,9 +174,6 @@ self._check_label(floppy, label) finally: m.umount() -# TODO: Use libudev to wait for specific event -with stopwatch("Wait for udev events"): -udevadm.settle(5) @ValidateRunningAsRoot @permutations([[None], ['fslabel']]) @@ -198,9 +193,6 @@ self._check_label(iso_img, label) finally: m.umount() -# TODO: Use libudev to wait for specific event -with stopwatch("Wait for udev events"): -udevadm.settle(5) def test_removeFs(self): """ diff --git a/tests/mountTests.py b/tests/mountTests.py index 781ffec..56d7e25 100644 --- a/tests/mountTests.py +++ b/tests/mountTests.py @@ -25,8 +25,6 @@ import shutil import stat -from vdsm import udevadm -from vdsm.utils import stopwatch from vdsm.storage import mount from nose.plugins.skip import SkipTest @@ -134,9 +132,6 @@ self.assertTrue(m.isMounted()) finally: m.umount() -# TODO: Use libudev to wait for specific event -with stopwatch("Wait for udev events"): -udevadm.settle(5)