When I tried to start quantum-openvswitch-agent service, it failed with the following messages.
---
DEBUG:quantum.agent.linux.utils:Running command: ip -o link show br-eth2
Traceback (most recent call last):
File "/usr/bin/quantum-openvswitch-agent", line 9, in <module>
load_entry_point('quantum==2012.2', 'console_scripts', 'quantum-openvswitch-agent')()
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py", line 820, in main
reconnect_interval, rpc, enable_tunneling)
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py", line 156, in __init__
self.setup_physical_bridges(bridge_mappings)
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py", line 473, in setup_physical_bridges
if not ip_lib.device_exists(bridge, self.root_helper):
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/ip_lib.py", line 365, in device_exists
address = IPDevice(device_name, root_helper, namespace).link.address
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/ip_lib.py", line 196, in address
return self.attributes.get('link/ether')
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/ip_lib.py", line 216, in attributes
return self._parse_line(self._run('show', self.name, options='o'))
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/ip_lib.py", line 153, in _run
return self._parent._run(kwargs.get('options', []), self.COMMAND, args)
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/ip_lib.py", line 33, in _run
return self._execute(options, command, args)
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/ip_lib.py", line 56, in _execute
root_helper=root_helper)
File "/usr/lib/python2.6/site-packages/quantum-2012.2-py2.6.egg/quantum/agent/linux/utils.py", line 45, in execute
env=env)
File "/usr/lib/python2.6/site-packages/eventlet/green/subprocess.py", line 25, in __init__
subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
---
My quantum-openvswitch-agent service run with "quantum" user (not root user),
and root_helper is set in the configuration file.
I feel root_helper is not used at _execute() call in quantum/agent/linux/ip_lib.py.
I tried to change the code like the following, I can avoid this problem.
----
def _run(self, options, command, args):
if self.namespace:
return self._as_root(options, command, args)
else:
- return self._execute(options, command, args)
+ return self._execute(options, command, args, self.root_helper)
----
Fix proposed to branch: master /review. openstack. org/17297
Review: https:/