Comment 13 for bug 1829736

Revision history for this message
Alfredo Moralejo (amoralej) wrote :

Some technical details about the issue:

Yhe problem is related to PYTHONPATH and versions mess. When using ansible<2.8 to run the playbook (as in zuul-executor) but have ansible=2.8 installed in the test server it tries to import docker from /usr/lib/python2.7/site-packages/ansible/module_utils/docker/ instead of /usr/lib/python2.7/site-packages/docker.

ansible has refactored docker module to be a supbackage in https://github.com/ansible/ansible/commit/0c2bb3da043e38e779f91b6037d0999c1e60b862#diff-5f3137ef16fa6f5a89b619f82d4e6c57

This has broken it as apparently load order is wrong in previous versions of ansible. Having 2.8 in both systems works fine so it seems that loading order from paths has been fixed.

The options to get this fixed with ansible-2.8 are:

1. Update ansible to 2.8 in zuul executors. This depends on SF.
2. Remove ansible from the test server (it's installed before as part of the build-containers role which runs a nested playbook, see "TASK [build-containers : Run ansible playbook to configure docker]" in [1]).
3. Running the docker_login as a nested playbook too.

I'd say option 2 is better but i'm not sure if we could break something removing the system ansible for a later task.

[1] http://logs.rdoproject.org/openstack-periodic-master/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-centos-7-master-containers-build-push/85eee73/job-output.txt.gz