Unit tests for sysconfig are flawed:
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=
IPV6INIT=yes
NETMASK=64
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
'''
Compare this to the doc:
https:/
IPV6ADDR=address
where address is the first static, or primary, IPv6 address on an interface.
The format is Address/
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
- Scott Moser: Approve
- Server Team CI bot: Approve (continuous-integration)
-
Diff: 458 lines (+199/-132)3 files modifiedcloudinit/net/sysconfig.py (+174/-70)
tests/unittests/test_distros/test_netconfig.py (+3/-5)
tests/unittests/test_net.py (+22/-57)
- Server Team CI bot: Approve (continuous-integration)
- cloud-init Commiters: Pending requested
-
Diff: 453 lines (+194/-132)3 files modifiedcloudinit/net/sysconfig.py (+169/-70)
tests/unittests/test_distros/test_netconfig.py (+3/-5)
tests/unittests/test_net.py (+22/-57)
Changed in cloud-init: | |
assignee: | nobody → Andreas Karis (akaris) |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
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