Alex Lourie has uploaded a new change for review.

Change subject: packaging: replaced Jboss service name with ovirt-engine
......................................................................

packaging: replaced Jboss service name with ovirt-engine

Change-Id: Ib3239c4c4550ddf32ee81525da7d8f3db9d50723
Signed-off-by: Alex Lourie <alou...@redhat.com>
---
M packaging/fedora/setup/engine-cleanup.py
M packaging/fedora/setup/engine-setup.py
M packaging/fedora/setup/engine-upgrade.py
M packaging/fedora/setup/output_messages.py
4 files changed, 50 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/88/8088/1

diff --git a/packaging/fedora/setup/engine-cleanup.py 
b/packaging/fedora/setup/engine-cleanup.py
index e301ace..db3fa76 100755
--- a/packaging/fedora/setup/engine-cleanup.py
+++ b/packaging/fedora/setup/engine-cleanup.py
@@ -41,18 +41,17 @@
 MSG_ERROR_BACKUP_DB = "Error: Database backup failed"
 MSG_ERROR_DROP_DB = "Error: DB drop operation failed. Check that there are no 
active connection to the '%s' DB"
 MSG_ERROR_CHECK_LOG = "Error: Cleanup failed.\nplease check log at %s"
-MSG_ERR_FAILED_JBOSS_SERVICE_STILL_RUN = "Error: Can't stop jboss service. 
Please shut it down manually."
-MSG_ERR_FAILED_STP_JBOSS_SERVICE = "Error: Can't stop JBoss"
-MSG_ERR_FAILED_STATUS_JBOSS_SERVICE = "Error: Can't get JBoss service status"
+MSG_ERR_FAILED_ENGINE_SERVICE_STILL_RUN = "Error: Can't stop ovirt-engine 
service. Please shut it down manually."
+MSG_ERR_FAILED_STP_ENGINE_SERVICE = "Error: Can't stop ovirt-engine"
+MSG_ERR_FAILED_STATUS_ENGINE_SERVICE = "Error: Can't get ovirt-engine service 
status"
 MSG_ERR_CANT_FIND_PGPASS_FILE="Could not find DB password file %s. Skipping DB 
cleanup" % basedefs.DB_PASS_FILE
 
 MSG_INFO_DONE = "DONE"
 MSG_INFO_ERROR = "ERROR"
-MSG_INFO_STOP_JBOSS = "Stopping %s service" % basedefs.ENGINE_SERVICE_NAME
+MSG_INFO_STOP_ENGINE = "Stopping %s service" % basedefs.ENGINE_SERVICE_NAME
 MSG_INFO_STOP_NOTIFIERD = "Stopping engine-notifierd service"
 MSG_INFO_BACKUP_DB = "Backing Up Database"
 MSG_INFO_REMOVE_DB = "Removing Database"
-MSG_INFO_REMOVE_SLIMMED = "Removing %s JBoss profile" % (PROD_NAME)
 MSG_INFO_REMOVE_CA = "Removing CA"
 MSG_INFO_UNLINK_EAR = "Removing EAR link"
 MSG_INFO_DB_BACKUP_FILE = "DB Backup available at"
@@ -364,17 +363,17 @@
 
         return True
 
-def stopJboss():
+def stopEngine():
     logging.debug("stoping %s service." % basedefs.ENGINE_SERVICE_NAME)
 
     cmd = [
         basedefs.EXEC_SERVICE, basedefs.ENGINE_SERVICE_NAME, "stop",
     ]
-    output, rc = utils.execCmd(cmdList=cmd, failOnError=True, 
msg=MSG_ERR_FAILED_STP_JBOSS_SERVICE)
+    output, rc = utils.execCmd(cmdList=cmd, failOnError=True, 
msg=MSG_ERR_FAILED_STP_ENGINE_SERVICE)
 
     # JBoss service sometimes return zero rc even if service is still up
     if "[FAILED]" in output and "Timeout: Shutdown command was sent, but 
process is still running" in output:
-        raise OSError(MSG_ERR_FAILED_JBOSS_SERVICE_STILL_RUN)
+        raise OSError(MSG_ERR_FAILED_ENGINE_SERVICE_STILL_RUN)
 
 def stopNotifier():
     logging.debug("stoping engine-notifierd service.")
@@ -417,8 +416,8 @@
 
     print
 
