From 05e235859dc5a062e96ca8a49b44abf3f5635dbd Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 24 Oct 2018 10:25:05 +0100 Subject: [PATCH] MNAIO: Implement branch var for pinning Ansible & Plugins Due to [1] the task 'Create data cinder-volumes group' is currently failing when run on a restored image due to the idempotence failure. In this patch we enable pinning the requirements file and plugins repo to a different OSA branch, and set it to stable/rocky which is currently pinned to Ansible 2.5.10 and does not exhibit this issue. [1] https://github.com/ansible/ansible/issues/47301 Change-Id: Id0f98f3ea0f53173dae800d45f1a4554c8a0c38a --- multi-node-aio/bootstrap.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/multi-node-aio/bootstrap.sh b/multi-node-aio/bootstrap.sh index 309e61e2..3307f8f1 100755 --- a/multi-node-aio/bootstrap.sh +++ b/multi-node-aio/bootstrap.sh @@ -18,6 +18,14 @@ set -euo BINDEP_FILE=${BINDEP_FILE:-bindep.txt} +# We use the OSA branch variable to pin both the plugins +# and the ansible version used to work together. +# TODO(odyssey4me): +# Switch this to use the master branch once the following +# bug is fixed. +# https://github.com/ansible/ansible/issues/47301 +export OSA_DEPS_BRANCH=${OSA_DEPS_BRANCH:-stable/rocky} + source /etc/os-release || source /usr/lib/os-release case "${ID,,}" in @@ -84,7 +92,7 @@ if [[ ${#BINDEP_PKGS} > 0 ]]; then fi # Install latest OSA supported Ansible version -sudo pip install -r https://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt +sudo pip install -r https://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt?h=${OSA_DEPS_BRANCH} # Get the latest OSA plugins # This is used to allow access from the MNAIO host to @@ -92,5 +100,5 @@ sudo pip install -r https://git.openstack.org/cgit/openstack/openstack-ansible-t # do execute things from infra1. mkdir -p ~/.ansible if [[ ! -d ~/.ansible/plugins ]]; then - git clone https://git.openstack.org/openstack/openstack-ansible-plugins ~/.ansible/plugins + git clone -b ${OSA_DEPS_BRANCH} https://git.openstack.org/openstack/openstack-ansible-plugins ~/.ansible/plugins fi