While the error message specifies `python-passlib rpm` is missing, that is not quite correct; the code actually checks that python can `import passlib` (https://github.com/openshift/openshift-ansible/blob/b7104cf8e01f94f9029a0808eb9eb2c6cb6107b2/roles/openshift_metrics/tasks/main.yaml#L2-L10). This should work fine despite the RPM actually being named `python2-passlib`. However, it doesn't. If I shell into the image: (app-root) python -c 'import passlib' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named passlib (app-root)rpm -ql python2-passlib /usr/lib/python2.7/site-packages/passlib [...] (app-root)which python /opt/app-root/bin/python (app-root)ls -l /opt/app-root/bin/python lrwxrwxrwx. 1 default root 7 Jun 15 11:05 /opt/app-root/bin/python -> python2 (app-root)/usr/bin/python -c 'import passlib' (app-root)/usr/bin/python2 -c 'import passlib' (app-root)rpm -qf /opt/app-root/bin/python2 file /opt/app-root/bin/python2 is not owned by any package (app-root)rpm -qf /opt/app-root/bin/python file /opt/app-root/bin/python is not owned by any package It seems that something is adding `/opt/app-root/bin/python{,2}` to the image (which goes to the front of the path) and that's not pulling in the system python modules. I can't immediately see what put it there though.
I've updated the dist-git Dockerfile with a change to address this problem as well as the problem I encountered in testing where ssh fails host key validation. To the extent that I've been able to test it, this seems to work. I haven't figured out how to get a scratch brew build to work so this will probably have to wait for a regularly scheduled build to test. Once that's available, I request that QE test this image running via `docker run` as described under https://github.com/openshift/openshift-ansible/blob/master/README_CONTAINER_IMAGE.md (with relevant OCP name changes). playbook/byo/config.yml with metrics deploy parameters in the inventory should exercise this code path.
public PR is https://github.com/openshift/openshift-ansible/pull/4715
Commit pushed to master at https://github.com/openshift/openshift-ansible https://github.com/openshift/openshift-ansible/commit/6ecdf0d028db1add6e07ed7461c2b55a0487b8ca OCP build: fix bug 1465724 https://bugzilla.redhat.com/show_bug.cgi?id=1465724 Use the provided ansible.cfg and hack needed python system libs into SCL
Can ignore comment #9, that's just mirroring the same change. Since this bug wasn't released, closing.