-    # Stop JBoss
-    runFunc(stopJboss, MSG_INFO_STOP_JBOSS)
+    # Stop Engine
+    runFunc(stopEngine, MSG_INFO_STOP_ENGINE)
 
     # Backup DB, drop DB and clean .pgpass file (only if 'basedefs.DB_NAME' db 
exists)
     if db.exists() and options.drop_db:
diff --git a/packaging/fedora/setup/engine-setup.py 
b/packaging/fedora/setup/engine-setup.py
index 2ba7c18..9f53de7 100755
--- a/packaging/fedora/setup/engine-setup.py
+++ b/packaging/fedora/setup/engine-setup.py
@@ -163,7 +163,7 @@
                         'condition_match' : [],
                         'steps'           : [ { 'title'     : 
output_messages.INFO_CFG_IPTABLES,
                                                 'functions' : 
[_configIptables] },
-                                              { 'title'     : 
output_messages.INFO_START_JBOSS,
+                                              { 'title'     : 
output_messages.INFO_START_ENGINE,
                                                 'functions' : [_startEngine] } 
]
                        },
                       { 'description'     : 'Handling httpd',
@@ -1686,17 +1686,17 @@
 
     #if we don't use an answer file, we need to ask the user if to stop engine
     if not configFile:
-        print output_messages.INFO_NEED_STOP_JBOSS
-        answer = utils.askYesNo(output_messages.INFO_Q_STOP_JBOSS)
+        print output_messages.INFO_NEED_STOP_ENGINE
+        answer = utils.askYesNo(output_messages.INFO_Q_STOP_ENGINE)
         if answer:
-            print output_messages.INFO_STOP_JBOSS,
+            print output_messages.INFO_STOP_ENGINE,
             jservice.stop(True)
         else:
             logging.debug("User chose not to stop engine")
             return False
     else:
         #we stop the jboss service on a silent install
-        print output_messages.INFO_STOP_JBOSS,
+        print output_messages.INFO_STOP_ENGINE,
         jservice.stop(True)
 
     return True
diff --git a/packaging/fedora/setup/engine-upgrade.py 
b/packaging/fedora/setup/engine-upgrade.py
index 1b7504b..7480aa4 100755
--- a/packaging/fedora/setup/engine-upgrade.py
+++ b/packaging/fedora/setup/engine-upgrade.py
@@ -82,15 +82,15 @@
 MSG_ERROR_YUM_UPDATE = "Error: Yum update failed"
 MSG_ERROR_CHECK_LOG = "Error: Upgrade failed.\nplease check log at %s"
 MSG_ERROR_CONNECT_DB = "Error: Failed to connect to database"
-MSG_ERR_FAILED_START_JBOSS_SERVICE = "Error: Can't start JBoss"
-MSG_ERR_FAILED_JBOSS_SERVICE_STILL_RUN = "Error: Can't stop jboss service. 
Please shut it down manually."
-MSG_ERR_FAILED_STP_JBOSS_SERVICE = "Error: Can't stop JBoss"
-MSG_ERR_FAILED_STATUS_JBOSS_SERVICE = "Error: Can't get JBoss service status"
+MSG_ERR_FAILED_START_ENGINE_SERVICE = "Error: Can't start ovirt-engine"
+MSG_ERR_FAILED_ENGINE_SERVICE_STILL_RUN = "Error: Can't stop ovirt-engine 
service. Please shut it down manually."
+MSG_ERR_FAILED_STOP_ENGINE_SERVICE = "Error: Can't stop ovirt-engine"
+MSG_ERR_FAILED_STATUS_ENGINE_SERVICE = "Error: Can't get ovirt-engine service 
status"
 MSG_ERR_FAILED_START_SERVICE = "Error: Can't start the %s service"
 MSG_ERR_FAILED_STOP_SERVICE = "Error: Can't stop the %s service"
 MSG_ERR_SQL_CODE = "Failed running sql query"
 MSG_ERR_EXP_UPD_DC_TYPE="Failed updating default Data Center Storage Type in 
%s db"
-MSG_ERROR_JBOSS_PID = "Error: JBoss service is dead, but pid file exists"
+MSG_ERROR_ENGINE_PID = "Error: ovirt-engine service is dead, but pid file 
exists"
 MSG_ERROR_YUM_TID = "Error: Yum transaction mismatch"
 MSG_ERROR_PGPASS = "Error: DB password file was not found on this system. 
Verify \
 that this system was previously installed and that there's a password file at 
%s or %s" % \
@@ -99,7 +99,7 @@
 MSG_INFO_DONE = "DONE"
 MSG_INFO_ERROR = "ERROR"
 MSG_INFO_REASON = " **Reason: %s**\n"
-MSG_INFO_STOP_JBOSS = "Stopping JBoss Service"
+MSG_INFO_STOP_ENGINE = "Stopping ovirt-engine Service"
 MSG_INFO_BACKUP_DB = "Backing Up Database"
 MSG_INFO_RENAME_DB = "Rename Database"
 MSG_INFO_RESTORE_DB = "Restore Database name"
@@ -110,18 +110,18 @@
 MSG_INFO_DB_RESTORE = "Restoring Database"
 MSG_INFO_YUM_ROLLBACK = "Rolling back rpms"
 MSG_INFO_NO_YUM_ROLLBACK = "Skipping yum rollback"
-MSG_INFO_START_JBOSS = "Starting JBoss"
+MSG_INFO_START_ENGINE = "Starting ovirt-engine"
 MSG_INFO_DB_BACKUP_FILE = "DB Backup available at "
 MSG_INFO_LOG_FILE = "Upgrade log available at"
 MSG_INFO_CHECK_UPDATE = "Checking for updates... (This may take several 
minutes)"
 MSG_INFO_UPGRADE_OK = "%s upgrade completed successfully!" % basedefs.APP_NAME
 MSG_INFO_STOP_INSTALL_EXIT="Upgrade stopped, Goodbye."
