devstack mitaka installation fails with error "Running setup.py bdist_wheel for libvirt-python: finished with status 'error'" in Ubuntu 16.10

Bug #1636567 reported by Srinivas
80
This bug affects 16 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
Jesse Pretorius
devstack
Opinion
Undecided
Unassigned

Bug Description

devstack mitaka installation fails with error "Running setup.py bdist_wheel for libvirt-python: finished with status 'error'" in Ubuntu 16.10.

Attached are the stack log files.

Revision history for this message
Srinivas (rsrini) wrote :
Revision history for this message
Ian Wienand (iwienand) wrote :

It seems that the version of libvirt-python in requirements/upper-constraints.txt for mikata is 1.3.2 which does not work with the version of libvirt present in Ubuntu 16.10 [1]

I think the solution here is to use trusty for mikata branch. You could try proposing a bump to to version in [2] but i'm not sure if it would be accepted for this.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822384
[2] http://git.openstack.org/cgit/openstack/requirements/tree/upper-constraints.txt?h=stable/mitaka#n171

Changed in devstack:
status: New → Invalid
Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :
Download full text (4.7 KiB)

i am also seeing the error in centos7 since a couple of days ago when they updated libvirt libvirt-devel version to 2.0.0-10.el7_3.2

SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite /usr/bin/pip install -c /opt/stack/new/requirements/upper-constraints.txt 'libvirt-python>=1.2.5'
2016-12-12 19:15:56.726 | Ignoring dnspython3: markers "python_version=='3.4'" don't match your environment
2016-12-12 19:15:57.013 | Collecting libvirt-python===1.3.0 (from -c /opt/stack/new/requirements/upper-constraints.txt (line 159))
2016-12-12 19:15:57.275 | Downloading libvirt-python-1.3.0.tar.gz (171kB)
2016-12-12 19:15:59.470 | Building wheels for collected packages: libvirt-python
2016-12-12 19:15:59.471 | Running setup.py bdist_wheel for libvirt-python
2016-12-12 19:16:00.881 | Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-iha10m/libvirt-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp3I6DlEpip-wheel-:
2016-12-12 19:16:00.881 | running bdist_wheel
2016-12-12 19:16:00.881 | running build
2016-12-12 19:16:00.881 | /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
2016-12-12 19:16:00.881 | /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
2016-12-12 19:16:00.881 | Found 413 functions in /usr/share/libvirt/api/libvirt-api.xml
2016-12-12 19:16:00.881 | Found 0 functions in libvirt-override-api.xml
2016-12-12 19:16:00.882 | Generated 341 wrapper functions
2016-12-12 19:16:00.882 | Missing type converters:
2016-12-12 19:16:00.882 | virTypedParameterPtr:1
2016-12-12 19:16:00.882 | virTypedParameterPtr *:2
2016-12-12 19:16:00.882 | virConnectStoragePoolEventGenericCallback:1
2016-12-12 19:16:00.882 | ERROR: failed virConnectStoragePoolEventRegisterAny
2016-12-12 19:16:00.882 | ERROR: failed virDomainGetGuestVcpus
2016-12-12 19:16:00.882 | ERROR: failed virDomainGetPerfEvents
2016-12-12 19:16:00.882 | ERROR: failed virDomainSetPerfEvents
2016-12-12 19:16:00.882 | error: command '/usr/bin/python' failed with exit status 1
2016-12-12 19:16:00.882 |
2016-12-12 19:16:00.882 | ----------------------------------------
2016-12-12 19:16:00.882 | Failed building wheel for libvirt-python
2016-12-12 19:16:00.882 | Failed to build libvirt-python
2016-12-12 19:16:00.884 | Installing collected packages: libvirt-python
2016-12-12 19:16:00.884 | Running setup.py install for libvirt-python
2016-12-12 19:16:02.269 | Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-iha10m/libvirt-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zYmUO3-record/install-record.txt --single-version-externally-managed --compile:
2016-12-12 19:16:02.269 | running install
2016-12-12 19:16:02.269 | running build
2016-12-12 19:16:02.269 | /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
2016-12-12 19:16:02.269 | /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
2016-12-12 19:16:02.270 | Found 413 funct...

Read more...

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

this also applies to stable/liberty branch

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :
Changed in devstack:
status: Invalid → Confirmed
Jerry Zhao (zhaoxinyu)
Changed in devstack:
status: Confirmed → Opinion
Revision history for this message
mengalong (mengalong) wrote :

I'm also met this error when I try to use devstack-stable/mitaka install openstack on Centos7.
I find that the patch [1] haven't been accepted.

