Fail bootstrap_admin_node if admin password is wrong
This covers the scenario where a user changes the admin password, but fails to update /etc/fuel/astute.yaml and /root/.config/fuel/fuel_client.yaml. These files need to be updated to re-run bootstrap_admin_node for simple patching. This fix is partial because it should include string updates in fuel-ui, docs, and fuelclient. Change-Id: I23f362524eab9649b58a8ba722e6fd6cb1d6b1ab Partial-Bug: #1555262
This commit is contained in:
parent
be7068e7d8
commit
6a29a71266
|
@ -100,7 +100,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
|
||||
|
@ -500,6 +502,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
|
||||
if [[ $? -ne 0 ]]; then
|
||||
|
|
Loading…
Reference in New Issue