Nir Soffer has posted comments on this change. Change subject: multipath: Fix multipath.conf selinux labels ......................................................................
Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/46398/1/lib/vdsm/tool/configurators/multipath.py File lib/vdsm/tool/configurators/multipath.py: Line 120: delete=False) as f: Line 121: try: Line 122: f.write(_CONF_DATA) Line 123: f.flush() Line 124: selinux.restorecon(f.name) > Thanks, I'll check what is the best way to handle this error. Tested on rhel 7.1, this does not fail when selinux is disabled. Looking at upstream source, this code does not raise anything except OSError from os.lstat, which is a good reason to fail here. https://github.com/SELinuxProject/selinux/blob/master/libselinux/src/selinuxswig_python.i#L17 I'll test also on fedora 21 and 22. If it does not fail I don't see a reason to add a racy check. Line 125: os.chmod(f.name, 0o644) Line 126: os.rename(f.name, _CONF_FILE) Line 127: except: Line 128: os.unlink(f.name) -- To view, visit https://gerrit.ovirt.org/46398 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id0aebae46f30abf908a8f48c4f1f2257394fe616 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[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: 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
