Skip to content

Commit

Permalink
BZ 747768 - aeolus-configure should exit w/ non 0 exit code if there …
Browse files Browse the repository at this point in the history
…is a failure

Turned on puppet's detailed exit codes option.

Puppet exits 0 if success or 2 if success and changes were made.

Added code to exit 1 if puppet exits with status other than 0 or 2.
  • Loading branch information
rwsu committed Nov 8, 2011
1 parent 219a7ef commit 9fd4974
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/aeolus-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ puppet /usr/share/aeolus-configure/modules/aeolus/aeolus.pp \
--external_nodes "/bin/sh /usr/share/aeolus-configure/modules/aeolus/aeolus-node $PUPPET_NODE" --node_terminus exec \
--logdest=/var/log/aeolus-configure/aeolus-cleanup.log \
--logdest=console \
$LOGLEVEL
$LOGLEVEL \
--detailed-exitcodes
if [ $? != 0 -a $? != 2 ] ; then
exit 1
fi
6 changes: 5 additions & 1 deletion bin/aeolus-configure
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@ do
--external_nodes "/bin/sh /usr/share/aeolus-configure/modules/aeolus/aeolus-node $x" --node_terminus exec \
--logdest=/var/log/aeolus-configure/aeolus-configure.log \
--logdest=console \
$LOGLEVEL
$LOGLEVEL \
--detailed-exitcodes
if [ $? != 0 -a $? != 2 ] ; then
exit 1
fi
done

0 comments on commit 9fd4974

Please sign in to comment.