Multiple instances of configuration directives

Bug #1234338 reported by Thomas Goirand
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Confirmed
Low
Unassigned

Bug Description

Trove has multiple times the same configuration directives. For example, there is sql_connection on both trove.conf, trove-taskmanager.conf and trove-guestagent.conf. Instead, it would be nice to have them all use /etc/trove/trove.conf, so that it is configured only once. Then we would start for example taskmanager with:

trove-taskmanager --config-file=/etc/trove/trove.conf --config-file=/etc/trove/trove-taskmanager.conf

so that it would get the directives from both files (oslo supports that).

Doing what's above would simplify a lot both packaging (on my packages, many things are configured automatically with debconf, like keystone auth token, the sql_connection directive, and the RabbitMQ credentials) and configuration by our users.

Revision history for this message
Denis M. (dmakogon) wrote :

By telling "multiple times the same configuration directives" - could you please provide an example from codebase ?

Changed in trove:
status: New → Triaged
importance: Undecided → Wishlist
importance: Wishlist → Low
Li Ma (nick-ma-z)
Changed in trove:
assignee: nobody → Li Ma (nick-ma-z)
Revision history for this message
Li Ma (nick-ma-z) wrote :

For simplicity, I think it can be solved by adding a note to trove.conf and suggest operators to specify database connection in that file, meanwhile the same configuration will be removed from other conf file.

In other way, I would like to suggest a blueprint to refactor the trove configuration files.

1. I just go through all the conf files in etc/trove and I find out most of configurations are the same but copied in different files, trove.conf, trove-conductor.conf, trove-guestagent.conf trove-taskmanager.conf. Here's the redundancy that can be dealt with. We don't need to specify the same keystone/database/message queue/log info... in all the trove conf files.

2. Instead, we can just have the global one configuration file: trove.conf and provide different sections for components.

3. Finally, we then introduce oslo-incubator/tools/config to automatic generate the configuration file trove.conf.

I'd appreciate any comments.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi, LGTM! :)

Your comments above is very much appreciated, this is exactly what needs to be done. Please go ahead!

I don't think you even need to write a blue print for this. Nearly all OpenStack services are doing this already, so you'd be only doing the same as everyone else, which is a very, very good thing. I would support and add a +1 on the code review, so please make sure to add me on the reviews.

Cheers,

Thomas

Revision history for this message
Li Ma (nick-ma-z) wrote :

Thanks for your comments, Thomas.

Revision history for this message
Li Ma (nick-ma-z) wrote :

Need to solve this bug first.

Some CLI options in group 'None' are parsed in the generator.

https://bugs.launchpad.net/oslo/+bug/1351845

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to trove (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Li Ma (<email address hidden>) on branch: master
Review: https://review.openstack.org/112464
Reason: re-submit it to openstack/requirements

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

Changed in trove:
status: Triaged → In Progress
Li Ma (nick-ma-z)
Changed in trove:
assignee: Li Ma (nick-ma-z) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Li Ma (<email address hidden>) on branch: master
Review: https://review.openstack.org/113219

Amrith Kumar (amrith)
Changed in trove:
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.