aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/config/states/maas
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-20 16:53:52 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-20 16:53:52 +0000
commitfe9be64738ff1a1091e7df5b04b391fb15d6abc0 (patch)
tree978d7e0de6034eabb11c90ae05e7fe267f241058 /mcp/config/states/maas
parentc5d0050fd09db559d9c8f89e8c148ecd7ccedc4f (diff)
parent9f082ecb39beaa09132a8be611bb640c579d95d0 (diff)
Merge "[MaaS] Override failed testing by default" into stable/euphratesstable/euphrates
Diffstat (limited to 'mcp/config/states/maas')
-rwxr-xr-xmcp/config/states/maas9
1 files changed, 8 insertions, 1 deletions
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index 39f6badef..24249d40d 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -27,12 +27,19 @@ function maas_fixup() {
local fcnodes=$(echo "${statusout}" | \
grep -Pzo 'status: Failed commissioning\n\s+system_id: \K.+\n')
+ local ftnodes=$(echo "${statusout}" | \
+ grep -Pzo 'status: Failed testing\n\s+system_id: \K.+\n')
for node_system_id in ${fcnodes}; do
salt -C 'mas01*' state.apply maas.machines.delete \
pillar="{'system_id': '${node_system_id}'}"
sleep 10
done
- if [ -n "${fcnodes}" ]; then
+ for node_system_id in ${ftnodes}; do
+ salt -C 'mas01*' state.apply maas.machines.override_failed_testing \
+ pillar="{'system_id': '${node_system_id}'}"
+ sleep 10
+ done
+ if [ -n "${fcnodes}" ] || [ -n "${ftnodes}" ]; then
salt -C 'mas01*' state.apply maas.machines
return 1
fi