Improve MAAS rack registration robustness

MAAS API is not longer used and login is not necessary.
This causes issues if MAAS region API is temporary unavailable.

Change-Id: If5d35fb54681954867981902110f2a55efa5e5f3
This commit is contained in:
Kaspars Skels 2019-04-25 13:28:13 -05:00
parent 407d4ccfb4
commit 538fb11887
1 changed files with 0 additions and 12 deletions

View File

@ -2,17 +2,6 @@
set -x
login_maas() {
echo "Logging in to MAAS region."
maas login local "$MAAS_ENDPOINT" "$MAAS_API_KEY"
if [[ $? -ne 0 ]];
then
echo "Could not login to MAAS API."
exit $?
fi
}
unregister_maas_rack() {
# In oder to avoid the issue with race condition in maas,
# do not de-register the dead maas-controller from mass-region
@ -39,6 +28,5 @@ register_maas_rack() {
done;
}
login_maas
unregister_maas_rack
register_maas_rack