Generated bonding configuration is incorrect.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Opinion
|
Low
|
Mike Pontillo | ||
curtin |
Fix Released
|
Undecided
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Users attempting to configure nic bonding and using both ipv4 and ipv6
encounter a misconfigured network due to a bug in curtin's handling of
bond configuration and ipv6. The error results in superflous
attributes and then broken ipv4 entries if preceeded by an ipv6
address.
This affects all curtin releases which support networking
configuration.
* This SRU fixes bonding and ipv6 configurations by no longer emitting
attributes for aliased interfaces and calculating the correct
inet type for a given interface.
[Test Case]
* On a Xenial 16.04 system
- apt-get install curtin
- cat >test.yaml <<EOF
# YAML example of a simple network config
network:
version: 1
config:
# Physical interfaces.
- type: physical
name: eth0
subnets:
- type: static
- type: static
EOF
- curtin apply_net -c test.yaml --target target
PASS: both greps return zero
FAIL: either grep returns non-zero
- grep "^iface eth0 inet6 static" target/
- grep "^iface eth0:1 inet static" target/
[Regression Potential]
* Low; users of this configuration would be broken already
[Original Description]
[Environment]
MAAS 2.0
[Description]
Given the following configuration: http://
The resulting /etc/network/
http://
Some bad aspects of the resulting configuration are:
1) An ipv4 address is configured on the alias, while an ipv6 address was expected,
auto bond0:1
iface bond0:1 inet6 static
address 172.27.72.7/26
2) It seems that there is no need to configure the bond-* options on the alias interfaces as these
options are inherited.
3) Could be possible to describe why and how the hwaddresses are selected for the aliases?
Related branches
- Ryan Harper (community): Approve
-
Diff: 70 lines (+47/-2)2 files modifiedcurtin/net/__init__.py (+6/-2)
tests/unittests/test_net.py (+41/-0)
- Ryan Harper (community): Approve
-
Diff: 71 lines (+16/-4)3 files modifiedcurtin/net/__init__.py (+10/-3)
examples/tests/bonding_network.yaml (+2/-0)
tests/unittests/test_net.py (+4/-1)
- cloud-init Commiters: Pending requested
-
Diff: 650 lines (+441/-66)3 files modifiedcloudinit/net/eni.py (+102/-66)
tests/unittests/helpers.py (+12/-0)
tests/unittests/test_net.py (+327/-0)
- Scott Moser: Approve
-
Diff: 2457 lines (+1095/-323)35 files modifiedcurtin/block/__init__.py (+9/-3)
curtin/commands/block_meta.py (+7/-2)
curtin/commands/curthooks.py (+19/-3)
curtin/commands/net_meta.py (+39/-28)
curtin/net/__init__.py (+25/-5)
curtin/reporter/handlers.py (+4/-13)
curtin/util.py (+56/-0)
debian/changelog (+19/-0)
examples/tests/basic_network.yaml (+6/-0)
examples/tests/basic_scsi.yaml (+72/-0)
examples/tests/bonding_network.yaml (+2/-0)
examples/tests/multipath.yaml (+38/-0)
examples/tests/simple.yaml (+3/-0)
helpers/common (+14/-6)
tests/unittests/test_net.py (+49/-1)
tests/unittests/test_reporter.py (+23/-2)
tests/vmtests/__init__.py (+121/-58)
tests/vmtests/helpers.py (+169/-0)
tests/vmtests/image_sync.py (+16/-2)
tests/vmtests/releases.py (+5/-0)
tests/vmtests/test_basic.py (+121/-4)
tests/vmtests/test_bcache_basic.py (+4/-0)
tests/vmtests/test_bonding.py (+6/-44)
tests/vmtests/test_lvm.py (+4/-4)
tests/vmtests/test_mdadm_bcache.py (+24/-24)
tests/vmtests/test_multipath.py (+63/-0)
tests/vmtests/test_network.py (+19/-57)
tests/vmtests/test_nvme.py (+4/-4)
tests/vmtests/test_raid5_bcache.py (+8/-4)
tests/vmtests/test_simple.py (+40/-0)
tests/vmtests/test_uefi_basic.py (+8/-8)
tools/jenkins-runner (+10/-0)
tools/launch (+74/-44)
tools/vmtest-sync-images (+5/-1)
tools/xkvm (+9/-6)
tags: | added: sts-needs-review |
description: | updated |
Changed in maas: | |
milestone: | none → 2.0.0 |
assignee: | nobody → Mike Pontillo (mpontillo) |
status: | New → Triaged |
importance: | Undecided → Critical |
tags: | added: curtin-sru |
Changed in curtin: | |
status: | Confirmed → Fix Committed |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
tags: | added: 4010 |
(1) From the screenshot you posted, it looks like the alias indeed has the IPv6 address, so the configuration that was rendered matches what is shown in the node interface configuration. (So I'm not sure what the bug is here?)
(2) I agree that the bond parameters on the alias interfaces is incorrect. Is this causing a problem, or is it just an annoyance? I would think that ifupdown would just ignore the extra parameters. This is generated by curtin, so I'll add curtin to this bug.
(3) When you create the bond, the MAC address is inherited from the first interface in the bond. Aliases in Linux always have the same MAC address as the parent interface. You can click the "MAC" column header (next to "Name") to double-check this.