summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2012-10-23 15:57:43 -0700
committerJoe Gordon <jogo@cloudscaling.com>2012-10-23 15:57:43 -0700
commit0bfdf3dc57ab122db7c9c6c36caf097dc04bde77 (patch)
tree537298eaaf7a1e7fb479e774a7078d4f11fc6e5a /nova/utils.py
parentd9c35809dc98823a5050f062192b2453f36d1cfd (diff)
Remove deprecated root_helper config
root_helper was deprecated in Folsom and was replaced by rootwrap_config Change-Id: Ia2f5e67f834c01c07272c61323d01599006b7018
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py16
1 files changed, 2 insertions, 14 deletions
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: