From b83bb6ed09575d79dd7c76c20b08c8766b1e2984 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 18 Sep 2017 13:14:14 +0100 Subject: [PATCH] Upgrade docker SDK for python during overcloud host upgrade Kolla-ansible requires use of the docker python package, which is incompatible with the legacy docker-py python package. We install the former and remove the latter. --- ansible/overcloud-docker-sdk-upgrade.yml | 18 ++++++++++++++++++ kayobe/cli/commands.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ansible/overcloud-docker-sdk-upgrade.yml diff --git a/ansible/overcloud-docker-sdk-upgrade.yml b/ansible/overcloud-docker-sdk-upgrade.yml new file mode 100644 index 000000000..c52138a86 --- /dev/null +++ b/ansible/overcloud-docker-sdk-upgrade.yml @@ -0,0 +1,18 @@ +--- +- name: Ensure docker SDK for python is installed + hosts: overcloud + tasks: + # Docker renamed their python SDK from docker-py to docker in the 2.0.0 + # release, and also broke backwards compatibility. Kolla-ansible requires + # docker, so ensure it is installed. + - name: Ensure legacy docker-py python package is uninstalled + pip: + name: docker-py + state: absent + become: True + + - name: Ensure docker SDK for python is installed + pip: + name: docker + state: latest + become: True diff --git a/kayobe/cli/commands.py b/kayobe/cli/commands.py index 84b89b494..e397f9782 100644 --- a/kayobe/cli/commands.py +++ b/kayobe/cli/commands.py @@ -490,7 +490,7 @@ class OvercloudHostUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, def take_action(self, parsed_args): self.app.LOG.debug("Upgrading overcloud host services") playbooks = _build_playbook_list( - "overcloud-etc-hosts-fixup") + "overcloud-docker-sdk-upgrade", "overcloud-etc-hosts-fixup") self.run_kayobe_playbooks(parsed_args, playbooks)