Running 'redstack install' on clean box fails

Bug #1426551 reported by Peter Stachowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trove Integration
Fix Committed
High
Peter Stachowski

Bug Description

If you run 'redstack install' on a clean machine, it now fails with the following error:

$ ./redstack install
mkdir: cannot create directory '/opt/stack': Permission denied

Running with 'set -vx' gives the following additional info:

run_command $@
+ run_command install
+ '[' 1 -lt 1 ']'
+ case "$1" in
+ cmd_install
+ mkdir -p /opt/stack/logs
mkdir: cannot create directory '/opt/stack': Permission denied

This bug was introduced by https://review.openstack.org/#/c/158538/

When the log directory was changed to the OS standard, redstack tries to access/create the log dir before devstack has had a chance to create the directory. This fails as it now does not exist on a clean install.

Changed in trove-integration:
assignee: nobody → Peter Stachowski (peterstac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove-integration (master)

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

Changed in trove-integration:
status: New → In Progress
Revision history for this message
Nikhil Manchanda (slicknik) wrote :

Confirmed. Thanks for looking into this, Peter!

Changed in trove-integration:
importance: Undecided → High
milestone: none → kilo-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove-integration (master)

Reviewed: https://review.openstack.org/160013
Committed: https://git.openstack.org/cgit/openstack/trove-integration/commit/?id=3c21104d0e027c226bf31000611ca8b5de1b3efd
Submitter: Jenkins
Branch: master

commit 3c21104d0e027c226bf31000611ca8b5de1b3efd
Author: Peter Stachowski <email address hidden>
Date: Fri Feb 27 16:33:06 2015 -0500

    Create log dir with sudo to avoid permission issue

    If you run 'redstack install' on a clean machine, it now fails with the
    following error:

    $ ./redstack install
    mkdir: cannot create directory '/opt/stack': Permission denied

    Running with 'set -vx' gives the following additional info:

    run_command $@
    + run_command install
    + '[' 1 -lt 1 ']'
    + case "$1" in
    + cmd_install
    + mkdir -p /opt/stack/logs
    mkdir: cannot create directory '/opt/stack': Permission denied

    This bug was introduced by https://review.openstack.org/#/c/158538/

    This patchset changed the log dir to the OS standard (/opt/stack/logs).
    Redstack tries to create the log dir if it doesn't exist and this
    happens before devstack has had a chance to create the directory.
    It can fail as the user typically does not have permission to create
    the directory under /opt.

    Using 'sudo' alleviates this.

    Note: This only is an issue on new installs, as /opt/stack will already
    exist on previous installs and be owned by the user.

    Change-Id: I71ea8023b6b83c1ae46cac4f02766bb5e47d1a75
    Closes-Bug: #1426551

Changed in trove-integration:
status: In Progress → Fix Committed
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.