summaryrefslogtreecommitdiffstats
path: root/mcp/config/states/maas
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-22 19:04:17 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-22 19:04:17 +0200
commit39ffab99ad34ff45c0ed8be5a8172106e6a819a5 (patch)
tree2ccad9cdbe4912acf84616d3003036dc3bba027e /mcp/config/states/maas
parent4489699cb63fadb6939d5c70b49e84bb4f1ff17f (diff)
states: maas: Add 30s delay in re-deploy attempt
Occasionaly, MaaS fails to provision/deploy some nodes, in which case we try marking them as broken, then fixed (to put them again in 'ready' state); before re-attempting the MaaS deploy operation. However, this leads to 'Error: Internal server error' when deploy function is called right after transitioning the node to 'ready' state. Add a delay of 30 seconds before re-attempting the failed operation. Change-Id: Ia9ecec67639387e4a29feab3114e1741c554a2cb Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/config/states/maas')
-rwxr-xr-xmcp/config/states/maas2
1 files changed, 2 insertions, 0 deletions
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index 11c89c99b..e1ffa8733 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -28,6 +28,7 @@ function maas_fixup() {
for node_system_id in ${fcnodes}; do
salt -C 'mas01*' state.apply maas.machines.delete \
pillar="{'system_id': '${node_system_id}'}"
+ sleep 30
done
if [ -n "${fcnodes}" ]; then
salt -C 'mas01*' state.apply maas.machines
@@ -40,6 +41,7 @@ function maas_fixup() {
for node_system_id in ${fdnodes}; do
salt -C 'mas01*' state.apply maas.machines.mark_broken_fixed \
pillar="{'system_id': '${node_system_id}'}"
+ sleep 30
done
if [ -n "${fdnodes}" ]; then
salt -C 'mas01*' state.apply maas.machines.deploy