sailesh1993 / rpms / cloud-init

Forked from rpms/cloud-init a year ago
Clone
297660
From 15852ea6958c18e3830aa9244b36cd0decc93b95 Mon Sep 17 00:00:00 2001
297660
From: Eduardo Otubo <otubo@redhat.com>
297660
Date: Thu, 7 Jan 2021 16:51:30 +0100
297660
Subject: [PATCH] Missing IPV6_AUTOCONF=no to render sysconfig dhcp6 stateful
297660
 on RHEL (#753)
297660
297660
RH-Author: Eduardo Terrell Ferrari Otubo (eterrell)
297660
RH-MergeRequest: 29: Missing IPV6_AUTOCONF=no to render sysconfig dhcp6 stateful on RHEL (#753)
297660
RH-Commit: [1/1] 46943f83071d243bcc61f9d987b4fe7d9cf98596 (eterrell/cloud-init)
297660
RH-Bugzilla: 1859695
297660
297660
IPV6_AUTOCONF needs to be set to 'no' on RHEL so NetworkManager can
297660
properly acquire ipv6 address.
297660
297660
rhbz: #1859695
297660
297660
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
297660
---
297660
 cloudinit/net/sysconfig.py  | 1 +
297660
 tests/unittests/test_net.py | 1 +
297660
 2 files changed, 2 insertions(+)
297660
297660
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
297660
index 94801a93..1793977d 100644
297660
--- a/cloudinit/net/sysconfig.py
297660
+++ b/cloudinit/net/sysconfig.py
297660
@@ -397,6 +397,7 @@ class Renderer(renderer.Renderer):
297660
                     iface_cfg['BOOTPROTO'] = 'dhcp'
297660
                     iface_cfg['DHCPV6C'] = True
297660
                     iface_cfg['IPV6INIT'] = True
297660
+                    iface_cfg['IPV6_AUTOCONF'] = False
297660
                 else:
297660
                     iface_cfg['IPV6INIT'] = True
297660
                     # Configure network settings using DHCPv6
297660
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
297660
index bcd261db..844d5ba8 100644
297660
--- a/tests/unittests/test_net.py
297660
+++ b/tests/unittests/test_net.py
297660
@@ -1363,6 +1363,7 @@ NETWORK_CONFIGS = {
297660
             DEVICE=iface0
297660
             DHCPV6C=yes
297660
             IPV6INIT=yes
297660
+            IPV6_AUTOCONF=no
297660
             IPV6_FORCE_ACCEPT_RA=yes
297660
             DEVICE=iface0
297660
             NM_CONTROLLED=no
297660
-- 
297660
2.18.4
297660