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.
This commit is contained in:
Mark Goddard 2017-09-18 13:14:14 +01:00
parent f047fbd4a9
commit b83bb6ed09
2 changed files with 19 additions and 1 deletions

View File

@ -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

View File

@ -490,7 +490,7 @@ class OvercloudHostUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
def take_action(self, parsed_args): def take_action(self, parsed_args):
self.app.LOG.debug("Upgrading overcloud host services") self.app.LOG.debug("Upgrading overcloud host services")
playbooks = _build_playbook_list( playbooks = _build_playbook_list(
"overcloud-etc-hosts-fixup") "overcloud-docker-sdk-upgrade", "overcloud-etc-hosts-fixup")
self.run_kayobe_playbooks(parsed_args, playbooks) self.run_kayobe_playbooks(parsed_args, playbooks)