DHCP service start failed

Bug #1302275 reported by shihanzhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Unassigned

Bug Description

In neutron.conf, I set 'force_gateway_on_subnet = False', then create a subnet with gateway ip out of
 subnet' CIDR, I found a error happen in dhcp.log, the log is bellow:

 [-] Unable to enable dhcp for af572283-3f32-4a12-9419-1154e9c386f9.
 Traceback (most recent call last):
   File "/usr/lib64/python2.6/site-packages/neutron/agent/dhcp_agent.py", line 128, in call_driver
     getattr(driver, action)(**action_kwargs)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/dhcp.py", line 167, in enable
     reuse_existing=True)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/dhcp.py", line 727, in setup
     self._set_default_route(network)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/dhcp.py", line 615, in _set_default_route
     device.route.add_gateway(subnet.gateway_ip)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 368, in add_gateway
     self._as_root(*args)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 217, in _as_root
     kwargs.get('use_root_namespace', False))
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 70, in _as_root
     namespace)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/ip_lib.py", line 81, in _execute
     root_helper=root_helper)
   File "/usr/lib64/python2.6/site-packages/neutron/agent/linux/utils.py", line 75, in execute
     raise RuntimeError(m)
 RuntimeError:
 Command: ['sudo', '/usr/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-af572283-3f32-4a12-9419-1154e9c386f9', 'ip', 'route', 'replace', 'default', 'via', '80.80.1.1', 'dev', 'tapcb420785-8d']
 Exit code: 2
 Stdout: ''
 Stderr: 'RTNETLINK answers: No such process\n'
 TRACE neutron.agent.dhcp_agent

Revision history for this message
Sridhar Gaddam (sridhargaddam) wrote :

Hi shihanzhang,

Looking at the error code, I feel that its expected as there is no route to reach the default gateway in the dhcp namespace.

I'm trying to understand the use-case, like what you plan to do by configuring a subnet with default gateway set to a value which is not part of the subnet CIDR. Please provide some details about your use-case.

--Sridhar.

Revision history for this message
shihanzhang (shihanzhang) wrote :

I don't have use-case for this problem, I also want to know why neutron provide this setting 'force_gateway_on_subnet', what is the real scenario?

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

In some IPv6 scenarios, the gateway might be outside of the subnet cidr.

Changed in neutron:
status: New → Incomplete
status: Incomplete → Invalid
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.