nova fails with error: 'module' object has no attribute 'VIR_MIGRATE_POSTCOPY' after using libvirt 2.5.0 from UCA
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Development Infrastructure |
New
|
Undecided
|
Unassigned |
Bug Description
commit https:/
===
2017-04-13 19:17:26.927 9868 DEBUG oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
2017-04-13 19:17:27.302 9868 ERROR oslo_service.
====
some example logs:
http://
http://
Changed in nova: | |
assignee: | nobody → Sam Wan (sam-wan) |
affects: | nova → openstack-devel |
Changed in openstack-devel: | |
assignee: | Sam Wan (sam-wan) → nobody |
It turns out to be some issue with local cached libvirt-python.
devstack uses 'sudo -H' to install pip package
------
./inc/python: local sudo_pip="sudo -H"
------
with '-H', pip will try to use the local cached version. In this case, it uses /root/.cache/pip/ SYS_PATH_ TECHNIQUE= rewrite /usr/local/ bin/pip2. 7 install -c /opt/stack/ new/requirement s/upper- constraints. txt 'libvirt- python> =1.2.5' 2>/dev/null python= ==3.2.0 (from -c /opt/stack/ new/requirement s/upper- constraints. txt (line 224)) python- 3.2.0 libvirt. VIR_MIGRATE_ POSTCOPY' POSTCOPY'
Somehow for this case, there's something wrong with local cached version.
------
~> sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_
Collecting libvirt-
Installing collected packages: libvirt-python
Successfully installed libvirt-
sam@cdh3h6:~> python -c 'import libvirt;
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'VIR_MIGRATE_
~>
------
but if we tell pip to disable the cache with '--no-cache-dir', we won't run into this issue. SYS_PATH_ TECHNIQUE= rewrite /usr/local/ bin/pip2. 7 install --no-cache-dir -c /opt/stack/ new/requirement s/upper- constraints. txt 'libvirt- python> =1.2.5' 2>/dev/null python= ==3.2.0 (from -c /opt/stack/ new/requirement s/upper- constraints. txt (line 224)) python- 3.2.0.tar. gz (174kB) ####### ####### ####### #####| 184kB 324kB/s python- 3.2.0 libvirt. VIR_MIGRATE_ POSTCOPY'
------
~> sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_
Collecting libvirt-
Downloading libvirt-
100% |######
Installing collected packages: libvirt-python
Running setup.py install for libvirt-python ... done
Successfully installed libvirt-
~> python -c 'import libvirt;
------
would suggest to disable the cable when devstack install pip packages.