summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 01df19b27..26637a489 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -160,7 +160,7 @@ def execute(*cmd, **kwargs):
raise exception.NovaException(_('Got unknown keyword args '
'to utils.execute: %r') % kwargs)
- if run_as_root:
+ if run_as_root and os.geteuid() != 0:
cmd = ['sudo', 'nova-rootwrap', FLAGS.rootwrap_config] + list(cmd)
cmd = map(str, cmd)