Bug 1465724

Summary: [trello_c6iI8map] Cannot deploy metrics with oc cluster up
Product: OpenShift Container Platform Reporter: Dongbo Yan <dyan>
Component: HawkularAssignee: Luke Meyer <lmeyer>
Status: CLOSED CURRENTRELEASE QA Contact: Dongbo Yan <dyan>
Severity: high Docs Contact:
Priority: high    
Version: 3.6.0CC: aos-bugs, jcantril, lmeyer, pep
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-12 18:38:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 1 Luke Meyer 2017-07-05 14:19:57 UTC
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.

Comment 4 Luke Meyer 2017-07-06 22:34:58 UTC
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.

Comment 6 Luke Meyer 2017-07-07 16:44:10 UTC
public PR is https://github.com/openshift/openshift-ansible/pull/4715

Comment 9 openshift-github-bot 2017-07-12 10:37:55 UTC
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

Comment 10 Luke Meyer 2017-07-12 18:38:10 UTC
Can ignore comment #9, that's just mirroring the same change.

Since this bug wasn't released, closing.