Christopher Jackson created AMBARI-17373:
--------------------------------------------
Summary: Ambari Shell exit status
Key: AMBARI-17373
URL: https://issues.apache.org/jira/browse/AMBARI-17373
Project: Ambari
Issue Type: Bug
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)