Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: modify enigne.conf.d setup files prefix ......................................................................
packaging: modify enigne.conf.d setup files prefix previously we used '50-' prefix, however there is no reason for setup default to be loaded so late in change, so now it was modified to '10-' prefix. clean all configuration files when engine-clean is executed to avoid leftovers. Change-Id: I173faede1f39b87a14ede05c04e0ab4da7e8e5d3 Signed-off-by: Alon Bar-Lev <[email protected]> --- M packaging/fedora/setup/basedefs.py M packaging/fedora/setup/engine-cleanup.py M packaging/fedora/setup/engine-setup.py 3 files changed, 18 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/62/14562/1 diff --git a/packaging/fedora/setup/basedefs.py b/packaging/fedora/setup/basedefs.py index 8095883..504a01c 100644 --- a/packaging/fedora/setup/basedefs.py +++ b/packaging/fedora/setup/basedefs.py @@ -141,17 +141,17 @@ DIR_ENGINE_NOTIFIER_CONF="%s.d" % FILE_ENGINE_NOTIFIER_CONF # File containing the setup generated database configuration of the engine: -FILE_ENGINE_CONF_DATABASE="%s/50-setup-database.conf" % DIR_ENGINE_CONF +FILE_ENGINE_CONF_DATABASE="%s/10-setup-database.conf" % DIR_ENGINE_CONF # File containing the setup generated protocols configuration of the engine: -FILE_ENGINE_CONF_PROTOCOLS="%s/50-setup-protocols.conf" % DIR_ENGINE_CONF +FILE_ENGINE_CONF_PROTOCOLS="%s/10-setup-protocols.conf" % DIR_ENGINE_CONF # File containing the setup generated java configuration of the engine: -FILE_ENGINE_CONF_JAVA="%s/50-setup-java.conf" % DIR_ENGINE_CONF -FILE_ENGINE_NOTIFIER_CONF_JAVA="%s/50-setup-java.conf" % DIR_ENGINE_NOTIFIER_CONF +FILE_ENGINE_CONF_JAVA="%s/10-setup-java.conf" % DIR_ENGINE_CONF +FILE_ENGINE_NOTIFIER_CONF_JAVA="%s/10-setup-java.conf" % DIR_ENGINE_NOTIFIER_CONF # File containing the setup generated java configuration of the engine: -FILE_ENGINE_CONF_PKI="%s/50-setup-pki.conf" % DIR_ENGINE_CONF +FILE_ENGINE_CONF_PKI="%s/10-setup-pki.conf" % DIR_ENGINE_CONF # This file will be automatically created when the engine goes into # maintenance mode during upgrades and automatically removed when the diff --git a/packaging/fedora/setup/engine-cleanup.py b/packaging/fedora/setup/engine-cleanup.py index 02efa3d..9e4493b 100755 --- a/packaging/fedora/setup/engine-cleanup.py +++ b/packaging/fedora/setup/engine-cleanup.py @@ -3,6 +3,8 @@ # Imports import sys import os +import glob +import datetime import logging import traceback import tempfile @@ -69,6 +71,7 @@ MSG_INFO_CLEANING_PROXY="Cleaning apache proxy configuration" MSG_INFO_CLEANING_NFS="Cleaning NFS Exports" +MSG_INFO_CLEANING_CONFIG="Cleaning configuration" MSG_CLEAN_NFS_EXPORTS_QUESTION="Would you like to remove %s configuration from \ {files}" % basedefs.APP_NAME MSG_CLEAN_NFS_EXPORTED_DIRS_QUESTION="Would you like to remove the following \ @@ -206,6 +209,12 @@ for p in removed: logging.debug("Removing directory %s" % p) shutil.rmtree(p) + + +def cleanConfiguration(): + suffix = datetime.datetime.now().strftime("%Y%m%d%H%M%S") + for f in glob.glob(os.path.join(basedefs.DIR_ENGINE_CONF, "*.conf")): + os.rename(f, "%s.%s" % (f, suffix)) def initLogging(): @@ -508,6 +517,9 @@ # Clean NFS exports runFunc(cleanNFSExports, MSG_INFO_CLEANING_NFS) + # Clean configuration + runFunc(cleanConfiguration, MSG_INFO_CLEANING_CONFIG) + if len(err_messages) == 0: print MSG_INFO_CLEANUP_OK else: diff --git a/packaging/fedora/setup/engine-setup.py b/packaging/fedora/setup/engine-setup.py index 332d502..fddb31c 100755 --- a/packaging/fedora/setup/engine-setup.py +++ b/packaging/fedora/setup/engine-setup.py @@ -2053,7 +2053,7 @@ add the user & host:secrue_port values to logcollector.conf and isouploader.conf """ for entry in basedefs.TOOLS_CONFIG: - conf = os.path.join(entry['dir'], "50-engine-setup.conf") + conf = os.path.join(entry['dir'], "10-engine-setup.conf") if not os.path.exists(os.path.dirname(conf)): os.mkdir(os.path.dirname(conf)) with open(conf, "w") as f: -- To view, visit http://gerrit.ovirt.org/14562 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I173faede1f39b87a14ede05c04e0ab4da7e8e5d3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
