Sandro Bonazzola has uploaded a new change for review.

Change subject: packaging: engine-setup - fix RHBZ #896694
......................................................................

packaging: engine-setup - fix RHBZ #896694

* If the engine service is in state not running, and only in this
  state, avoid to ask for stopping the service.
  The script doesn't check for service up and running, avoiding a
  regression on RHBZ #837812.

Change-Id: I01da6e908a9f396bf4211afe863475d9fc2093be
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=896694
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M packaging/fedora/setup/engine-setup.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/76/11276/1

diff --git a/packaging/fedora/setup/engine-setup.py 
b/packaging/fedora/setup/engine-setup.py
index e7bab64..d00648c 100755
--- a/packaging/fedora/setup/engine-setup.py
+++ b/packaging/fedora/setup/engine-setup.py
@@ -1801,9 +1801,12 @@
 def _stopEngine(configFile):
     logging.debug("stopping %s service" % basedefs.ENGINE_SERVICE_NAME)
     jservice = utils.Service(basedefs.ENGINE_SERVICE_NAME)
+    (status, rc) = jservice.status()
 
     #if we don't use an answer file, we need to ask the user if to stop engine
-    if not configFile:
+    #if the engine is not already stopped (3, service not running)
+    if not configFile and rc != 3:
+        logging.debug("engine is in status %d: %s" % (rc, status))
         print output_messages.INFO_NEED_STOP_ENGINE
         answer = utils.askYesNo(output_messages.INFO_Q_STOP_ENGINE)
         if answer:


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

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

Reply via email to