Merge "Fail bootstrap_admin_node if admin password is wrong"

This commit is contained in:
Jenkins 2016-03-31 12:22:55 +00:00 committed by Gerrit Code Review
commit 02cda68361
1 changed files with 10 additions and 1 deletions

View File

@ -104,7 +104,9 @@ https://docs.mirantis.com/openstack/fuel/fuel-${FUEL_RELEASE}/\
release-notes.html#maintenance-updates"
fuelmenu_fail_message="Fuelmenu was not able to generate '/etc/fuel/astute.yaml' file! \
Please, restart it manualy using 'fuelmenu' command."
fuelclient_fail_message="Fuel CLI credentials are invalid. Update \
/etc/fuel/astute.yaml FUEL_ACCESS/password and ~/.config/fuel/fuel_client.yaml\
in order to proceed with deployment."
function countdown() {
local i
sleep 1
@ -507,6 +509,13 @@ if [ ${old_sysctl_vm_value} -lt 65535 ]; then
sysctl -w vm.min_free_kbytes=${old_sysctl_vm_value}
fi
# Ensure fuelclient can authenticate
output=$(fuel token 2>&1)
if echo "$output" | grep -q "Unauthorized"; then
echo $fuelclient_fail_message
fail
fi
# apply puppet
/etc/puppet/modules/fuel/examples/deploy.sh || fail