Unit tests for sysconfig are flawed:

Bug #1685532 reported by Andreas Karis on 2017-04-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
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

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

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) on 2017-04-22
Changed in cloud-init:
assignee: nobody → Andreas Karis (akaris)
Scott Moser (smoser) on 2017-05-17
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Scott Moser (smoser) on 2017-05-23
Changed in cloud-init:
status: Confirmed → Fix Committed

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers