Sandro Bonazzola has posted comments on this change.

Change subject: packaging: allow interactive NFS exports cleanup with 
engine-cleanup
......................................................................


Patch Set 4: (3 inline comments)

Replied to inline comments.

....................................................
File packaging/fedora/setup/engine-cleanup.py
Line 164:     if not options.unattended_clean:
Line 165:         options.remove_nfs_exports = 
askYesNo(MSG_CLEAN_NFS_EXPORTS_QUESTION)
Line 166:     if not options.remove_nfs_exports:
Line 167:         logging.debug("User chose to not clean NFS exports")
Line 168:         return False
If anyone care about user decisions during this cleanup, I can change all the 
returns from bool to None. Else Alon Bar-Lev is right, a boolean function 
should not return None.
Line 169:     logging.debug("User chose to clean NFS exports")
Line 170:     removed = nfsutils.cleanNfsExports(" %s installer" % 
basedefs.APP_NAME)
Line 171:     if len(removed) == 0:
Line 172:         return True


....................................................
File packaging/fedora/setup/nfsutils.py
Line 37:     logging.debug("Backup old NFS exports configuration file")
Line 38:     dateTimeSuffix = utils.getCurrentDateTime()
Line 39:     backupFile = "%s.%s.%s" % (exportFilePath, "BACKUP", 
dateTimeSuffix)
Line 40:     logging.debug("Backing up %s into %s", exportFilePath, backupFile)
Line 41:     utils.copyFile(exportFilePath, backupFile)
If I move the file, I have to restore permissions and selinux context on the 
new file. Writing over an existing file keep the original permissions and 
selinux context. Am I wrong?
Line 42: 
Line 43: 
Line 44: def cleanNfsExports(comment, exportFilePath=basedefs.FILE_ETC_EXPORTS):
Line 45:     """


Line 40:     logging.debug("Backing up %s into %s", exportFilePath, backupFile)
Line 41:     utils.copyFile(exportFilePath, backupFile)
Line 42: 
Line 43: 
Line 44: def cleanNfsExports(comment, exportFilePath=basedefs.FILE_ETC_EXPORTS):
In RHEL 6.3 and 6.4 there isn't any /etc/exports.d . Does it work anyway?
Line 45:     """
Line 46:     Remove all the lines added by engine-setup marked by comment from
Line 47:     exportFilePath.
Line 48:     """


--
To view, visit http://gerrit.ovirt.org/11548
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0548ab358d0cbed32ceff3ceacefc57f1c068df4
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Alex Lourie <alou...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to