diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-02-19 12:22:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-19 12:22:36 +0000 |
commit | 724890ecec8bb467947b3dcb20a59962273ffbcb (patch) | |
tree | bf4478ae8356c7ac6af97d81cae9cd01dcba9f2d /mcp/config/states/maas | |
parent | 00839253ec6cc31fdabe7cacdc23b9ffadfb2bba (diff) | |
parent | 5acee090a5ecd7bcb5d66769ff83ef37e8e43dae (diff) |
Merge changes from topics 'lab-proxy-keyserver', 'maas-override-failed-testing'
* changes:
[baremetal] Use upstream lab proxy for keyservers
[MaaS] Override failed testing by default
Diffstat (limited to 'mcp/config/states/maas')
-rwxr-xr-x | mcp/config/states/maas | 9 |
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 |