Alon Bar-Lev has posted comments on this change.

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


Patch Set 4: (3 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 function is boolean then should return boolean.
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)
why not simple move?
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):
This totally bad! well, legacy bad!

Use /etc/exports.d/ovirt-engine.exports and just remove it.

Better to have a patch to use /etc/exports.d/ovirt-engine.exports in setup and 
then this patch over it then keeping the mess.
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 <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to