Change in vdsm[master]: multipath: Write multipath.conf atomically

nsoffer at redhat.com nsoffer at redhat.com
Wed Aug 26 01:44:19 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: multipath: Write multipath.conf atomically
......................................................................


Patch Set 5:

(2 comments)

https://gerrit.ovirt.org/#/c/44869/5/lib/vdsm/tool/configurators/multipath.py
File lib/vdsm/tool/configurators/multipath.py:

Line 132
Line 133
Line 134
Line 135
Line 136
> In a follow-up patch, would you please eliminate the sole remaining user of
Sure - If you remember, misc.rotateFiles is broken anyway - it does nothing :-)


Line 136:             delete=False) as f:
Line 137:         try:
Line 138:             f.write(_CONF_DATA)
Line 139:             f.flush()
Line 140:             os.chmod(f.name, 0o644)
> I think we should call a _silent_restorecon after the rename. cp does its o
According to cp(1) running without any flags does not modify or preserve selinux labels.

I discussed this with Fabian, and we came to the conclusion that we don't have to do anything about selinux context - see
https://gerrit.ovirt.org/#/c/44869/3/lib/vdsm/tool/configurators/multipath.py,unified

If you believe that cp generate different results then the method suggested here, please suggest way to reproduce this.

Do we restore selinux context for other configuration files? (e.g. libvirtd.conf?).
Line 141:             os.rename(f.name, _CONF_FILE)
Line 142:         except:
Line 143:             os.unlink(f.name)
Line 144:             raise


-- 
To view, visit https://gerrit.ovirt.org/44869
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I850d621b7cb09f2732b8b3eb2cb2897e87547ddb
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fdeutsch at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list