Unit tests for sysconfig are flawed:

Bug #1685532 reported by Andreas Karis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Andreas Karis

Bug Description

Unit tests for sysconfig are flawed:

E.g.:
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=static
DEVICE=eth0
IPV6ADDR=2607:f0d0:1002:0011::2
IPV6INIT=yes
NETMASK=64
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
'''

Compare this to the doc:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html

 IPV6ADDR=address
    where address is the first static, or primary, IPv6 address on an interface.
    The format is Address/Prefix-length. If no prefix length is specified, /64 is assumed. Note that this setting depends on IPV6INIT being enabled.

NETMASK is a parameter for ipv4.

 NETMASKn=mask
    where mask is the netmask value and the n is expected to be consecutive positive integers starting from 0 (for example, NETMASK0). It is used for configurations with multiple IP addresses on an interface. It can be omitted if there is only one address being configured.

The tests are also incomplete, lacking several scenarios.

Related branches

Revision history for this message
Andreas Karis (akaris) wrote :

And from /usr/share/doc/initscripts-9.49.37/sysconfig.txt

    IPV6ADDR=<IPv6 address>[/<prefix length>]
      Specify a primary static IPv6 address here
      Optional, if normal host and a router advertisement daemon is on local link
      Required, if node is a router and interface should route packets
      Note: if prefix length is omitted, 64 is assumed

Revision history for this message
Andreas Karis (akaris) wrote :

Needs to be:

BOOTPROTO=static
DEVICE=eth0
IPV6ADDR=2607:f0d0:1002:0011::2/64
IPV6INIT=yes
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no

summary: - Unit tests for sysconfig are flawed and incomplete
+ Unit tests for sysconfig are flawed:
description: updated
Andreas Karis (akaris)
Changed in cloud-init:
assignee: nobody → Andreas Karis (akaris)
Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Scott Moser (smoser)
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
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.