Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: updated user prompts for stopping ovirt-engine service during setup ......................................................................
packaging: updated user prompts for stopping ovirt-engine service during setup * 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. * Avoid to stop the engine service if already stopped and not configured. Change-Id: I01da6e908a9f396bf4211afe863475d9fc2093be Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=896694 Signed-off-by: Sandro Bonazzola <sbona...@redhat.com> (cherry picked from commit b1da51482448ddabaa9b9f5c27c06188266d4e4a) --- M packaging/fedora/setup/engine-setup.py 1 file changed, 12 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/11706/1 diff --git a/packaging/fedora/setup/engine-setup.py b/packaging/fedora/setup/engine-setup.py index e7bab64..12178e4 100755 --- a/packaging/fedora/setup/engine-setup.py +++ b/packaging/fedora/setup/engine-setup.py @@ -1801,17 +1801,21 @@ 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 the engine is not already stopped (3, service not running) if not configFile: - print output_messages.INFO_NEED_STOP_ENGINE - answer = utils.askYesNo(output_messages.INFO_Q_STOP_ENGINE) - if answer: - print output_messages.INFO_STOP_ENGINE, - jservice.stop(True) - else: - logging.debug("User chose not to stop engine") - return False + if 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: + print output_messages.INFO_STOP_ENGINE, + jservice.stop(True) + else: + logging.debug("User chose not to stop engine") + return False else: #we stop the ovirt-engine service on a silent install print output_messages.INFO_STOP_ENGINE, -- To view, visit http://gerrit.ovirt.org/11706 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01da6e908a9f396bf4211afe863475d9fc2093be Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: engine_3.2 Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches