Change in vdsm[master]: vdsm-tool: changing root checking in configurator.
nsoffer at redhat.com
nsoffer at redhat.com
Sun Aug 10 14:58:42 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: vdsm-tool: changing root checking in configurator.
......................................................................
Patch Set 1:
(3 comments)
http://gerrit.ovirt.org/#/c/31293/1/lib/vdsm/tool/configurator.py
File lib/vdsm/tool/configurator.py:
Line 672: SanlockModuleConfigure(),
Line 673: )
Line 674:
Line 675:
Line 676: def assertRoot(func):
I think that @requiresRoot is more clear.
Line 677: @functools.wraps(func)
Line 678: def inner(*args, **kwargs):
Line 679: if os.getuid() != 0:
Line 680: raise NotRootError()
Line 674:
Line 675:
Line 676: def assertRoot(func):
Line 677: @functools.wraps(func)
Line 678: def inner(*args, **kwargs):
Call it wrapper - this is how it is called almost everywhere.
Line 679: if os.getuid() != 0:
Line 680: raise NotRootError()
Line 681: func(*args, **kwargs)
Line 682: return inner
Line 675:
Line 676: def assertRoot(func):
Line 677: @functools.wraps(func)
Line 678: def inner(*args, **kwargs):
Line 679: if os.getuid() != 0:
> Makes sense. I assume we should get no fall back from
Dima is correct, but do not change this in this patch. Do this in the next patch - this patch about checking for root in where needed, the next patch can fix the way we check for root. Lets keep logical changes separate.
Line 680: raise NotRootError()
Line 681: func(*args, **kwargs)
Line 682: return inner
Line 683:
--
To view, visit http://gerrit.ovirt.org/31293
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I52967e30f677e4537b83c2db442963e3eadecb55
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list