Sandro Bonazzola has posted comments on this change.
Change subject: packaging: allow importing ISO domain on setup, exports.d
support
......................................................................
Patch Set 5: (4 inline comments)
....................................................
File packaging/fedora/setup/common_utils.py
Line 1630: Check if the given path is already exported
Line 1631: """
Line 1632: if not os.path.exists(exportsFilePath):
Line 1633: return False
Line 1634: with open(exportsFilePath) as exportsFile:
Just reducing the indentation levels. I usually prefer reducing the indentation
if this doesn't cause having too many return points. in this case there are 3
returns: I agree that the return inside the for loop could be avoided just
adding 2 lines of code but if you agree, I would like to leave the first return
just for reducing the indentation levels and gaining readability.
Line 1635: fileContent = exportsFile.readlines()
Line 1636:
Line 1637: for line in fileContent:
Line 1638: if verifyStringFormat(line, "^%s\s+.+" % (path)):
....................................................
File packaging/fedora/setup/engine-cleanup.py
Line 176: search_path.append(exportFilePath)
Line 177: msg_files = "%s and %s" % (basedefs.FILE_ETC_EXPORTS,
exportFilePath)
Line 178:
Line 179: if not options.unattended_clean:
Line 180: msg = MSG_CLEAN_NFS_EXPORTS_QUESTION % (basedefs.APP_NAME,
msg_files)
Ok
Line 181: options.remove_nfs_exports = askYesNo(msg)
Line 182: if not options.remove_nfs_exports:
Line 183: logging.debug("User chose to not clean NFS exports")
Line 184: return
....................................................
File packaging/fedora/setup/engine-setup.py
Line 1742: # Migrate from FILE_ETC_EXPORTS to DIR_ETC_EXPORTSD if
available
Line 1743: exportFilePath = basedefs.FILE_ETC_EXPORTS
Line 1744: if os.path.exists(basedefs.DIR_ETC_EXPORTSD):
Line 1745: exportFilePath = os.path.join(basedefs.DIR_ETC_EXPORTSD,
Line 1746: "%s.exports" % basedefs.ENGINE_SERVICE_NAME)
sounds good to me.
Line 1747:
Line 1748: if utils.isPathInExportFs(controller.CONF["NFS_MP"],
Line 1749: basedefs.FILE_ETC_EXPORTS):
Line 1750: nfsutils.migrateConfig(controller.CONF["NFS_MP"])
Line 1769: utils.copyFile(basedefs.FILE_NFS_SYSCONFIG,
"%s/nfs"%(basedefs.DIR_ETC_SYSCONFIG))
Line 1770:
Line 1771: # Start services
Line 1772: _startNfsServices()
Line 1773: controller.CONF["sd_uuid"] = None
this change should allow to import the iso domain if it already exists,
creating a new uuid and a new directory tree only if needed. It was the
original meaning of the patch.
Line 1774: for entry in os.listdir(controller.CONF["NFS_MP"]):
Line 1775: path = os.path.join(controller.CONF["NFS_MP"], entry)
Line 1776: if os.path.isdir(path):
Line 1777: try:
--
To view, visit http://gerrit.ovirt.org/11556
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a4343f8374e6439b0ee0a14fff233a0d4a0d5a3
Gerrit-PatchSet: 5
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