virtualenv should really set root when it installs things

Bug #1028467 reported by Martin Gerhard Loschwitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Won't Fix
Wishlist
Monty Taylor

Bug Description

The Virtualenv in OpenStack's Jenkins installation does not correctly set the root path when installing things. This directive in setup.py:

data_files=[('/usr/lib/ocf/resource.d/openstack', ['ocf/keystone'])],

leads to Jenkins builds failing:

https://jenkins.openstack.org/job/gate-keystone-python26/515/consoleFull
https://jenkins.openstack.org/job/gate-keystone-python27/512/consoleFull

I'm not exactly sure what the correct fix for this is, but I do know that there is a --root parameter to setup.py that might come in handy.

Please don't hestitate to contact me should you need any further information.

Revision history for this message
Monty Taylor (mordred) wrote :

This is a deficiency in the virtualenv system in general. For the time being, projects are not installing things that should be installed in root/system locations and leaving that as an installation step for the packagers.

Changed in openstack-ci:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Monty Taylor (mordred)
milestone: none → folsom
Monty Taylor (mordred)
Changed in openstack-ci:
milestone: folsom → none
James E. Blair (corvus)
Changed in openstack-ci:
status: Triaged → Won't Fix
Revision history for this message
Martin Gerhard Loschwitz (martin-loschwitz) wrote :

Hey, please don't bother giving reasons for your decisions, it feels awesome to suggest an improvement and then being denied without any actual reasoning :-)

Revision history for this message
Monty Taylor (mordred) wrote :

Sorry Martin - my original comment on the bug stands, and I should have marked it wontfix instead of wishlist when I made it last year.

Virtualenv and python-based non-package-based install is mostly broken for doing things like this. In fact, I'd say that any of our projects which have a line such as:

data_files=[('/usr/lib/ocf/resource.d/openstack', ['ocf/keystone'])],

Should list that as a bug.

The best was, I believe, to handle that is to ensure that the ocf file is included in package_data (which is will be, since we do include_package_data) and then have distro packaging or config management copy the file to the right place. Python's install system just isn't designed to do it right. :(

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.