Cinder Conf is bloated with duplicate options for drivers

Bug #1398976 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Won't Fix
Low
Unassigned

Bug Description

Now that Cinder has well over 20 drivers that can be configured we have a pretty lengthy config file. There's a lot of duplicate entries, for example rather than using a single "enable_chap" option and allowing it to be set in a drivers config section, most drivers want to be snow-flakes and do "<vendor-name>_enable_chap". Seems kinda silly.

There are other places we have this problem as well... back in the Nova days, we used san_ip, san_login and san_password for connecting to a device, whether it was a REST endpoint, SSH etc. Some drivers still just use those generic options, while others use things like "api_url" and "<vendor-driver>_username" and on and on.

Think it would be great if we made things more general and shared options.

Changed in cinder:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Jay Bryant (jsbryant) wrote :

Once concern ... Maybe chap_enabled is a bad example, but what do we do for the cases where you have one backend that would want chap_enabled set but not for another backend?

Changed in cinder:
status: Triaged → Confirmed
Revision history for this message
John Griffith (john-griffith) wrote :

@jay
That's what multi-backend and the use of self.configuration does for us

So in your conf file you would have:

enabled_backends=abc, xyz

[abc]
enable_chap=True
.......

[xyz]
enable_chap=False
.......

As long as the driver uses config properly via self.configuration these will be independent. And for the case of NOT using multi-backend it's irrelevant and you just need the one single default entry.

Revision history for this message
Jay Bryant (jsbryant) wrote :

Ok, I was hoping that the answer was that multi-backend would properly handle that. Thanks for verifying.

Revision history for this message
Rushi Agrawal (rushiagr) wrote :

So what's the preferred way to remove the duplicated option? Should we mark them as deprecated for one cycle?

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

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

Changed in cinder:
assignee: nobody → Rushi Agrawal (rushiagr)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/148091
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=3ffb34e8e92d0aa7e23a470695627434455c9858
Submitter: Jenkins
Branch: master

commit 3ffb34e8e92d0aa7e23a470695627434455c9858
Author: Rushi Agrawal <email address hidden>
Date: Sun Jan 18 12:23:32 2015 +0530

    EQLX: Consolidate CHAP config options

    In order to reduce configuration option bloat, it would be a good exercise
    to consolidate configuration options which many drivers implement under
    their own distinct name but have same functionality. Here, a first attempt
    is made to consolidate CHAP configuration options. Dell's EQLSanISCSIDriver
    is made to use these new set of configuration options 'use_chap_auth',
    'chap_username' and 'chap_password' instead of the driver-specific options
    'eqlx_use_chap', 'eqlx_chap_login' and 'eqlx_chap_password' respectively in
    this patch. More drivers are to be added in the future.

    DocImpact: Config options of Dell EQLSanISCSIDriver are changed

    Change-Id: I5c51301653ad0f76ce0550e12177ad08f20290e0
    Partial-Bug: 1398976

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Automatically unassigning due to inactivity.

Changed in cinder:
assignee: Rushi Agrawal (rushiagr) → nobody
status: In Progress → Triaged
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

This is kind of an ongoing effort to make sure new drivers don't add new config options for common things. I think some (most?) of the original concern has been addressed. But I do think this is something we maybe do a little better job in reviews watching for these things.

Changed in cinder:
status: Triaged → Won't Fix
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.