Installing tempest always requires root privileges

Bug #1480389 reported by Andrea Frittoli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
High
Andrea Frittoli

Bug Description

The tempest installation process now tries to deploy some files in /etc/tempest, which requires root privileges on most systems.
When installing in a virtualenv it's expected that no root privileges should be required.

This is caused by:
http://git.openstack.org/cgit/openstack/tempest/tree/setup.cfg#n25

Revision history for this message
Andrea Frittoli (andrea-frittoli) wrote :

According to http://docs.openstack.org/developer/pbr/#files the path should not start with /, pbr will make sure the relative root is used (system wide, venv wide).

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

Fix proposed to branch: master
Review: https://review.openstack.org/207994

Revision history for this message
David Kranz (david-kranz) wrote :

I also wondered why the init code looks like this:

parser.add_argument('--config-dir', '-c', default='/etc/tempest')

Doesn't that mean that 'tempest init' with no --config-dir will also require root?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/208004

Changed in tempest:
assignee: nobody → Andrea Frittoli (andrea-frittoli)
status: New → In Progress
Revision history for this message
Andrea Frittoli (andrea-frittoli) wrote :

 I proposed https://review.openstack.org/208004 to address the problem in the init code.

Changed in tempest:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/207994
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=871f5daa04b5b3da077789d2d6ac98dd7856e045
Submitter: Jenkins
Branch: master

commit 871f5daa04b5b3da077789d2d6ac98dd7856e045
Author: Andrea Frittoli (andreaf) <email address hidden>
Date: Fri Jul 31 17:55:38 2015 +0100

    Use relative path in data_files in setup.cfg

    The absolute path causes failures when installing in a virtual
    environment, not having root privileges.

    This change solves the installation in a virtual environment,
    but it does not fix yet the tempest init workflow when installing
    into a virtual environment.

    Partially-fixes bug #1480389

    Change-Id: Iddefb8db77ffe35a84fb35b6f9e7e823de4ab45f

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/208004
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=5a69e5575528a4fa5de3309c4b2b910442f0f493
Submitter: Jenkins
Branch: master

commit 5a69e5575528a4fa5de3309c4b2b910442f0f493
Author: Andrea Frittoli (andreaf) <email address hidden>
Date: Fri Jul 31 18:40:17 2015 +0100

    Discover the correct default config dir

    Change the tempest init to discover the correct default config
    dir. When no config dir is specified, we should use a sane default.
    Which is /etc/tempest when tempest is installed system-wide, or
    [virtualenv_root]/etc/tempest when tempest is installed in a
    virtualenv.

    Closes bug #1480389

    Change-Id: I88aee53dbbe9262fbb4bf1686b18e1371f00bf69

Changed in tempest:
status: In Progress → Fix Released
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.