summaryrefslogtreecommitdiffstats
path: root/mcp/config/states
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-17 18:01:57 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-02-17 21:04:09 +0100
commit81561126307f15d4f65a743ed2431ea8c713a921 (patch)
tree12d90ee09e13e06e491dd21cbe4d8659139bca4e /mcp/config/states
parent30993030ea4b5a35ab4ae9d0aeb6be85c1e259c3 (diff)
[MaaS] Override failed testing by default
Some nodes fail automatic testing done by MaaS during commissioning, although running the testing suites one more time manually works. For now, just override all 'failed testing' nodes unconditionally. JIRA: FUEL-333 Change-Id: I13d3ee3d82550524480aa53aa8752ab90aa940cd Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/config/states')
-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 116bc45cd..0034e78f1 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -30,12 +30,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