No module named oslo_config

Bug #1765411 reported by Nick Dusek
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kolla-ansible
Expired
Undecided
Unassigned

Bug Description

OS: CentOS Linux 7.4.1708
OpenStack release: Pike
Ansible version: 2.4.3.0
Python version: 2.7.5

When running `kolla-ansible -i ./multinode deploy` I receive the following error during execution of the `/usr/share/kolla-ansible/ansible/roles/mariadb/tasks/config.yml` playbook:

    ERROR! Unexpected Exception, this is probably a bug: No module named oslo_config

I will provide the verbose output using -vvv in an attachment. I don't really understand the purpose/role of oslo_config, just that it is provided by pip. I have tried running the following to upgrade the package but nothing has resolved the error.

    sudo pip install [oslo_config/oslo.config]
    sudo pip install --ignore-installed [oslo.config/oslo_config]
    sudo yum install python2-oslo-config

Furthermore, after each of these operations, I have launched a Python shell and tested `import oslo_config` and no errors are thrown. `kolla-ansible -i ./multinode [boostrap-servers/prechecks]` are both passing as well.

The way the error message is worded seems to suggest that it is a known bug, so any help that could be provided would be much appreciated.

Thank you

Tags: centos pike
Revision history for this message
Nick Dusek (ndusek) wrote :

Found a fix for this that got me through the deployment successfully, but I'm not sure why pip doesn't take care of this as part of the dependency resolution for kolla-ansible.

I ended up installing ansible and kolla-ansible in a virtualenv as recommended by the documentation, but that in itself doesn't take care of the oslo.config issue. I had to dig up the oslo.config release notes (https://docs.openstack.org/releasenotes/oslo.config/index.html) and find the version corresponding to the correct OpenStack release. So for Queens, this would be 5.2.0. Then in virtualenv, install this specific version:

`pip install -U 'oslo.config==5.2.0'`

Revision history for this message
Sebastian (cpdev) wrote :

same Problem:
OS: Ubuntu 16.04
OpenStack release: queens
Ansible version: 2.5.4.0
Python version: 2.7.13

Workaround does not work

Revision history for this message
Sebastian (cpdev) wrote :

Does anyone have a working config?
OS: ??
OpenStack release: ??
Ansible version: ??
Python version: ??

Revision history for this message
JD Lester (jdlester8) wrote :

I got mine to work by removing system packages:
$ cd kolla-ansible
# pip uninstall -r requirements.txt

Then creating a virtualenv
(kolla-ansible) $ pip install -r requirements.txt
(kolla-ansible) $ pip install ansible
(kolla-ansible) $ python setup.py install
(kolla-ansible) $ kolla-ansible -i multinode deploy

Revision history for this message
Brian Walsh (bwalsh) wrote :

I ran into this problem. It seems there are issues with running kolla-ansible within a virtualenv.

My initial setup:

$ pip install --user ansible
$ pip install --user virtualenv
$ virtualenv kolla-ansible
$ source kolla-ansible/bin/activate
(kolla-ansible) $ pip install kolla-ansible
...
(kolla-ansible) $ kolla-ansible -i multinode deploy
...
ERROR! Unexpected Exception, this is probably a bug: No module named oslo_config

This was while trying to install rocky. Had a different error while trying to install queens (could not find netaddr).

To fix both of the errors (queens/rocky) I had to install two python packages outside of the virtualenv even though they were already installed in the virtualenv.

$ pip install --user netaddr oslo_config

$ pip freeze --user
ansible==2.7.1
Babel==2.6.0
bcrypt==3.1.4
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
debtcollector==1.20.0
funcsigs==1.0.2
Jinja2==2.10
MarkupSafe==1.1.0
netaddr==0.7.19
oslo.config==6.7.0
oslo.i18n==3.22.1
paramiko==2.4.2
pbr==5.1.1
pyasn1==0.4.4
pycparser==2.19
PyNaCl==1.3.0
pytz==2018.7
PyYAML==3.13
requests==2.20.1
rfc3986==1.1.0
stevedore==1.30.0
urllib3==1.24.1
virtualenv==16.1.0
wrapt==1.10.11

(kolla-ansible) $ pip freeze
asn1crypto==0.24.0
Babel==2.6.0
backports.ssl-match-hostname==3.5.0.1
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
cryptography==2.3.1
debtcollector==1.20.0
docker==3.5.1
docker-pycreds==0.3.0
enum34==1.1.6
funcsigs==1.0.2
idna==2.7
ipaddress==1.0.22
iso8601==0.1.12
Jinja2==2.10
kolla-ansible==7.0.0
MarkupSafe==1.1.0
monotonic==1.5
netaddr==0.7.19
netifaces==0.10.7
oslo.config==6.7.0
oslo.i18n==3.22.1
oslo.utils==3.37.1
pbr==5.1.1
pycparser==2.19
pyparsing==2.3.0
pytz==2018.7
PyYAML==3.13
requests==2.20.0
rfc3986==1.1.0
six==1.11.0
stevedore==1.30.0
urllib3==1.24.1
websocket-client==0.54.0
wrapt==1.10.11

OS: Ubuntu 18.04 (using Ubuntu 16.04 for openstack nodes)
OpenStack release: Rocky
Ansible version: 2.7.1
Python version: 2.7.15rc1

Revision history for this message
Yongfeng Du (dolpherdu) wrote :

Just ran into this problem in virtualenv.
"pip install ansible"
in the virtualenv fixed this.
Previous I'm using the ansible installed by "yum install ansible" outside of venv.

Revision history for this message
Mark Goddard (mgoddard) wrote :

Yongfenf Du, could you provide the versions of Ansible you were using, and your OS?

Tom Fifield (fifieldt)
Changed in kolla-ansible:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for kolla-ansible because there has been no activity for 60 days.]

Changed in kolla-ansible:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.