I want to know how to solve this error when we use devstack-stalbe/mitaka version to install openstack on Centos7 ?

[1] http://git.openstack.org/cgit/openstack/requirements/tree/upper-constraints.txt?h=stable/mitaka#n171

Revision history for this message
Nataraj (natarajpatra) wrote :
Download full text (4.1 KiB)

log file while installation :

Ignoring dnspython3: markers 'python_version == "3.4"' don't match your environment
Collecting libvirt-python===1.3.2 (from -c /opt/stack/requirements/upper-constraints.txt (line 174))
  Using cached libvirt-python-1.3.2.tar.gz
Building wheels for collected packages: libvirt-python
  Running setup.py bdist_wheel for libvirt-python ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xh_FLM/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpOCRHinpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
  /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
  Found 413 functions in /usr/share/libvirt/api/libvirt-api.xml
  Found 0 functions in libvirt-override-api.xml
  Generated 341 wrapper functions
  Missing type converters:
  virTypedParameterPtr:1
  virTypedParameterPtr *:2
  virConnectStoragePoolEventGenericCallback:1
  ERROR: failed virConnectStoragePoolEventRegisterAny
  ERROR: failed virDomainGetGuestVcpus
  ERROR: failed virDomainGetPerfEvents
  ERROR: failed virDomainSetPerfEvents
  error: command '/usr/bin/python' failed with exit status 1

  ----------------------------------------
  Failed building wheel for libvirt-python
  Running setup.py clean for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
  Running setup.py install for libvirt-python ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xh_FLM/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q2WT4g-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
    Found 413 functions in /usr/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 341 wrapper functions
    Missing type converters:
    virTypedParameterPtr:1
    virTypedParameterPtr *:2
    virConnectStoragePoolEventGenericCallback:1
    ERROR: failed virConnectStoragePoolEventRegisterAny
    ERROR: failed virDomainGetGuestVcpus
    ERROR: failed virDomainGetPerfEvents
    ERROR: failed virDomainSetPerfEvents
    error: command '/usr/bin/python' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xh_FLM/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q2WT4g-record/install-record.txt --single-version-externally-managed --compile" fail...

Read more...

Revision history for this message
Andy Hui (yahudev) wrote :

Encountering this issue as well, even using stable/newton branch. Any advise?

Revision history for this message
Mr Okpoyo (unana-okpoyo) wrote :

I ran into the same issue stacking in stable/newton in Ubuntu 16. Fixed it by running the following commands before running stack.sh. Hope it helps

sudo apt-get remove --purge -y libvirt*
sudo pip uninstall libvirt-python
sudo apt-get install -y libvirt0=1.3.1-1ubuntu10.10 libvirt-bin=1.3.1-1ubuntu10.10 libvirt-dev:amd64=1.3.1-1ubuntu10.10

Revision history for this message
Karl Kloppenborg (karlkloppenborg) wrote :
Download full text (89.5 KiB)

Confirmed stable/ocata.
Upgrading newton->ocata and repo scripts failing.

@unana-okpoyo's changes work by downgrading but the ansible scripts detect and upgrade this.

Any fix for OpenStack-Ansible?

---- LIBVIRTD FAILED ----
root@controller2:/home/karl# lxc-attach -n `lxc-ls repo`
root@controller2-repo-container-3b68e60b:/# libvirtd --version
libvirtd (libvirt) 2.5.0
root@controller2-repo-container-3b68e60b:/#
-----------------

---UNinstall and apt get pinned version ----
root@controller2-repo-container-3b68e60b:/# apt-get remove --purge -y libvirt*
root@controller2-repo-container-3b68e60b:/# apt-get install -y libvirt0=1.3.1-1ubuntu10.10 libvirt-bin=1.3.1-1ubuntu10.10 libvirt-dev:amd64=1.3.1-1ubuntu10.10

----- Now working until I run ansible again ---
pip wheel --timeout 120 --wheel-dir /tmp/openstack-wheel-output --find-links /var/www/repo/links --find-links /tmp/openstack-wheel-output --constraint /var/www/repo/os-releases/15.1.6/ubuntu-16.04-x86_64/requirements_constraints.txt --no-binary libvirt-python --build /tmp/openstack-builder --log /var/log/repo/repo_builder.log libvirt_python
----

---
Run and works:

