dhcp agent create broken network namespace

Bug #1340473 reported by Alex Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

Running dhcp agent, get error as below:

2014-07-10 23:18:41.932 ERROR neutron.agent.dhcp_agent [-] Unable to enable dhcp for 72cad723-3ce1-402b-ac4b-746274cbad9d.
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent Traceback (most recent call last):
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/dhcp_agent.py", line 129, in call_driver
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent getattr(driver, action)(**action_kwargs)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 191, in enable
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent interface_name = self.device_manager.setup(self.network)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 894, in setup
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent namespace=network.namespace)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/interface.py", line 368, in plug
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent namespace2=namespace)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 125, in add_veth
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent self.ensure_namespace(namespace2)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 137, in ensure_namespace
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent lo.link.set_up()
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 248, in set_up
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent self._as_root('set', self.name, 'up')
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 229, in _as_root
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent kwargs.get('use_root_namespace', False))
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 69, in _as_root
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent namespace)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 80, in _execute
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent root_helper=root_helper)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent File "/opt/stack/neutron/neutron/agent/linux/utils.py", line 76, in execute
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent raise RuntimeError(m)
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent RuntimeError:
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-72cad723-3ce1-402b-ac4b-746274cbad9d', 'ip', 'link', 'set', 'lo', 'up']
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent Exit code: 1
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent Stdout: ''
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent Stderr: 'seting the network namespace "qdhcp-72cad723-3ce1-402b-ac4b-746274cbad9d" failed: Invalid argument\n'
2014-07-10 23:18:41.932 TRACE neutron.agent.dhcp_agent

Revision history for this message
Alex Xu (xuhj) wrote :

After I reboot my ubuntu14.04, I execute:
'ip netns add testns'
'ip netns exec testns ifconfig'

This works.

But If I execute:
sudo /usr/local/bin/neutron-rootwrap /etc/neutron/rootwrap.conf ip netns add testns
sudo ip netns exec testns ifconfig

Then I got same error as above.

description: updated
Revision history for this message
Alex Xu (xuhj) wrote :

Just reboot my ubuntu 14.04, then I execute
'ip netns add testns'
'ip netns exec testns ifconfig'

It failed ....

Revision history for this message
Eugene Nikanorov (enikanorov) wrote :

Please be more specific about what errors you are getting.
'ip netns exec' should work under root. It could be that somehow /var/run/netns/<namespace> has wrong permissions (it happens rarely) or you have some misconfiguration for neutron user. That could lead to the errors you see.

Changed in neutron:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.