Refactor redstack to use local.conf

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

Bug Description

devstack moved to using a [[local|localrc]] section in the new local.conf file a while ago (Oct 31, 2014 - https://review.openstack.org/#/c/132223 ). Although there is no indication that support for the old-style file is being withdrawn, it's probably time to upgrade the redstack script to use the new format.

This becomes a more important issue when different configurations are desired. For example, in order to support profiling (osprofiler), entries have to be made in the corresponding trove configuration files. If we want the ability to turn profiling on and off we need to switch to the new local.conf file. This would allow us to include configurations such as the following:

[[post-config|$TROVE_CONF]]
[profiler]
enabled = True

where the line 'enabled = True' could be generated from 'enabled = $ENABLE_PROFILER'

Being able to add commands like that depends on https://review.openstack.org/#/c/155486/ merging, although order is not important as devstack will ignore configuration files that do not exist.

Refactoring will also permit user specified configuration to become more in-depth, allowing greater control over the trove/devstack environment.

Changed in trove-integration:
assignee: nobody → Peter Stachowski (peterstac)
Revision history for this message
Peter Stachowski (peterstac) wrote :

Got the date/link for the change wrong. Here's the correct info:
Jan 10, 2014 - https://github.com/openstack-dev/devstack/commit/38e38fb

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/155913

Changed in trove-integration:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to trove-integration (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/160583

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

Related fix proposed to branch: master
Review: https://review.openstack.org/160588

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

Reviewed: https://review.openstack.org/155913
Committed: https://git.openstack.org/cgit/openstack/trove-integration/commit/?id=0ac948a7047b165c1938e26d780b8dc88088703b
Submitter: Jenkins
Branch: master

commit 0ac948a7047b165c1938e26d780b8dc88088703b
Author: Peter Stachowski <email address hidden>
Date: Wed Mar 4 15:49:07 2015 -0500

    Refactor redstack to use local.conf

    The devstack project has moved away from a localrc file and now uses a
    [[local|localrc]] section in the new local.conf file to accomplish the
    same thing. The redstack script should set up this file.
    (see https://github.com/openstack-dev/devstack/commit/38e38fb )

    The redstack script has been modified to set up devstack configuration
    in the new format.

    Backwards compatibility was maintained by deferring to an existing
    localrc file in the devstack base directory. In order to use the
    new style configuration file, the localrc file must first be
    deleted or renamed. At the same time, any 'user' configuration
    would need to move to USER_LOCAL_CONF (see below).

    The refactor solves the important issue of when different configurations
    are desired. For example, in order to support profiling (OSProfiler),
    entries have to be made in the corresponding trove configuration files.
    The ability to turn profiling on and off is now possible, by using
    configuration entries such as the following:

    [[post-config|$TROVE_CONF]]
    [profiler]
    enabled = True

    where the line 'enabled = True' could be generated from redstack in
    the form of 'enabled = $ENABLE_PROFILER'

    The refactoring also permits user specified configuration to become
    more in-depth, allowing greater control over the trove/devstack
    environment. This was accomplished by including a USER_LOCAL_CONF
    variable that defaults to '$HOME/.devstack.local.conf'. All the
    contents of that file are now included in devstack's local.conf
    file on each invocation of 'redstack install'.

    A directory 'local.conf.d' has been added to store additional
    configuration files. The existing using_vagrant and use_uuid_token
    configurations have been moved there. Stubs for the Trove
    configuration files were added in 'trove.conf.rc'. Files are loaded
    by default, unless a corresponding variable is set to false.
    For example, setting TROVE_CONF=false in options.rc will cause the
    trove.conf.rc file to be skipped. USING_VAGRANT=false and
    USE_UUID_TOKEN=false have been added in redstack.rc to maintain
    backwards compatibility.

    A sample.rc file was created with detailed comments about how the
    configuration can be set up (this file is ignored).

    An additional file for persistent redstack options was added,
    '$HOME/.redstack.options.rc', and is sourced before options.rc if it
    exists.

    A side effect of this refactor is that it regenerates the localrc
    part each time, thus effectively fixing bug 1370946 as well.

    Change-Id: I319476b29aada7f24829ae2308bf88c8c4bdafa7
    Closes-Bug: #1421859
    Closes-Bug: #1370946

Changed in trove-integration:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to trove-integration (master)

Reviewed: https://review.openstack.org/160583
Committed: https://git.openstack.org/cgit/openstack/trove-integration/commit/?id=5962568c60872e06746ebc46c58a794b6d3deffe
Submitter: Jenkins
Branch: master

commit 5962568c60872e06746ebc46c58a794b6d3deffe
Author: Peter Stachowski <email address hidden>
Date: Wed Mar 4 16:04:22 2015 -0500

    Added support for Ceilometer in redstack

    A flag (ENABLE_CEILOMETER) was added to redstack.rc that controls
    whether Ceilometer is installed. Also included was a corresponding
    conf file.

    Note: This is a precursor to the config changes that will allow
    the OSprofiler to be set up in Trove.

    Change-Id: I2cf7e4ba6fcf1529a910e1126f6597b7d3da1a6e
    Related-Bug: #1421859

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

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

commit d9f5d5f46ed37163d1167b883c4fc7bf9c293647
Author: Peter Stachowski <email address hidden>
Date: Wed Mar 4 16:21:08 2015 -0500

    Added support for OSProfiler in redstack

    A flag (ENABLE_PROFILER) was added to redstack.rc that controls
    whether OSProfiler is enabled. Since this depends on Ceilometer,
    Ceilometer is also installed if set to true.

    Several configuration variables were added as well to redstack.rc
    that can be used to control the behaviour of the profiler.

    ENABLE_PROFILER is set to 'false' by default, but can be turned
    on easily by adding 'ENABLE_PROFILER=true' to options.rc or by
    the command line 'ENABLE_PROFILER=true ./redstack install'.

    Change-Id: I981809d5c5fd5ac9a7d72713e90d93845fc3a747
    Related-Bug: #1421859

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.