BOTOPROTO handling between RHEL/Centos/Fedora and SUSE distros is different

Bug #1800854 reported by Robert Schweikert on 2018-10-31
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Medium
Unassigned

Bug Description

Looks like we need to figure out how to do distribution specific handling in sysconfig.py for the file content anyway.

For a static network configuration on openSUSE and SLES BOTOPROTO must be set to "static", but based on the comment in sysconfig.py

                # grep BOOTPROTO sysconfig.txt -A2 | head -3
                # BOOTPROTO=none|bootp|dhcp
                # 'bootp' or 'dhcp' cause a DHCP client
                # to run on the device. Any other
                # value causes any static configuration
                # in the file to be applied.
                # ==> the following should not be set to 'static'
                # but should remain 'none'
                # if iface_cfg['BOOTPROTO'] == 'none':
                # iface_cfg['BOOTPROTO'] = 'static'

This might cause trouble on RHEL/Centos/Fedora

Robert Schweikert (rjschwei) wrote :

I will carry the following in the SUSE package for now:

--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -314,7 +314,8 @@ class Renderer(renderer.Renderer):
                 # ==> the following should not be set to 'static'
                 # but should remain 'none'
                 # if iface_cfg['BOOTPROTO'] == 'none':
- # iface_cfg['BOOTPROTO'] = 'static'
+ # For SUSE this is different set to "static"
+ iface_cfg['BOOTPROTO'] = 'static'
                 if subnet_is_ipv6(subnet):
                     mtu_key = 'IPV6_MTU'
                     iface_cfg['IPV6INIT'] = True

Ryan Harper (raharper) wrote :

Hi,

Yes. I'm pretty close to thinking we need to have separate implementations for sysconfig.

Changed in cloud-init:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers