Deprecate root_helper in favor of rootwrap_config

Mark the root_helper option deprecated and introduce usage of
the rootwrap_config option instead. The root_helper option will
still fully be supported in Folsom, but will be removed in Grizzly.

Transition notes: you should replace:
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf

by:
rootwrap_config=/etc/nova/rootwrap.conf

Implements bp deprecate-root-helper

Change-Id: I8dfc94e9b91f7ffc82d393b345f09409da347e78
This commit is contained in:
Thierry Carrez
2012-08-01 14:44:28 +02:00
parent 72edd8ab5e
commit 14e4fdce00
2 changed files with 6 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
Filters which commands nova is allowed to run as another user. Filters which commands nova is allowed to run as another user.
To use this, you should set the following in nova.conf: To use this, you should set the following in nova.conf:
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf rootwrap_config=/etc/nova/rootwrap.conf
You also need to let the nova user run nova-rootwrap as root in sudoers: You also need to let the nova user run nova-rootwrap as root in sudoers:
nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf * nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf *

View File

@@ -339,7 +339,11 @@ global_opts = [
'formatted with on creation.'), 'formatted with on creation.'),
cfg.StrOpt('root_helper', cfg.StrOpt('root_helper',
default='sudo', default='sudo',
help='Command prefix to use for running commands as root'), help='Deprecated: command to use for running commands as root'),
cfg.StrOpt('rootwrap_config',
default=None,
help='Path to the rootwrap configuration file to use for '
'running commands as root'),
cfg.StrOpt('network_driver', cfg.StrOpt('network_driver',
default='nova.network.linux_net', default='nova.network.linux_net',
help='Driver to use for network creation'), help='Driver to use for network creation'),