Comment 5 for bug 1765411

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