If ipv6 is disabled through the kernel, neutron-dhcp-agent fails to create the tap devices due to error regarding ipv6

Bug #1818566 reported by David Hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
New
Undecided
Unassigned

Bug Description

If we disable ipv6 using ipv6.disable=1 at the kernel runtime, neutron-dhcp-agent stops creating the tap devices and fails here:

dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.linux.utils [-] Exit code: 255; Stdin: ; Stdout: ; Stderr: sysctl: cannot stat /proc/sys/net/ipv6/conf/default/accept_ra: No such file or directory
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent [-] Unable to enable dhcp for 310b9752-06a5-4d7b-98ae-1ba8536e22fa.
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent Traceback (most recent call last):
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent File "/usr/lib/python2.7/site-packages/neutron/agent/dhcp/agent.py", line 140, in call_driver
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent getattr(driver, action)(**action_kwargs)
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 213, in enable
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent interface_name = self.device_manager.setup(self.network)
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/dhcp.py", line 1441, in setup
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent n_const.ACCEPT_RA_DISABLED)
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/interface.py", line 260, in configure_ipv6_ra
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent 'value': value}])
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/ip_lib.py", line 912, in execute
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent log_fail_as_error=log_fail_as_error, **kwargs)
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent File "/usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py", line 148, in execute
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent raise ProcessExecutionError(msg, returncode=returncode)
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent ProcessExecutionError: Exit code: 255; Stdin: ; Stdout: ; Stderr: sysctl: cannot stat /proc/sys/net/ipv6/conf/default/accept_ra: No such file or directory
dhcp-agent.log:2019-03-04 19:29:13.342 5869 ERROR neutron.agent.dhcp.agent

description: updated
Revision history for this message
David Hill (david-hill-ubisoft) wrote :

This is in newton and it appears it's already fixed in Queens [1]

[1] https://bugs.launchpad.net/neutron/+bug/1618878

Revision history for this message
David Hill (david-hill-ubisoft) wrote :

I still did write this patch :

[root@overcloud-controller-0 linux]# git diff
diff --git a/agent/linux/dhcp.py b/agent/linux/dhcp.py
index aa9f2cd..2cc00f1 100644
--- a/agent/linux/dhcp.py
+++ b/agent/linux/dhcp.py
@@ -21,6 +21,7 @@ import shutil
 import time

 import netaddr
+from neutron.common import ipv6_utils
 from neutron_lib import constants
 from neutron_lib import exceptions
 from oslo_config import cfg
@@ -1437,8 +1438,10 @@ class DeviceManager(object):
         # and added back statically in the call to init_l3() below.
         if network.namespace:
             ip_lib.IPWrapper().ensure_namespace(network.namespace)
- self.driver.configure_ipv6_ra(network.namespace, 'default',
- n_const.ACCEPT_RA_DISABLED)
+ self.use_ipv6 = ipv6_utils.is_enabled()
+ if self.use_ipv6:
+ self.driver.configure_ipv6_ra(network.namespace, 'default',
+ n_const.ACCEPT_RA_DISABLED)

         if ip_lib.ensure_device_is_ready(interface_name,
                                          namespace=network.namespace):

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.