Nir Soffer has posted comments on this change. Change subject: multipath: Write multipath.conf atomically ......................................................................
Patch Set 3: (1 comment) https://gerrit.ovirt.org/#/c/44869/3/lib/vdsm/tool/configurators/multipath.py File lib/vdsm/tool/configurators/multipath.py: Line 137: try: Line 138: f.write(_CONF_DATA) Line 139: f.flush() Line 140: os.chmod(f.name, 0o644) Line 141: os.rename(f.name, _CONF_FILE) > What about setting the correct SELinux labels? This code creates this temporary file: -rw-------. root root unconfined_u:object_r:etc_t:s0 /etc/multipath.conf.tmpypj4lS And after the move, it becomes: -rw-r--r--. root root unconfined_u:object_r:etc_t:s0 /etc/multipath.conf Previously, the temporary fie would be: -rw-------. root root unconfined_u:object_r:user_tmp_t:s0 /tmp/tmpo6l5m8 And the final file after the copy is the same as the current code. Do you see any issue with the selinux labels? Line 142: except: Line 143: os.unlink(f.name) Line 144: raise Line 145: -- 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: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Fabian Deutsch <[email protected]> Gerrit-Reviewer: Fabian Deutsch <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: Yeela Kaplan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