---- DUMP ----
Ignoring dnspython3: markers 'python_version == "3.4"' don't match your environment
Ignoring dnspython3: markers 'python_version == "3.5"' don't match your environment
Ignoring ovs: markers 'python_version == "3.4"' don't match your environment
Ignoring ovs: markers 'python_version == "3.5"' don't match your environment
Setting libvirt_python<=2.1.0 (from -c /var/www/repo/os-releases/15.1.6/ubuntu-16.04-x86_64/requirements_constraints.txt (line 217)) extras to: ()
Collecting libvirt_python<=2.1.0 (from -c /var/www/repo/os-releases/15.1.6/ubuntu-16.04-x86_64/requirements_constraints.txt (line 217))
  1 location(s) to search for versions of libvirt-python:
  * https://pypi.python.org/simple/libvirt-python/
  Skipping link /var/www/repo/links (from -f); not a file
  Skipping link /tmp/openstack-wheel-output (from -f); not a file
  Getting page https://pypi.python.org/simple/libvirt-python/
  Analyzing links from page https://pypi.python.org/simple/libvirt-python/
    Found link https://pypi.python.org/packages/1b/6e/50400e9285e3e298dd59204b503a1f95cc5a66411029ffbc779bdb4a0225/libvirt-python-3.2.0.tar.gz#md5=500731d03c1ac8355021e34e037337df (from https://pypi.python.org/simple/libvirt-python/), version: 3.2.0
    Found link https://pypi.python.org/packages/1e/f3/5376c7293d24eadc1152cd4dc93e3579010c9bcf242026224b54e1a98323/libvirt-python-1.2.1.tar.gz#md5=e1effd6007b2ebd5d024c6c3838456fb (from https://pypi.python.org/simple/libvirt-python/), version: 1.2.1
    Found link https://pypi.python.org/packages/24/2f/2e7eba7930cca48f0dee03c212deace86117ea663162dea0dfaa921d26bf/libvirt-python-1.2.4.tar.gz#md5=fbcb68f898390b321cbfcbdaa8d0c1ba (from https://pypi.python.org/simple/libvirt-python/), version: 1.2.4
    Found link https://pypi.python.org/packages/25/2b/7ea1b87afa0c25ac74fba9a4b6f0cfd9d7858724db7636f0d64878f21136/libvirt-python-1.2.7.tar.gz#md5=a5ca2b1ed4ea6ef2d0243907b553c39a (from https://pypi.python.org/simple/libvirt-python/), version: 1.2.7
    Found link https://pypi.python.org/packages/39/2a/f9608862a06268...

Revision history for this message
Arun S A G (sagarun) wrote :

I am running stable/ocata branch. This affects RHEL/Centos 7 as well, with the latest RPMs it is failing to build libvirt-python 2.5, Any workarounds?

rpm -qa|grep libvirt
libvirt-daemon-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-network-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-logical-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-config-nwfilter-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-interface-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-rbd-3.2.0-14.el7_4.2.x86_64
libvirt-python-3.2.0-3.el7.x86_64
libvirt-daemon-driver-nodedev-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-config-network-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-disk-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-secret-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-lxc-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-core-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-scsi-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-mpath-3.2.0-14.el7_4.2.x86_64
libvirt-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-kvm-3.2.0-14.el7_4.2.x86_64
libvirt-client-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-iscsi-3.2.0-14.el7_4.2.x86_64
libvirt-devel-3.2.0-14.el7_4.2.x86_64
libvirt-libs-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-gluster-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-nwfilter-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-qemu-3.2.0-14.el7_4.2.x86_64
libvirt-daemon-driver-storage-3.2.0-14.el7_4.2.x86_64

Revision history for this message
Abel Lopez (al592b) wrote :

Same error in stable/ocata on RHEL 7

Revision history for this message
Arun S A G (sagarun) wrote :

@abel Looks like this is a catch all bug. We probably need to open a separate one.

Revision history for this message
Silvia (fichera-sil) wrote :
Download full text (4.3 KiB)

Installation with devstack stable/newton.
Previously I had a stable/ocata successfully installed, but ocata does not work with networking-onos (that I need)

+inc/python:pip_install:155 sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS= SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite /usr/local/bin/pip2.7 install -c /opt/stack/requirements/upper-constraints.txt 'libvirt-python>=1.2.5'
Ignoring dnspython3: markers 'python_version == "3.4"' don't match your environment
Ignoring dnspython3: markers 'python_version == "3.5"' don't match your environment
Ignoring ovs: markers 'python_version == "3.4"' don't match your environment
Ignoring ovs: markers 'python_version == "3.5"' don't match your environment
Collecting libvirt-python===2.1.0 (from -c /opt/stack/requirements/upper-constraints.txt (line 169))
  Using cached libvirt-python-2.1.0.tar.gz
