Taskmanager writes guestagent conf to wrong place

Bug #1309030 reported by Greg Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Wishlist
Duk Loi

Bug Description

The guest images produced by kick-start are putting the trove-guestagent.conf in /etc/trove/trove-guestagent.conf.

However, the task manager writes to /etc/trove-guestagent.conf during create. To avoid having passwords etc hard-coded on the guest images, the default behavior should be that the task manager pushes the guestagent conf file from the controller.

Per hub_cap's comments here: https://review.openstack.org/#/c/41300/2/trove/common/cfg.py : devstack/trove-integration should follow this approach, so the guest images should put/read the conf file from the same location the task manager uses.

Greg Lucas (glucas-q)
Changed in trove-integration:
assignee: nobody → Greg Lucas (glucas-q)
status: New → In Progress
Revision history for this message
Greg Lucas (glucas-q) wrote :

Arguably, the task manager should be writing to '/etc/trove/trove-guestagent.conf' instead.

Either way, we should be consistent between what the task manager does during create and how trove-integration sets up guest images.

Revision history for this message
Nikhil Manchanda (slicknik) wrote :

I agree with the latter comment.

All of trove's config should be under /etc/trove, so it's a fair cop to fix the taskmanager to actually write the conf to /etc/trove/trove-guestagent.conf/.

Thanks!

Changed in trove-integration:
importance: Undecided → Medium
milestone: none → juno-1
Revision history for this message
Greg Lucas (glucas-q) wrote :

Based on previous comments, changing this from a trove-integration bug to a trove bug -- we'll change where the task manager pushed the conf rather than where the guest reads it.

affects: trove-integration → trove
Changed in trove:
milestone: juno-1 → none
Greg Lucas (glucas-q)
summary: - Kick-start images put guestagent conf in wrong place
+ Taskmanager writes guestagent conf to wrong place
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Revision history for this message
Greg Lucas (glucas-q) wrote :

Question on this:

Shouldn't the guest_info file also getting written in the trove dir, i.e. /etc/trove/guest_info?

I haven't made this change in the patch set yet (it will require changing the upstart script in trove-integration as well) but makes sense to me.

Revision history for this message
Vipul Sabhaya (vipuls) wrote :

Greg +1, If we are making this change for trove-guestagent.conf, i would be in favor of moving guest_info to the same directory.

Denis M. (dmakogon)
Changed in trove:
milestone: none → juno-3
Changed in trove:
milestone: juno-3 → juno-rc1
Doug Shelley (0-doug)
Changed in trove:
assignee: Greg Lucas (glucas-q) → Duk Loi (duktesora)
Revision history for this message
Nikhil Manchanda (slicknik) wrote :

Issue is not release critical to hold juno-rc1 for. Moving to kilo-1.

Changed in trove:
milestone: juno-rc1 → kilo-1
Changed in trove:
assignee: Duk Loi (duktesora) → Denis M. (dmakogon)
Revision history for this message
Amrith Kumar (amrith) wrote :

Updating importance to "Wishlist" (bugscrub, 2014-10-23)

Changed in trove:
importance: Medium → Wishlist
Changed in trove:
milestone: kilo-1 → kilo-2
Duk Loi (duktesora)
Changed in trove:
assignee: Denis M. (dmakogon) → Duk Loi (duktesora)
Changed in trove:
milestone: kilo-2 → kilo-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/100381
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=a4e054e3ac68426b71a55dfedc4385966b0ef623
Submitter: Jenkins
Branch: master

commit a4e054e3ac68426b71a55dfedc4385966b0ef623
Author: Greg Lucas <email address hidden>
Date: Wed Oct 8 16:26:45 2014 +0300

    Inject guest conf files to configurable location

    Introduce a configuration option for a directory on the guest where the
    taskmanager should inject configuration files.

    During instance creation inject the guest_info and trove-guestagent
    conf files to the 'injected_config_location'. The default location is
    /etc/trove/conf.d.

    Also:
     - Change the default value for 'guest_config' to remove the risk of
       overwriting a guest image's conf file with the sample.
     - Add trove-guestagent.conf injection to heat template.
     - Add new 'guest_info' option that defaults to "guest_info.conf".

    Depends-On: I1dffd373da722af55bdea41fead8456bb60c82b2

    Co-Authored-By: Denis Makogon <email address hidden>
    Co-Authored-By: Duk Loi <email address hidden>

    DocImpact: This change introduces a new option with a default that
    affects existing guest images. The guestagent init script for any
    existing guest image will need to be modified to read the conf
    files from /etc/trove/conf.d. For backwards compatibility set the
    injected_config_location to /etc/trove and guest_info to
    /etc/guest_info.

    Closes-Bug: 1309030
    Change-Id: I1057f4a1b6232332ed4b520dbc7b3bbb04145f73

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: kilo-3 → 2015.1.0
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.