summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorhua zhang <zhhuabj@cn.ibm.com>2012-05-02 18:34:01 +0800
committerhua zhang <zhhuabj@cn.ibm.com>2012-05-03 10:37:15 +0800
commitc0bbc4be369d0b20cd3c5985eb48b8ec66876804 (patch)
treeb5487e66fd8cad9a495d01ba244884dde9fb3be1 /nova
parente175c5f1c0275ed43648d43e6e46129680fc6d1b (diff)
Run ip link show in linux_net._device_exists as root
Bug 993097 Change-Id: Iaad55f2e878df65e9398f0c28786f0c13fb82a95
Diffstat (limited to 'nova')
-rwxr-xr-xnova/network/linux_net.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index d819a111a..626b65c9e 100755
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -818,7 +818,7 @@ def _execute(*cmd, **kwargs):
def _device_exists(device):
"""Check if ethernet device exists."""
(_out, err) = _execute('ip', 'link', 'show', 'dev', device,
- check_exit_code=False)
+ check_exit_code=False, run_as_root=True)
return not err