Aravinda VK has uploaded a new change for review.

Change subject: packaging: Second time setup without cleanup is made 
configurable
......................................................................

packaging: Second time setup without cleanup is made configurable

Added new configuration in basedefs.py to allow user to run
engine-setup second time without running engine-cleanup.
Config name: ALLOW_SECOND_TIME_SETUP_WITHOUT_CLEANUP

Default value will be True, if we need to disable second time
run without engine-cleanup then we can make it False.

Change-Id: Iea521b632547e98b60cd326d3441d7ed71883270
Signed-off-by: Aravinda VK <[email protected]>
---
M packaging/fedora/setup/basedefs.py
M packaging/fedora/setup/engine-setup.py
M packaging/fedora/setup/output_messages.py
3 files changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/80/15380/1

diff --git a/packaging/fedora/setup/basedefs.py 
b/packaging/fedora/setup/basedefs.py
index 375aad4..2b5a33e 100644
--- a/packaging/fedora/setup/basedefs.py
+++ b/packaging/fedora/setup/basedefs.py
@@ -243,6 +243,9 @@
 # prompts the user to select Application Mode option.
 USE_DEFAULT_APPLICATION_MODE_WITHOUT_PROMPT=False
 
+# Allow to run engine-setup second time without cleanup?
+ALLOW_SECOND_TIME_SETUP_WITHOUT_CLEANUP=True
+
 # This is needed for avoiding error in create_ca when supporting max cn length 
of 64.
 # please DONT increase this size, any value over 55 will fail the setup.
 # the truncated host-fqdn is concatenated with a random string to create a 
unique CN value.
diff --git a/packaging/fedora/setup/engine-setup.py 
b/packaging/fedora/setup/engine-setup.py
index 613e4cc..b15f6d7 100755
--- a/packaging/fedora/setup/engine-setup.py
+++ b/packaging/fedora/setup/engine-setup.py
@@ -2219,6 +2219,12 @@
 
         # Handle second excecution warning
         if isSecondRun():
+            if not basedefs.ALLOW_SECOND_TIME_SETUP_WITHOUT_CLEANUP:
+                print "\n", output_messages.INFO_SECOND_RUN
+                logging.debug("exiting gracefully")
+                print output_messages.INFO_STOP_INSTALL_EXIT
+                return 0
+
             print output_messages.WARN_SECOND_RUN
 
             # Ask for user input only on interactive run
diff --git a/packaging/fedora/setup/output_messages.py 
b/packaging/fedora/setup/output_messages.py
index 30c496f..0cc87ea 100644
--- a/packaging/fedora/setup/output_messages.py
+++ b/packaging/fedora/setup/output_messages.py
@@ -53,7 +53,8 @@
 INFO_CLOSE_PORTS="Please verify that the specified ports are not used by any 
service on this host and run setup again"
 INFO_LOGIN_USER="Please use the user \"admin\" and password specified in order 
to login into %s" % basedefs.APP_NAME
 INFO_ADD_USERS="To configure additional users, first configure authentication 
domains using the '%s' utility" % CONST_MANAGE_DOMAINS
-WARN_SECOND_RUN="\nWARNING: %s setup has already been run on this host.\nTo 
remove all configuration and reset %s please run %s.\nPlease be advised that 
executing %s without cleanup is not supported." % (basedefs.APP_NAME, 
basedefs.APP_NAME, CONST_CLEANUP, CONST_SETUP)
+INFO_SECOND_RUN="%s setup has already been run on this host.\nTo remove all 
configuration and reset %s please run %s.\nPlease be advised that executing %s 
without cleanup is not supported." % (basedefs.APP_NAME, basedefs.APP_NAME, 
CONST_CLEANUP, CONST_SETUP)
+WARN_SECOND_RUN="\nWARNING: %s" % (INFO_SECOND_RUN)
 
 # ASYNC TASKS AND COMPENSATIONS
 INFO_RETRYING = "Retrying to clear system tasks. "


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea521b632547e98b60cd326d3441d7ed71883270
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Aravinda VK <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to