You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Carter Shanklin (JIRA)" <ji...@apache.org> on 2015/08/15 20:15:45 UTC
[jira] [Updated] (AMBARI-12780) ambari-server.py start exits 1 if
Ambari server is running
[ https://issues.apache.org/jira/browse/AMBARI-12780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carter Shanklin updated AMBARI-12780:
-------------------------------------
Affects Version/s: 2.1.0
> ambari-server.py start exits 1 if Ambari server is running
> ----------------------------------------------------------
>
> Key: AMBARI-12780
> URL: https://issues.apache.org/jira/browse/AMBARI-12780
> Project: Ambari
> Issue Type: Bug
> Affects Versions: 2.1.0
> Reporter: Carter Shanklin
>
> This approach frustrates Ambari management from tools like Puppet. Generally startup scripts exit 0 when the system is in the correct state and 1 otherwise. This follows some different philosophy. Is this necessary?
> Example of where this causes a problem:
> {code}
> ==> ambari: Notice: /Stage[main]/Ambari_server/Exec[ambari-server-setup]/returns: executed successfully
> ==> ambari: Notice: /Stage[main]/Ambari_server/Exec[ambari-server-start]/returns: Using python /usr/bin/python2.6
> ==> ambari: Notice: /Stage[main]/Ambari_server/Exec[ambari-server-start]/returns: Starting ambari-server
> ==> ambari: Notice: /Stage[main]/Ambari_server/Exec[ambari-server-start]/returns: ERROR: Exiting with exit code 1.
> ==> ambari:
> ==> ambari: Notice: /Stage[main]/Ambari_server/Exec[ambari-server-start]/returns: REASON: Ambari Server is already running.
> ==> ambari: Error: /usr/sbin/ambari-server start --silent returned 1 instead of one of [0]
> ==> ambari: Error: /Stage[main]/Ambari_server/Exec[ambari-server-start]/returns: change from notrun to 0 failed: /usr/sbin/ambari-server start --silent returned 1 instead of one of [0]
> ==> ambari: Notice: Finished catalog run in 6.68 seconds
> The SSH command responded with a non-zero exit status. Vagrant
> assumes that this means the command failed. The output for this command
> should be in the log above. Please read the output to determine what
> went wrong.
> {code}
> Code is here.
> {code}
> status, pid = is_server_runing()
> if status:
> err = "Ambari Server is already running."
> raise FatalException(1, err)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)