Reload Configuration without service restart

Registered by Abhishek Kekane on 2014-05-06

Administrator should not need to restart the service just to reload some config options.
Also, if one of the option is modified by administrator, reload_config_files call will reload all the configuration options at once.

Suggested route:
Mark options which you can reload without restart with "can_update_without_restart=True".
"can_update_without_restart=True" is not configurable in configuration file.
You need to specify it explicitly for those options which need to be reloaded without restart.

For example,
cfg.StrOpt('filesystem_store_datadirs',
           help=_('List of directories and its priorities to which '
               'the Filesystem backend store writes images.'),
           can_update_without_restart=True)

Add new parameter update_without_restart=False, to reload_config_files() method.
If this parameter is True, then only update config values that are marked with can_update_without_restart=True, and log a warning message for any other changed options and continue using old values for those options.
Administrator can configure "update_without_restart" to True/False as per requirement in configuration file.

Add callback handler to validate the reloaded option.

For example,
CONF.register_opts(filesystem_opts, callback_handler=validate_reloaded_option)

This callback_handler will be added to each of the option which having "can_update_without_restart=True" in register_opt() method and will be used to validate the reloaded option. If this validation fails for newly changed value, then warning message will be logged and processing will be continued using old value.

Blueprint information

Status:
Not started
Approver:
Doug Hellmann
Priority:
Undefined
Drafter:
Abhishek Kekane
Direction:
Needs approval
Assignee:
Abhishek Kekane
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/config-reload-without-restart,n,z

Addressed by: https://review.openstack.org/98079
    Add spec for config-reload-without-restart

You should not set a milestone target unless the blueprint has been properly prioritized by the project drivers.

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.