From 4e5170fb4085355bcfcc25b74e9acd118587998a Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 28 Aug 2018 18:53:43 +0200 Subject: [PATCH] Clarify that uninstalling docker-py can break docker (and vice versa). (#43238) --- lib/ansible/module_utils/docker_common.py | 3 ++- lib/ansible/modules/cloud/docker/docker_container.py | 4 +++- lib/ansible/modules/cloud/docker/docker_image.py | 4 +++- lib/ansible/modules/cloud/docker/docker_image_facts.py | 4 +++- lib/ansible/modules/cloud/docker/docker_login.py | 4 +++- lib/ansible/modules/cloud/docker/docker_network.py | 4 +++- lib/ansible/modules/cloud/docker/docker_service.py | 4 +++- lib/ansible/modules/cloud/docker/docker_volume.py | 4 +++- 8 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lib/ansible/module_utils/docker_common.py b/lib/ansible/module_utils/docker_common.py index 75c2402da76..41e61ee84d5 100644 --- a/lib/ansible/module_utils/docker_common.py +++ b/lib/ansible/module_utils/docker_common.py @@ -167,7 +167,8 @@ class AnsibleDockerClient(Client): if HAS_DOCKER_MODELS and HAS_DOCKER_SSLADAPTER: self.fail("Cannot have both the docker-py and docker python modules installed together as they use the same namespace and " "cause a corrupt installation. Please uninstall both packages, and re-install only the docker-py or docker python " - "module. It is recommended to install the docker module if no support for Python 2.6 is required.") + "module. It is recommended to install the docker module if no support for Python 2.6 is required. " + "Please note that simply uninstalling one of the modules can leave the other module in a broken state.") if not HAS_DOCKER_PY: self.fail("Failed to import docker or docker-py - %s. Try `pip install docker` or `pip install docker-py` (Python 2.6)" % HAS_DOCKER_ERROR) diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py index 98da826bb0a..c49092c7f30 100644 --- a/lib/ansible/modules/cloud/docker/docker_container.py +++ b/lib/ansible/modules/cloud/docker/docker_container.py @@ -422,7 +422,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "Docker API >= 1.20" ''' diff --git a/lib/ansible/modules/cloud/docker/docker_image.py b/lib/ansible/modules/cloud/docker/docker_image.py index bc8e1f29c66..886326c9094 100644 --- a/lib/ansible/modules/cloud/docker/docker_image.py +++ b/lib/ansible/modules/cloud/docker/docker_image.py @@ -173,7 +173,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "Docker API >= 1.20" author: diff --git a/lib/ansible/modules/cloud/docker/docker_image_facts.py b/lib/ansible/modules/cloud/docker/docker_image_facts.py index 474cf09af63..85a7c7ba0dc 100644 --- a/lib/ansible/modules/cloud/docker/docker_image_facts.py +++ b/lib/ansible/modules/cloud/docker/docker_image_facts.py @@ -41,7 +41,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "Docker API >= 1.20" author: diff --git a/lib/ansible/modules/cloud/docker/docker_login.py b/lib/ansible/modules/cloud/docker/docker_login.py index cadb2459d90..1bcaa1d38c1 100644 --- a/lib/ansible/modules/cloud/docker/docker_login.py +++ b/lib/ansible/modules/cloud/docker/docker_login.py @@ -82,7 +82,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "Docker API >= 1.20" - 'Only to be able to logout (state=absent): the docker command line utility' author: diff --git a/lib/ansible/modules/cloud/docker/docker_network.py b/lib/ansible/modules/cloud/docker/docker_network.py index 304edaf3d8c..966ed7a3002 100644 --- a/lib/ansible/modules/cloud/docker/docker_network.py +++ b/lib/ansible/modules/cloud/docker/docker_network.py @@ -101,7 +101,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "The docker server >= 1.9.0" ''' diff --git a/lib/ansible/modules/cloud/docker/docker_service.py b/lib/ansible/modules/cloud/docker/docker_service.py index 28992947d2e..15492a97a76 100644 --- a/lib/ansible/modules/cloud/docker/docker_service.py +++ b/lib/ansible/modules/cloud/docker/docker_service.py @@ -149,7 +149,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "docker-compose >= 1.7.0" - "Docker API >= 1.20" - "PyYAML >= 3.11" diff --git a/lib/ansible/modules/cloud/docker/docker_volume.py b/lib/ansible/modules/cloud/docker/docker_volume.py index 7e0ab11f22d..9b56370b353 100644 --- a/lib/ansible/modules/cloud/docker/docker_volume.py +++ b/lib/ansible/modules/cloud/docker/docker_volume.py @@ -73,7 +73,9 @@ requirements: (see L(here,https://github.com/docker/docker-py/issues/1310) for details). For Python 2.6, C(docker-py) must be used. Otherwise, it is recommended to install the C(docker) Python module. Note that both modules should I(not) - be installed at the same time." + be installed at the same time. Also note that when both modules are installed + and one of them is uninstalled, the other might no longer function and a + reinstall of it is required." - "The docker server >= 1.9.0" '''