diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh index 4f9549ee3..9cff0b721 100755 --- a/iso/bootstrap_admin_node.sh +++ b/iso/bootstrap_admin_node.sh @@ -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