Juan Hernandez has uploaded a new change for review. Change subject: packaging: Better failed start message (#838527) ......................................................................
packaging: Better failed start message (#838527) https://bugzilla.redhat.com/838527 Improve the message presented to the user when the service can't be started because the PID file exists but the process is not running, thus indicating that the service crashed or was killed. Change-Id: I4099e4e32dd76eeca7f42a90e0fb5ed0049313fd Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com> --- M packaging/fedora/engine-service.py 1 file changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/75/7175/1 diff --git a/packaging/fedora/engine-service.py b/packaging/fedora/engine-service.py index e0384c9..d024978 100644 --- a/packaging/fedora/engine-service.py +++ b/packaging/fedora/engine-service.py @@ -289,9 +289,24 @@ def startEngine(): # Get the PID: enginePid = loadEnginePid() + + # If the PID already exists then we need to check if the + # process is running and tell the user that the service needs + # to be restarted: if enginePid: - syslog.syslog(syslog.LOG_WARNING, "The engine PID file \"%s\" already exists." % enginePidFile) - return + if not os.path.exists("/proc/%d" % enginePid): + raise Exception( + "The engine PID file \"%s\" contains %d but " + "that process doesn't exist. This means that " + "the engine crashed or was killed. You will " + "need to stop and start it again." % + (enginePidFile, enginePid)) + else: + syslog.syslog(syslog.LOG_WARNING, + "The engine PID file \"%s\" exists and the " + "process %d is running." % + (enginePidFile, enginePid)) + return # The list of applications to be deployed: engineApps = engineConfig.getString("ENGINE_APPS", "engine.ear").split() -- To view, visit http://gerrit.ovirt.org/7175 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4099e4e32dd76eeca7f42a90e0fb5ed0049313fd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches