From 5a8950c706ea1dd850fa2c22ca05c94f60ff3cf8 Mon Sep 17 00:00:00 2001 From: Michel Peterson Date: Wed, 9 Jan 2019 17:38:13 +0200 Subject: [PATCH] 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 --- docker/services/opendaylight-api.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/services/opendaylight-api.yaml b/docker/services/opendaylight-api.yaml index f3a2f8e195..e2ffe18c3e 100644 --- a/docker/services/opendaylight-api.yaml +++ b/docker/services/opendaylight-api.yaml @@ -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