Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

broken since: " become in global pip " bbe1a4b, since on undercloud root can't "see" the pip executable #1

Open
pinikomarov opened this issue Jan 12, 2022 · 2 comments

Comments

@pinikomarov
Copy link

ERROR :

TASK [tripleo_inventory : Install virtualenv module] ******************************************
fatal: [localhost -> undercloud-0]: FAILED! => {"changed": false, "msg": "Unable to find any of pip3 to use. pip needs to be installed."}

This is because : root can't see the pip executable (as a security measure so as to not overwrite system py libs ?)
on live env:
[stack@undercloud-0 ~]$ cat core_puddle_version
RHOS-16.2-RHEL-8-20211129.n.1[stack@undercloud-0 ~]$ whoami;which pip
stack
~/.local/bin/pip
[stack@undercloud-0 ~]$ sudo -i
[root@undercloud-0 ~]# whoami;which pip
root
/usr/bin/which: no pip in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@undercloud-0 ~]#

this Issue is fixed when I comment out :
the become: true in :
bbe1a4b#diff-06fefd59474e191c1867d84f9744f88b91570dd2da3e2c7cca0c3cf0ba50d0c5

  • name: Install virtualenv module
    vars:
    packages: "{%- if hostvars[groups['undercloud'][0]]['ansible_python']['version']['major'] == 2 -%}
    virtualenv==16.7.9
    {%- else -%}
    setuptools, virtualenv
    {%- endif -%}"
    pip:
    name: "{{ packages }}"
    #become: true

@eshulman2 can you take a look at this ? I think this blocks the tripleo-inventory plugin

@vkhitrin
Copy link

@pinikomarov We have fixed this with https://review.gerrithub.io/c/rhos-infra/tripleo-inventory/+/531367 but we're having sync issues between Gerrit and GitHub.

@vkhitrin
Copy link

@pinikomarov Apologies but we were not able to fix sync issues and GerritHub not always willing to help because we're not enterprise customers.
We're moving to https://github.com/rhos-infra/tripleo-clouds-inventory.
I will fix this issue there and will update all of our infrared/rhos components.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants