Properly scope config option registrations

Registered by Mark McLoughlin

Many config options within Nova are declared either globally - i.e. in nova.config.

Often, config options can be declared and used within the one module. This is ideal because it is clear the option is only intended for use by that module and its declaration is easily found.

Even where multiple modules use a given option, one of those modules is often a natural place to declare it and the other modules can use CONF.import_opt() to explicitly declare their dependency on the option.

Scoping options in this way will also help us figure out groups to put options which will, in turn, help users make sense of the config file.

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
Medium
Drafter:
Mark McLoughlin
Direction:
Approved
Assignee:
Mark McLoughlin
Definition:
Approved
Series goal:
Accepted for grizzly
Implementation:
Implemented
Milestone target:
milestone icon 2013.1
Started by
Russell Bryant
Completed by
Russell Bryant

Related branches

Sprints

Whiteboard

It's going to be pretty unclear when this blueprint is completed - it could be a never-ending cleanup job. But, one way of judging completeness is if nova.config only has a small number of options declared there.

For reference, there was originally 84 options declared in nova.config.

Addressed by: https://review.openstack.org/16700
    Move compute opts from nova.config

Addressed by: https://review.openstack.org/16701
    Re-organize compute opts a bit

Addressed by: https://review.openstack.org/16702
    Move compute_driver into nova.virt.driver

Addressed by: https://review.openstack.org/16703
    Move imagecache code from nova.virt.libvirt.utils

Addressed by: https://review.openstack.org/16706
    Move ec2 config opts to nova.api.ec2.cloud

Addressed by: https://review.openstack.org/16707
    Remove default_image config option

Addressed by: https://review.openstack.org/17832
    Clean up setting of control_exchange default

Addressed by: https://review.openstack.org/17833
    Move api_paste_config option into nova.wsgi

Addressed by: https://review.openstack.org/17834
    Move api_rate_limit and auth_strategy to nova.api

Addressed by: https://review.openstack.org/17835
    Move cache_images to nova.virt.xenapi.vm_utils

Addressed by: https://review.openstack.org/17836
    Move some options into nova.image.glance

Addressed by: https://review.openstack.org/17837
    Move zombie_instance_updated_at_window option

Addressed by: https://review.openstack.org/17838
    Move monkey patch config opts into nova.utils

Addressed by: https://review.openstack.org/17839
    Properly scope isolated hosts config opts

For reference, there are 54 options declared in nova.config now.

Addressed by: https://review.openstack.org/17909
    Properly scope password options

Addressed by: https://review.openstack.org/17910
    Move some opts into nova.utils

Addressed by: https://review.openstack.org/17912
    Move link_prefix options into api.openstack.common

Addressed by: https://review.openstack.org/17913
    Move osapi_max_limit into api.openstack.common

Addressed by: https://review.openstack.org/17915
    Move API extension opts to api.openstack.compute

Addressed by: https://review.openstack.org/17916
    Move metadata_{host,port} to network.linux_net

Addressed by: https://review.openstack.org/17917
    Move DNS manager options into network.manager

Addressed by: https://review.openstack.org/17918
    Move network_driver into new nova.network.driver

For reference, there are 39 options declared in nova.config now.

Addressed by: https://review.openstack.org/18981
    Move fake_network opt to nova.network.manager

Addressed by: https://review.openstack.org/18982
    Remove unused aws access key opts

Addressed by: https://review.openstack.org/19165
    Move global glance opts into nova.image.glance

Addressed by: https://review.openstack.org/19166
    Move global s3 opts into nova.image.s3

Addressed by: https://review.openstack.org/19167
    Move cert_topic into nova.cert.rpcapi

Addressed by: https://review.openstack.org/19168
    Move network_topic into nova.network.rpcapi

Addressed by: https://review.openstack.org/19169
    Move console_topic into nova.console.rpcapi

Addressed by: https://review.openstack.org/19170
    Move scheduler_topic into nova.scheduler.rpcapi

Addressed by: https://review.openstack.org/19171
    Move compute_topic into nova.compute.rpcapi

Addressed by: https://review.openstack.org/19172
    Move manager options into nova.service

Addressed by: https://review.openstack.org/19173
    Move api_class options to where they are used

Addressed by: https://review.openstack.org/19174
    Move osapi_compute_unique_server_name_scope to db

Addressed by: https://review.openstack.org/19175
    Move default_instance_type into nova.compute

Addressed by: https://review.openstack.org/19176
    Move common virt driver options to virt.driver

Addressed by: https://review.openstack.org/19177
    Move enabled_apis option into nova.service

Addressed by: https://review.openstack.org/19178
    Move vpn_image_id to pipelib

Addressed by: https://review.openstack.org/19179
    Move vpn_key_suffix into pipelib

Addressed by: https://review.openstack.org/19180
    Move 2 more service opts to nova.service

Addressed by: https://review.openstack.org/19181
    Move memcached_servers opt into common.memorycache

Addressed by: https://review.openstack.org/19182
    Move global service networking opts to new module

Ok, that's a wrap! No more global options in nova.config

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.