-MSG_INFO_UPDATE_JBOSS_PROFILE="Updating JBoss Profile"
+MSG_INFO_UPDATE_ENGINE_PROFILE="Updating ovirt-engine Profile"
 
-MSG_ALERT_STOP_JBOSS="\nDuring the upgrade process, %s  will not be 
accessible.\n\
+MSG_ALERT_STOP_ENGINE="\nDuring the upgrade process, %s  will not be 
accessible.\n\
 All existing running virtual machines will continue but you will not be able 
to\n\
 start or stop any new virtual machines during the process.\n" % 
basedefs.APP_NAME
-INFO_Q_STOP_JBOSS="Would you like to proceed"
+INFO_Q_PROCEED="Would you like to proceed"
 MSG_INFO_REPORTS="Perform the following steps to upgrade the history service \
 or the reporting package:\n\
 1. Execute: yum update ovirt-engine-reports*\n\
@@ -139,7 +139,7 @@
 
     parser.add_option("-u", "--unattended",
                       action="store_true", dest="unattended_upgrade", 
default=False,
-                      help="unattended upgrade (this option will stop jboss 
service before upgrading ovirt-engine)")
+                      help="unattended upgrade (this option will stop 
ovirt-engine service before upgrading ovirt-engine)")
 
     parser.add_option("-s", "--force-current-setup-rpm",
                       action="store_true", dest="force_current_setup_rpm", 
default=False,
@@ -152,43 +152,43 @@
     (options, args) = parser.parse_args()
     return (options, args)
 
-def checkJbossService(service=basedefs.ENGINE_SERVICE_NAME):
+def checkEngine(service=basedefs.ENGINE_SERVICE_NAME):
     """
-    Ask user to stop jboss service before
+    Ask user to stop ovirt-engine service before
     upgrading ovirt-engine
 
-    returns: true if user choose to stop jboss
+    returns: true if user choose to stop ovirt-engine
     false otherwise
     """
-    logging.debug("checking the status of jbossas service")
+    logging.debug("checking the status of ovirt-engine service")
     cmd = [
         basedefs.EXEC_SERVICE, service , "status",
     ]
     output, rc = utils.execCmd(cmdList=cmd, failOnError=False)
 
     if rc == 0:
-        logging.debug("jbossas service is up and running")
+        logging.debug("ovirt-engine service is up and running")
 
-        print MSG_ALERT_STOP_JBOSS
-        answer = utils.askYesNo(INFO_Q_STOP_JBOSS)
+        print MSG_ALERT_STOP_ENGINE
+        answer = utils.askYesNo(INFO_Q_PROCEED)
 
-        # If user choose yes -> return true (stop jbossas)
+        # If user choose yes -> return true (stop ovirt-engine)
         if answer:
             return True
         else:
-            logging.debug("User chose not to stop jboss")
+            logging.debug("User chose not to stop ovirt-engine")
             return False
 
     elif rc == 1:
         # Proc is dead, pid exists
-        raise Exception(MSG_ERROR_JBOSS_PID)
+        raise Exception(MSG_ERROR_ENGINE_PID)
 
     elif rc == 3:
-        # If jboss is not running, we don't need to stop it
+        # If ovirt-engine is not running, we don't need to stop it
         return True
 
     else:
-        raise Exception(MSG_ERR_FAILED_STATUS_JBOSS_SERVICE)
+        raise Exception(MSG_ERR_FAILED_STATUS_ENGINE_SERVICE)
 
 def initLogging():
     global LOG_FILE
@@ -554,14 +554,14 @@
     cmd = [
         basedefs.EXEC_SERVICE, service, "stop",
     ]
-    output, rc = utils. execCmd(cmdList=cmd, failOnError=True, 
msg=MSG_ERR_FAILED_STP_JBOSS_SERVICE)
+    output, rc = utils. execCmd(cmdList=cmd, failOnError=True, 
msg=MSG_ERR_FAILED_STOP_ENGINE_SERVICE)
 
 def startEngine():
-    logging.debug("starting jboss service.")
+    logging.debug("starting %s service.", basedefs.ENGINE_SERVICE_NAME)
     cmd = [
         basedefs.EXEC_SERVICE, basedefs.ENGINE_SERVICE_NAME, "start",
     ]
-    output, rc = utils.execCmd(cmdList=cmd, failOnError=True, 
msg=MSG_ERR_FAILED_START_JBOSS_SERVICE)
+    output, rc = utils.execCmd(cmdList=cmd, failOnError=True, 
msg=MSG_ERR_FAILED_START_ENGINE_SERVICE)
 
 def runPost():
     logging.debug("Running post script")
@@ -746,12 +746,12 @@
 
     # No rollback in this case
     try:
-        # We ask the user before stoping jboss or take command line option
-        if options.unattended_upgrade or checkJbossService(engineService):
+        # We ask the user before stoping ovirt-engine or take command line 
option
+        if options.unattended_upgrade or checkEngine(engineService):
             # Stopping engine
-            runFunc(stopEngineService, MSG_INFO_STOP_JBOSS)
+            runFunc(stopEngineService, MSG_INFO_STOP_ENGINE)
         else:
-            # This means that user chose not to stop jboss
+            # This means that user chose not to stop ovirt-engine
             logging.debug("exiting gracefully")
             print MSG_INFO_STOP_INSTALL_EXIT
             sys.exit(0)
@@ -820,8 +820,8 @@
         raise
 
     finally:
-        # start jboss
-        runFunc([startEngine], MSG_INFO_START_JBOSS)
+        # start engine
+        runFunc([startEngine], MSG_INFO_START_ENGINE)
 
     # Print log location on success
     addAdditionalMessages(etlService.isServiceAvailable())
diff --git a/packaging/fedora/setup/output_messages.py 
b/packaging/fedora/setup/output_messages.py
index f1d8652..ba4e12c 100644
--- a/packaging/fedora/setup/output_messages.py
+++ b/packaging/fedora/setup/output_messages.py
@@ -40,15 +40,15 @@
 INFO_UPD_RHEVM_CONF="Editing %s Configuration" % basedefs.APP_NAME
 INFO_UPD_CONF="Editing %s Configuration"
 INFO_CFG_NFS="Configuring the Default ISO Domain"
-INFO_START_JBOSS="Starting JBoss Service"
+INFO_START_ENGINE="Starting ovirt-engine Service"
 INFO_START_HTTPD="Starting HTTPD Service"
 INFO_CFG_IPTABLES="Configuring Firewall (iptables)"
 INFO_DSPLY_PARAMS="\n%s will be installed using the following configuration:" 
% basedefs.APP_NAME
 INFO_USE_PARAMS="Proceed with the configuration listed above"
-INFO_NEED_STOP_JBOSS="\nIn order to proceed the installer must stop the JBoss 
service"
-INFO_Q_STOP_JBOSS="Would you like to stop the JBoss service"
+INFO_NEED_STOP_ENGINE="\nIn order to proceed the installer must stop the 
ovirt-engine service"
+INFO_Q_STOP_ENGINE="Would you like to stop the ovirt-engine service"
 INFO_PROCEED="Would you like to proceed"
-INFO_STOP_JBOSS="Stopping JBoss..."
+INFO_STOP_ENGINE="Stopping ovirt-engine service..."
 INFO_STOP_INSTALL_EXIT="Installation stopped, Goodbye."
 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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3239c4c4550ddf32ee81525da7d8f3db9d50723
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <alou...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to