diff options
| author | Joe Gordon <jogo@cloudscaling.com> | 2012-10-23 15:57:43 -0700 |
|---|---|---|
| committer | Joe Gordon <jogo@cloudscaling.com> | 2012-10-23 15:57:43 -0700 |
| commit | 0bfdf3dc57ab122db7c9c6c36caf097dc04bde77 (patch) | |
| tree | 537298eaaf7a1e7fb479e774a7078d4f11fc6e5a | |
| parent | d9c35809dc98823a5050f062192b2453f36d1cfd (diff) | |
| download | nova-0bfdf3dc57ab122db7c9c6c36caf097dc04bde77.tar.gz nova-0bfdf3dc57ab122db7c9c6c36caf097dc04bde77.tar.xz nova-0bfdf3dc57ab122db7c9c6c36caf097dc04bde77.zip | |
Remove deprecated root_helper config
root_helper was deprecated in Folsom and was replaced by rootwrap_config
Change-Id: Ia2f5e67f834c01c07272c61323d01599006b7018
| -rw-r--r-- | nova/flags.py | 5 | ||||
| -rw-r--r-- | nova/utils.py | 16 |
2 files changed, 3 insertions, 18 deletions
diff --git a/nova/flags.py b/nova/flags.py index e9057d8db..d36284961 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -321,11 +321,8 @@ global_opts = [ default=None, help='The default format an ephemeral_volume will be ' 'formatted with on creation.'), - cfg.StrOpt('root_helper', - default='sudo', - help='Deprecated: command to use for running commands as root'), cfg.StrOpt('rootwrap_config', - default=None, + default="/etc/nova/rootwrap.conf", help='Path to the rootwrap configuration file to use for ' 'running commands as root'), cfg.StrOpt('network_driver', diff --git a/nova/utils.py b/nova/utils.py index 015ff915a..11a502e37 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -47,7 +47,6 @@ from eventlet import greenthread from eventlet import semaphore import netaddr -from nova.common import deprecated from nova import exception from nova import flags from nova.openstack.common import cfg @@ -136,8 +135,7 @@ def execute(*cmd, **kwargs): before retrying. :param attempts: How many times to retry cmd. :param run_as_root: True | False. Defaults to False. If set to True, - the command is prefixed by the command specified - in the root_helper FLAG. + the command is run with rootwrap. :raises exception.NovaException: on receiving unknown arguments :raises exception.ProcessExecutionError: @@ -163,18 +161,8 @@ def execute(*cmd, **kwargs): 'to utils.execute: %r') % kwargs) if run_as_root: + cmd = ['sudo', 'nova-rootwrap', FLAGS.rootwrap_config] + list(cmd) - if FLAGS.rootwrap_config is None or FLAGS.root_helper != 'sudo': - deprecated.warn(_('The root_helper option (which lets you specify ' - 'a root wrapper different from nova-rootwrap, ' - 'and defaults to using sudo) is now deprecated. ' - 'You should use the rootwrap_config option ' - 'instead.')) - - if (FLAGS.rootwrap_config is not None): - cmd = ['sudo', 'nova-rootwrap', FLAGS.rootwrap_config] + list(cmd) - else: - cmd = shlex.split(FLAGS.root_helper) + list(cmd) cmd = map(str, cmd) while attempts > 0: |
