Fabian Deutsch has posted comments on this change. Change subject: persist: fix owner/group copy to /config ......................................................................
Patch Set 7: Code-Review-1 (2 comments) One small nit pick, then we are good. https://gerrit.ovirt.org/#/c/39068/7/src/ovirt/node/utils/fs/__init__.py File src/ovirt/node/utils/fs/__init__.py: Line 439: """Copy the owner/group, selinux context from abspath to destpath""" Line 440: Line 441: if not os.path.exists(abspath) or not os.path.exists(destpath): Line 442: self.logger.debug("Cannot proceed, check if paths exist!") Line 443: return False Please raise an exception here, that is more pythonic Line 444: Line 445: abspath_stat = os.stat(abspath) Line 446: owner = abspath_stat[stat.ST_UID] Line 447: group = abspath_stat[stat.ST_GID] Line 449: Line 450: from ...utils import security Line 451: security.Selinux().chcon(destpath, Line 452: security.Selinux().getcon(abspath)) Line 453: return True Let's drop the return, we should work with exceptions to signal a failure. Line 454: Line 455: def _persist_dir(self, abspath): Line 456: """Persist directory and bind mount it back to its current location Line 457: """ -- To view, visit https://gerrit.ovirt.org/39068 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4ec3dc1773a0e84eb82c2682f9e145c15216dd91 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]> Gerrit-Reviewer: Fabian Deutsch <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
