Bug 1465724 - [trello_c6iI8map] Cannot deploy metrics with oc cluster up
[trello_c6iI8map] Cannot deploy metrics with oc cluster up
Product: OpenShift Container Platform
Classification: Red Hat
Component: Metrics (Show other bugs)
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Luke Meyer
Dongbo Yan
: Regression
Depends On:
  Show dependency treegraph
Reported: 2017-06-27 22:55 EDT by Dongbo Yan
Modified: 2017-08-16 15 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-12 14:38:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 1 Luke Meyer 2017-07-05 10:19:57 EDT
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
(app-root)which 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 18:34:58 EDT
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 12:44:10 EDT
public PR is https://github.com/openshift/openshift-ansible/pull/4715
Comment 9 openshift-github-bot 2017-07-12 06:37:55 EDT
Commit pushed to master at https://github.com/openshift/openshift-ansible

OCP build: fix bug 1465724

Use the provided ansible.cfg and hack needed python system libs into SCL
Comment 10 Luke Meyer 2017-07-12 14:38:10 EDT
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.