Bug 1465724 - [trello_c6iI8map] Cannot deploy metrics with oc cluster up
Summary: [trello_c6iI8map] Cannot deploy metrics with oc cluster up
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-28 02:55 UTC by Dongbo Yan
Modified: 2017-08-16 19:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-12 18:38:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.