Dima Kuznetsov has posted comments on this change.
Change subject: mount: Perform mount and umount in supervdsm
......................................................................
Patch Set 4:
(2 comments)
https://gerrit.ovirt.org/#/c/43969/4/vdsm/storage/mount.py
File vdsm/storage/mount.py:
Line 208: return not self == other
Line 209:
Line 210: def __hash__(self):
Line 211: return hash((self.__class__, self.fs_spec, self.fs_file))
Line 212:
I think rather than having both mount and _umount, we can decorate _mount and _umount with
@callThroughSupervdsmIfNonRoot.
It will be more useful once we start moving more things to be done with supervdsm rather
than sudo.
Line 213: def mount(self, mntOpts=None, vfstype=None, timeout=None, cgroup=None):
Line 214: mount = supervdsm.getProxy().mount if os.geteuid() != 0 else _mount
Line 215: return mount(self.fs_spec, self.fs_file, mntOpts=mntOpts,
Line 216: vfstype=vfstype, timeout=timeout, cgroup=cgroup)
https://gerrit.ovirt.org/#/c/43969/4/vdsm/supervdsmServer
File vdsm/supervdsmServer:
Line 152:
Line 153: @logDecorator
Line 154: def mount(self, fs_spec, fs_file, mntOpts=None, vfstype=None, timeout=None,
Line 155: cgroup=None):
Line 156: return mount._mount(fs_spec, fs_file, mntOpts=mntOpts, vfstype=vfstype,
I think using mount.mount is a bit prettier albeit less fast
Line 157: timeout=timeout, cgroup=cgroup)
Line 158:
Line 159: @logDecorator
Line 160: def umount(self, fs_file, force=False, lazy=False, freeloop=False,
--
To view, visit
https://gerrit.ovirt.org/43969
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I38fb0eed0ba3e2c36aba8ca4ec262032cb012fc2
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes