From 80c1ff4071314d19a8fb70dd35e44cf54bc29c2d Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Fri, 29 Jun 2018 09:18:54 -0500 Subject: [PATCH] Gate: Fix version of ansible deployed via dev-deploy This pins the version of ansible deployed via the makefile dev-deploy directives to the version used in zuul. This was causing issues with docker, as make dev-deploy setup-host was deploying ansible 2.6. Ansible 2.6 introduces a new flag to the docker_container module (init) that is incompatible with our current roles, which resulted in observed failures in osh-infra and osh Change-Id: Ibc885b53bce77eb36817024b21efb0e99865f690 --- tools/gate/devel/start.sh | 6 +++++- tools/images/kubeadm-aio/Dockerfile | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/gate/devel/start.sh b/tools/gate/devel/start.sh index ff4ff1bd..7958e648 100755 --- a/tools/gate/devel/start.sh +++ b/tools/gate/devel/start.sh @@ -59,8 +59,12 @@ function ansible_install { # https://github.com/python-cmd2/cmd2/issues/421 sudo -H -E pip install --no-cache-dir --upgrade "cmd2<=0.8.7" sudo -H -E pip install --no-cache-dir --upgrade pyopenssl + # NOTE(srwilkers): Pinning ansible to 2.5.5, as pip installs 2.6 by default. + # 2.6 introduces a new command flag (init) for the docker_container module + # that is incompatible with what we have currently. 2.5.5 ensures we match + # what's deployed in the gates + sudo -H -E pip install --no-cache-dir --upgrade "ansible==2.5.5" sudo -H -E pip install --no-cache-dir --upgrade \ - ansible \ ara \ yq } diff --git a/tools/images/kubeadm-aio/Dockerfile b/tools/images/kubeadm-aio/Dockerfile index 2c860538..ffc77d7d 100644 --- a/tools/images/kubeadm-aio/Dockerfile +++ b/tools/images/kubeadm-aio/Dockerfile @@ -70,7 +70,12 @@ RUN set -ex ;\ hash -r ;\ pip --no-cache-dir install setuptools ;\ pip --no-cache-dir install kubernetes ;\ - pip --no-cache-dir install ansible ;\ + + # NOTE(srwilkers): Pinning ansible to 2.5.5, as pip installs 2.6 by default. + # 2.6 introduces a new command flag (init) for the docker_container module + # that is incompatible with what we have currently. 2.5.5 ensures we match + # what's deployed in the gates + pip --no-cache-dir install "ansible==2.5.5" ;\ for BINARY in kubectl kubeadm; do \ curl -sSL -o /usr/bin/${BINARY} \ https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/${BINARY} ;\