huliangfei / kolla-ansible-doc-zh_cn

kolla-ansible 官方文檔中文翻譯
0 stars 0 forks source link

'module' object has no attribute 'Client' #1

Open huliangfei opened 6 years ago

huliangfei commented 6 years ago

TASK [elasticsearch : Get container facts] **** fatal: [control01]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to control01 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_cFuyEJ/ansible_module_kolla_container_facts.py\", line 82, in \r\n main()\r\n File \"/tmp/ansible_cFuyEJ/ansible_module_kolla_container_facts.py\", line 64, in main\r\n client = docker.Client(version=module.params.get('api_version'))\r\nAttributeError: 'module' object has no attribute 'Client'\r\n", "msg": "MODULE FAILURE", "rc": 0} fatal: [control02]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to control02 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_SPnQKs/ansible_module_kolla_container_facts.py\", line 82, in \r\n main()\r\n File \"/tmp/ansible_SPnQKs/ansible_module_kolla_container_facts.py\", line 64, in main\r\n client = docker.Client(version=module.params.get('api_version'))\r\nAttributeError: 'module' object has no attribute 'Client'\r\n", "msg": "MODULE FAILURE", "rc": 0} fatal: [control03]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to control03 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_6GtKzd/ansible_module_kolla_container_facts.py\", line 82, in \r\n main()\r\n File \"/tmp/ansible_6GtKzd/ansible_module_kolla_container_facts.py\", line 64, in main\r\n client = docker.Client(version=module.params.get('api_version'))\r\nAttributeError: 'module' object has no attribute 'Client'\r\n", "msg": "MODULE FAILURE", "rc": 0} to retry, use: --limit @/usr/share/kolla-ansible/ansible/site.retry

PLAY RECAP **** control01 : ok=9 changed=0 unreachable=0 failed=1
control02 : ok=9 changed=0 unreachable=0 failed=1
control03 : ok=9 changed=0 unreachable=0 failed=1
manage01 : ok=5 changed=0 unreachable=0 failed=0
storage01 : ok=8 changed=0 unreachable=0 failed=0
storage02 : ok=8 changed=0 unreachable=0 failed=0
storage03 : ok=8 changed=0 unreachable=0 failed=0
storage04 : ok=8 changed=0 unreachable=0 failed=0

huliangfei commented 6 years ago

問題: kolla-ansible prechecks 報docker client錯誤 版本: kolla-ansible 4.0.2 kolla< images> 4.0.3 docker 17.06.2 docker-py 2.6.1(1.10.6)

原因: Fix the incompatible of docker-py 2.0.0
docker-py 2.0.0 is released with renaming docker.Client to docker.APIClient. and with a new python package name "docker" rather than "docker-py". This patch support docker and docker-py packages.

參考網址: https://bugs.launchpad.net/kolla/+bug/1668346