os-net-config should support disabling autoconfiguration on non-IPv6 interfaces

Bug #1609125 reported by Dan Sneddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
In Progress
Low
Dan Sneddon

Bug Description

If os-net-config is given the following configuration:

-
  type: interface
  name: nic5
  use_dhcp: false
  use_dhcpv6: false
  addresses:
    -
      ip_netmask: 192.0.2.100/24

It will generate the following configuration:

/etc/sysconfig/network-scripts/ifcfg-eth4
# This file is autogenerated by os-net-config
DEVICE=eth4
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
BOOTPROTO=static
IPADDR=172.16.17.161
NETMASK=255.255.255.128

However, this may result in this interface being configured automatically using RAs and SLAAC. This can interfere with statically-configured IPv6 routes.

os-net-config should support an option for all interface types, ipv6_autoconf, which if set to no will add this line to the resulting config:

IPV6_AUTOCONF=no

This would disable automatic configuration of IPv6 on interfaces where this is not desired.

Revision history for this message
Dan Sneddon (dsneddon) wrote :

I think this might best be implemented by adding IPV6_AUTOCONF=no to the ifcfg file when the interface is marked with use_dhcpv6=no. This doesn't handle the (probably rare) use case of enabling autoconf but specifically disabling DHCPv6, but I think that combination is unlikely given the type of environments os-net-config is used in.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/350794

Changed in os-net-config:
assignee: nobody → Dan Sneddon (dsneddon)
status: New → In Progress
Steven Hardy (shardy)
Changed in os-net-config:
importance: Undecided → High
Revision history for this message
Dan Sneddon (dsneddon) wrote :

There is an underlying condition that causes the values in the ifcfg files to be ignored. RHEL/CENTOS systems are configured by default with net.ipv6.conf.all.autoconf = 1 and net.ipv6.conf.all.accept_ra = 1. If IP forwarding is disabled, then autoconfiguration and RAs will be enabled on all interfaces even if the ifcfg file has IPV6AUTOCONF=no.

I have opened bug 1632830 to address this issue in the sysctl settings.

On another note, DHCPv6 has no bearing on the autoconfiguration mechanism, so in the future we may want to decouple use_dhcpv6 from the autoconfiguration settings in os-net-config.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on os-net-config (master)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: master
Review: https://review.openstack.org/350794
Reason: Per policy documented here: http://specs.openstack.org/openstack/tripleo-specs/specs/policy/patch-abandomment.html - we decided to abandon this patch. If you want to work on it again, feel free to restore it. Any question about that can be asked on #tripleo.

Revision history for this message
Dan Sneddon (dsneddon) wrote :

This change has been moved to low priority, since this issue was mitigated through the use of sysctl settings. Now, TripleO deployments have the option to set sysctl settings that will deactivate IPv6 autoconfig on a global or per-interface basis.

Changed in os-net-config:
importance: High → Low
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.