Run 'Delete Upgrade Flag and Unset it via Rest' only once

Currently the curl commands associated with this command run on all
controller nodes of the overcloud. Becuase the ODL URI is always the
same it's actually doing it against the same REST API every time,
causing problems with the optimistic locking ODL uses.

This patch adds extra error information and limits the execution of this
task to only once per playbook (i.e. just one controller).

Change-Id: I75aed2c0f412961c1eed2ff14e039a0baca09e8a
This commit is contained in:
Michel Peterson 2019-01-09 17:38:13 +02:00
parent 738eb1aa7c
commit 5a8950c706
1 changed files with 3 additions and 2 deletions

View File

@ -217,10 +217,10 @@ outputs:
shell:
str_replace:
template: >
curl -k -v --silent --fail -u $ODL_USERNAME:$ODL_PASSWORD
curl -k -v --silent --fail --show-error -u $ODL_USERNAME:$ODL_PASSWORD
-H "Content-Type: application/json" -X DELETE
$ODL_URI/restconf/config/genius-mdsalutil:config;
curl -k -v --silent --fail -u $ODL_USERNAME:$ODL_PASSWORD
curl -k -v --silent --fail --show-error -u $ODL_USERNAME:$ODL_PASSWORD
-H "Content-Type: application/json" -X POST
$ODL_URI/restconf/config/genius-mdsalutil:config
-d "{ "upgradeInProgress": false }"
@ -229,6 +229,7 @@ outputs:
$ODL_PASSWORD: {get_attr: [OpenDaylightBase, role_data, config_settings, 'opendaylight::password']}
$ODL_URI: {get_param: [EndpointMap, OpenDaylightInternal, uri]}
when: step|int == 0
run_once: true
- when: step|int == 1
import_role:
name: tripleo-docker-rm