Building wheels for collected packages: libvirt-python
  Running setup.py bdist_wheel for libvirt-python ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-RDhOrt/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpFBK5arpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
  /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
  Found 415 functions in /usr/share/libvirt/api/libvirt-api.xml
  Found 0 functions in libvirt-override-api.xml
  Generated 344 wrapper functions
  Missing type converters:
  virConnectNodeDeviceEventGenericCallback:1
  ERROR: failed virConnectNodeDeviceEventRegisterAny
  error: command '/usr/bin/python' failed with exit status 1

  ----------------------------------------
  Failed building wheel for libvirt-python
  Running setup.py clean for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
  Running setup.py install for libvirt-python ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-RDhOrt/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-AxO6nQ-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
    Found 415 functions in /usr/share/libvirt/api/libvirt-api.xml
    Found 0 functions in libvirt-override-api.xml
    Generated 344 wrapper functions
    Missing type converters:
    virConnectNodeDeviceEventGenericCallback:1
    ERROR: failed virConnectNodeDeviceEventRegisterAny
    error: command '/usr/bin/python' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-RDhOrt/libvirt-python/setup.py';f=getattr(tokenize, 'open', ...

Read more...

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

We're seeing this consistently with our periodic tests and getting feedback from our users. Their feedback is that using 'libvirt-python==3.5.0' instead of the Ocata upper-constraint of 'libvirt-python==2.5.0' resolves the issue.

For OSA users the workaround is to use the following override in /etc/openstack_deploy/user_variables.yml:
repo_build_upper_constraints_overrides:
  - "libvirt-python==3.5.0"

As a solution, if need be, we may have to add this to global-requirement-pins.txt for Ocata:
libvirt-python==3.5.0

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

FYI, I marked https://bugs.launchpad.net/openstack-ansible/+bug/1730314 a duplicate of this bug as this one was reported first and has more reports in it.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

In OSA we've worked around this by simplify using the host package version of libvirt-python: https://review.openstack.org/#/q/Id962efe16c425424715409f071c4a304f8416001

Changed in openstack-ansible:
assignee: nobody → Jesse Pretorius (jesse-pretorius)
status: Confirmed → Fix Released
Revision history for this message
Muhammad Awais (awais940) wrote :

Hi,

I am facing issue to the OpenStack AIO installation. I have run the script (openstack-ansible setup-infrastructure.yml) and facing below error, please advise.

TASK [repo_build : Download requirement pip sources] ****************************************************************************************************************************************

TASK [repo_build : Create OpenStack-Ansible requirement wheels] *****************************************************************************************************************************
fatal: [aio1_repo_container-7d52049f]: FAILED! => {"changed": true, "cmd": "set -o pipefail; /openstack/venvs/repo-build-19.0.0.0b1/bin/pip wheel --timeout 120 --wheel-dir /tmp/openstack-wheel-output --find-links /var/www/repo/links --find-links /tmp/openstack-wheel-output --constraint /var/www/repo/os-releases/19.0.0.0b1/centos-7.5-x86_64/requirements_constraints.txt --no-binary libvirt-python --index-url https://pypi.python.org/simple --trusted-host pypi.python.org --extra-index-url http://mirror.lon1.citycloud.openstack.org/wheel/centos-7-x86_64/ --trusted-host mirror.lon1.citycloud.openstack.org --build /tmp/openstack-builder --requirement /var/www/repo/os-releases/19.0.0.0b1/centos-7.5-x86_64/requirements.txt 2>&1 | ts > /var/log/repo/wheel_build.log", "delta": "0:00:41.197559", "end": "2018-09-14 13:30:58.458624", "msg": "non-zero return code", "rc": 1, "start": "2018-09-14 13:30:17.261065", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

NO MORE HOSTS LEFT **************************************************************************************************************************************************************************

PLAY RECAP **********************************************************************************************************************************************************************************
aio1_repo_container-7d52049f : ok=88 changed=8 unreachable=0 failed=1
localhost : ok=1 changed=0 unreachable=0 failed=0

EXIT NOTICE [Playbook execution failure] **************************************
===============================================================================

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

@Muhammed This is an old bug which is closed. I'd suggest registering a new bug, but take a look at /var/log/repo/wheel_build.log in the repo container and it should tell you what failed to build which will give you a clue. I'd also suggest joining the #openstack-ansible IRC channel on Freenode as it's a little easier to help troubleshooting in an active conversation.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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