(Ubuntu) Add logic to verify presence of packages: python-dev, libxml2-dev,libxslt-dev

Bug #1225395 reported by Conte
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Raseel
tempest
Invalid
Undecided
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

Summary: (Ubuntu) Add logic to verify presence of packages: python-dev, libxml2-dev,libxslt-dev
Priority: Low
OS: Ubuntu 12.04 LTS
Scenario:
On clean machine (ubuntu 12.04 LTS) perform:
git clone https://github.com/openstack-dev/devstack.git
cd devstack && ./stack.sh

Encounter issue when pip installs test requirements:
In file included from src/lxml/lxml.etree.c:314:0:
/opt/stack/tempest/.venv/build/lxml/src/lxml/includes/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

Request:
Check presence of:
python-dev (i found it also is not installed automatically on machines without openstack)
libxml2-dev
libxslt-dev

As the script in many cases is used by novice users, it would be great to add this functionality.
And terminate the script with graceful message offering to install the packages.

Revision history for this message
Conte (vd-fallout) wrote :
Revision history for this message
Matthew Treinish (treinish) wrote :

This bug belongs in devstack it's independent of tempest.

Changed in tempest:
status: New → Invalid
Revision history for this message
DennyZhang (denny-6) wrote :

Agree with Conte, this bug is annoying. Every fresh install will encounter this problem.

Shall we document this, if it's not so difficult to fix?

I also file another bug, which is marked as duplicated with this bug: https://bugs.launchpad.net/tempest/+bug/1224155

Revision history for this message
Sean M. Collins (scollins) wrote :

Just hit this too when building another compute node.

Revision history for this message
Sean M. Collins (scollins) wrote :

http://paste.openstack.org/show/58706/

building 'greenlet' extension

creating build

creating build/temp.linux-x86_64-2.7

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -fno-tree-dominator-opts -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-x86_64-2.7/greenlet.o

In file included from greenlet.c:5:0:

greenlet.h:8:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

Revision history for this message
Sean M. Collins (scollins) wrote :

Further info - you'll see this error inside the screen that devstack creates, when it tries to start n-cpu

cd /opt/stack/nova && sg libvirtd '/usr/local/bin/nova-compute --config-file /etc/nova/nova.conf' || echo "n-cpu failed to start" | tee "/opt/stack/status/stack/n-cpu.failure"
sh: /usr/local/bin/nova-compute: No such file or directory
n-cpu failed to start

Revision history for this message
Raseel (raseel) wrote :

Wouldn't it make more sense to not bother with the verification, rather add these as general pre-requisites before installation starts.
It seems python-dev is already added as a pre-requisite and gets duly installed.
In my case, libxml2-dev and libxslt1-dev also got installed, but I wan't using my bo solely for devstack so it might have got installed due to some other dependency.
I have sent a patch with this fix for reivew :
https://review.openstack.org/171109

Changed in devstack:
assignee: nobody → Raseel (raseel)
status: New → In Progress
Revision history for this message
Raseel (raseel) wrote :

This being my first time submitting code to a Project as big as OpenStack, I've screwed up a bit.
In trying to update my patch as per comments from Jordan Pittier, I have created a new review instance at :
https://review.openstack.org/#/c/171138/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/171138
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=8c6276ea0a2332f5210fc1f16399281c083520cd
Submitter: Jenkins
Branch: master

commit 8c6276ea0a2332f5210fc1f16399281c083520cd
Author: Raseel Bhagat <email address hidden>
Date: Tue Apr 7 03:15:45 2015 +0530

    Added libxml2-dev package as a pre-requisite when installing tempest.
    This is required so that devstack can be installed on vanilla Ubuntu systems.

    Closes-Bug: 1225395

    Change-Id: Id9116e00e18c23e8e6391d8aa652c04d8bdb86c3

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
Paul White (paulw2u) wrote :

Belatedly invalidating superfluous Ubuntu task.

Changed in ubuntu:
status: New → Invalid
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

Bug attachments

Remote bug watches

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