Exit the script after devstack is prepared

This commit is contained in:
Mate Lakat 2014-01-16 18:02:42 +00:00
parent 3271a1bb8b
commit feb4854f53

View File

@ -72,7 +72,7 @@ ssh-add $KEY_PATH
set +e
remote-bash root@$IP << EOF
remote-bash-agentfw root@$IP << EOF
set -eux
apt-get update
@ -94,9 +94,13 @@ config/install_puppet.sh
config/install_modules.sh
puppet apply --modulepath=/root/config/modules:/etc/puppet/modules -e "class { openstack_project::slave_template: install_users => false,ssh_key => \\"\${SSH_KEYS}\\" }"
echo HostKey /etc/ssh/ssh_host_ecdsa_key >> /etc/ssh/sshd_config
reboot
sudo -u jenkins -i /opt/nodepool-scripts/prepare_devstack.sh
rm -f /root/done.stamp
sync
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@192.168.33.2 halt -p
EOF
RESULT="$?"
if ! [ "$RESULT" = "0" ]; then
@ -104,6 +108,9 @@ if ! [ "$RESULT" = "0" ]; then
exit $RESULT
fi
ssh-agent -k
exit 0
# Wait until the box comes back
while true; do
remote-bash jenkins@$IP << EOF
@ -120,7 +127,7 @@ remote-bash jenkins@$IP << EOF
set -eux
# This is originally executed by nodepool
/opt/nodepool-scripts/prepare_devstack.sh
# These came from the Readme
export REPO_URL=https://review.openstack.org/p