You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Christopher Jackson (JIRA)" <ji...@apache.org> on 2016/06/22 15:39:57 UTC

[jira] [Updated] (AMBARI-17373) Ambari Shell exit status

     [ https://issues.apache.org/jira/browse/AMBARI-17373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Jackson updated AMBARI-17373:
-----------------------------------------
    Issue Type: Improvement  (was: Bug)

> Ambari Shell exit status
> ------------------------
>
>                 Key: AMBARI-17373
>                 URL: https://issues.apache.org/jira/browse/AMBARI-17373
>             Project: Ambari
>          Issue Type: Improvement
>            Reporter: Christopher Jackson
>
> Ambari shell is a great tool to automate the creation of clusters. However as far as automation is concerned there is an issue with knowing whether the cluster was provisioned successfully or not. 
> For instance if I execute the following sequence of shell commands:
> {code}
> java -jar /tmp/ambari-shell.jar --ambari.host=$HOSTNAME << EOF
> blueprint add --file /tmp/blueprint.json
> cluster build --blueprint my-blueprint
> cluster assign --hostGroup host_group_1 --host $HOSTNAME
> cluster create --exitOnFinish true
> EOF
> {code}
> I have no idea if the cluster provisioned successfully unless I look at the output. 
> Is it possible to have ambari-shell return a status code of 0 only when every command completed successfully? I know that may not be the best solution since the shell can be used for multiple purposes other then creating a cluster. Alternatively, can the cluster create command have an additional flag that writes to a file on disk with its status (eg. SUCCESS, FAILURE)?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)