Merge ~smoser/curtin:cleanup/always-use-bootif into curtin:master
- Git
- lp:~smoser/curtin
- cleanup/always-use-bootif
- Merge into master
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | 5e65be2056fc88db15d684b1833c86d4e299107c |
Merge reported by: | Scott Moser |
Merged at revision: | df7f58977c3d4e4630be894e295eae44be68af88 |
Proposed branch: | ~smoser/curtin:cleanup/always-use-bootif |
Merge into: | curtin:master |
Diff against target: |
192 lines (+31/-22) 10 files modified
tests/vmtests/__init__.py (+31/-12) tests/vmtests/test_centos_basic.py (+0/-2) tests/vmtests/test_network.py (+0/-1) tests/vmtests/test_network_alias.py (+0/-1) tests/vmtests/test_network_bonding.py (+0/-1) tests/vmtests/test_network_bridging.py (+0/-1) tests/vmtests/test_network_ipv6.py (+0/-1) tests/vmtests/test_network_mtu.py (+0/-1) tests/vmtests/test_network_static.py (+0/-1) tests/vmtests/test_network_vlan.py (+0/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Ryan Harper (community) | Approve | ||
Review via email: mp+337670@code.launchpad.net |
Commit message
vmtest: always boot with BOOTIF and ip=:::::BOOTIF:dhcp
This excercises part of boot that was excercised in MAAS but not here.
Cloud-initramfs
See bug #1749019 for some more context.
Description of the change
see commit message
Server Team CI bot (server-team-bot) wrote : | # |
Scott Moser (smoser) wrote : | # |
https:/
has a run of 56e5408653d9f9b
Server Team CI bot (server-team-bot) wrote : | # |
FAILED: Continuous integration, rev:56e5408653d
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:d1e2eb8cae9
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Ryan Harper (raharper) : | # |
Scott Moser (smoser) : | # |
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:4978209a9ef
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Ryan Harper (raharper) wrote : | # |
Nice, thanks for the refactor and comments. Approved with a vmtest run passing.
Scott Moser (smoser) wrote : | # |
Ryan,
good catch on hostname.
you were right, I documented the *wrong* format.
Apparently googles' answer to 'klibc ipconfig' was wrong:
https:/
There it is documented:
addr:
But Ubuntu's version:
https:/
documents (and uses):
<client-
So my code was right, but doc was wrong. They're fixed now.
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:5e65be2056f
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
Scott Moser (smoser) wrote : | # |
Jenkins run started at
https:/
Scott Moser (smoser) wrote : | # |
The above run failed on these two tests:
tests/
tests/
I did not reproduce those failures on diglett, and re-ran again
in jenkins just those tests at:
https:/
That was green.
Ryan mentioned in IRC: "those are load related failures".
so... I think this is ready to go.
Scott Moser (smoser) wrote : | # |
An upstream commit landed for this bug.
To view that commit see the following URL:
https:/
Preview Diff
1 | diff --git a/tests/vmtests/__init__.py b/tests/vmtests/__init__.py | |||
2 | index b5aa538..4f32c45 100644 | |||
3 | --- a/tests/vmtests/__init__.py | |||
4 | +++ b/tests/vmtests/__init__.py | |||
5 | @@ -708,8 +708,8 @@ class VMBaseClass(TestCase): | |||
6 | 708 | cmd.extend([ | 708 | cmd.extend([ |
7 | 709 | "--root-arg=root=%s" % root_url, | 709 | "--root-arg=root=%s" % root_url, |
8 | 710 | "--append=overlayroot=tmpfs", | 710 | "--append=overlayroot=tmpfs", |
9 | 711 | "--append=ip=dhcp", # enable networking | ||
10 | 712 | ]) | 711 | ]) |
11 | 712 | |||
12 | 713 | # getting resolvconf configured is only fixed in bionic | 713 | # getting resolvconf configured is only fixed in bionic |
13 | 714 | # the iscsi_auto handles resolvconf setup via call to | 714 | # the iscsi_auto handles resolvconf setup via call to |
14 | 715 | # configure_networking in initramfs | 715 | # configure_networking in initramfs |
15 | @@ -733,7 +733,7 @@ class VMBaseClass(TestCase): | |||
16 | 733 | cls.network_state = curtin_net.parse_net_config(cls.conf_file) | 733 | cls.network_state = curtin_net.parse_net_config(cls.conf_file) |
17 | 734 | logger.debug("Network state: {}".format(cls.network_state)) | 734 | logger.debug("Network state: {}".format(cls.network_state)) |
18 | 735 | 735 | ||
20 | 736 | # build -n arg list with macaddrs from net_config physical config | 736 | # build --netdev=arg list with 'physical' nics from net_config |
21 | 737 | macs = [] | 737 | macs = [] |
22 | 738 | interfaces = {} | 738 | interfaces = {} |
23 | 739 | if cls.network_state: | 739 | if cls.network_state: |
24 | @@ -744,16 +744,14 @@ class VMBaseClass(TestCase): | |||
25 | 744 | hwaddr = iface.get('mac_address') | 744 | hwaddr = iface.get('mac_address') |
26 | 745 | if iface['type'] == 'physical' and hwaddr: | 745 | if iface['type'] == 'physical' and hwaddr: |
27 | 746 | macs.append(hwaddr) | 746 | macs.append(hwaddr) |
38 | 747 | netdevs = [] | 747 | |
39 | 748 | if len(macs) > 0: | 748 | if len(macs) == 0: |
40 | 749 | # take first mac and mark it as the boot interface to prevent DHCP | 749 | macs = ["52:54:00:12:34:01"] |
41 | 750 | # on multiple interfaces which can hang the install. | 750 | |
42 | 751 | cmd.extend(["--append=BOOTIF=01-%s" % macs[0].replace(":", "-")]) | 751 | netdevs = ["--netdev=%s,mac=%s" % (DEFAULT_BRIDGE, m) for m in macs] |
43 | 752 | for mac in macs: | 752 | |
44 | 753 | netdevs.extend(["--netdev=" + DEFAULT_BRIDGE + | 753 | # Add kernel parameters to simulate network boot from first nic. |
45 | 754 | ",mac={}".format(mac)]) | 754 | cmd.extend(kernel_boot_cmdline_for_mac(macs[0])) |
36 | 755 | else: | ||
37 | 756 | netdevs.extend(["--netdev=" + DEFAULT_BRIDGE]) | ||
46 | 757 | 755 | ||
47 | 758 | # build disk arguments | 756 | # build disk arguments |
48 | 759 | disks = [] | 757 | disks = [] |
49 | @@ -1737,6 +1735,27 @@ def get_lan_ip(): | |||
50 | 1737 | return addr | 1735 | return addr |
51 | 1738 | 1736 | ||
52 | 1739 | 1737 | ||
53 | 1738 | def kernel_boot_cmdline_for_mac(mac): | ||
54 | 1739 | """Return kernel command line arguments for initramfs dhcp on mac. | ||
55 | 1740 | |||
56 | 1741 | Ubuntu initramfs respect klibc's ip= format for network config in | ||
57 | 1742 | initramfs. That format is: | ||
58 | 1743 | ip=addr:server:gateway:netmask:interface:proto | ||
59 | 1744 | see /usr/share/doc/libklibc/README.ipconfig.gz for more info. | ||
60 | 1745 | |||
61 | 1746 | If no 'interface' field is provided, dhcp will be tried on all. To allow | ||
62 | 1747 | specifying the interface in ip= parameter without knowing the name of the | ||
63 | 1748 | device that the kernel will choose, cloud-initramfs-dyn-netconf replaces | ||
64 | 1749 | 'BOOTIF' in the ip= parameter with the name found in BOOTIF. | ||
65 | 1750 | |||
66 | 1751 | Network bootloaders append to kernel command line | ||
67 | 1752 | BOOTIF=01-<mac-address> to indicate which mac they booted from. | ||
68 | 1753 | |||
69 | 1754 | Paired with BOOTIF replacement this ends up being: ip=::::eth0:dhcp.""" | ||
70 | 1755 | return ["--append=ip=:::::BOOTIF:dhcp", | ||
71 | 1756 | "--append=BOOTIF=01-%s" % mac.replace(":", "-")] | ||
72 | 1757 | |||
73 | 1758 | |||
74 | 1740 | def is_unsupported_ubuntu(release): | 1759 | def is_unsupported_ubuntu(release): |
75 | 1741 | global _UNSUPPORTED_UBUNTU | 1760 | global _UNSUPPORTED_UBUNTU |
76 | 1742 | udi = 'ubuntu-distro-info' | 1761 | udi = 'ubuntu-distro-info' |
77 | diff --git a/tests/vmtests/test_centos_basic.py b/tests/vmtests/test_centos_basic.py | |||
78 | index b576279..7857e74 100644 | |||
79 | --- a/tests/vmtests/test_centos_basic.py | |||
80 | +++ b/tests/vmtests/test_centos_basic.py | |||
81 | @@ -11,7 +11,6 @@ import textwrap | |||
82 | 11 | class CentosTestBasicAbs(VMBaseClass): | 11 | class CentosTestBasicAbs(VMBaseClass): |
83 | 12 | __test__ = False | 12 | __test__ = False |
84 | 13 | conf_file = "examples/tests/centos_basic.yaml" | 13 | conf_file = "examples/tests/centos_basic.yaml" |
85 | 14 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
86 | 15 | # XXX: command | tee output is required for Centos under SELinux | 14 | # XXX: command | tee output is required for Centos under SELinux |
87 | 16 | # http://danwalsh.livejournal.com/22860.html | 15 | # http://danwalsh.livejournal.com/22860.html |
88 | 17 | collect_scripts = VMBaseClass.collect_scripts + [textwrap.dedent( | 16 | collect_scripts = VMBaseClass.collect_scripts + [textwrap.dedent( |
89 | @@ -74,7 +73,6 @@ class Centos66FromXenialTestBasic(relbase.centos66fromxenial, | |||
90 | 74 | 73 | ||
91 | 75 | class CentosTestBasicNetworkAbs(TestNetworkBaseTestsAbs): | 74 | class CentosTestBasicNetworkAbs(TestNetworkBaseTestsAbs): |
92 | 76 | conf_file = "examples/tests/centos_basic.yaml" | 75 | conf_file = "examples/tests/centos_basic.yaml" |
93 | 77 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
94 | 78 | collect_scripts = TestNetworkBaseTestsAbs.collect_scripts + [ | 76 | collect_scripts = TestNetworkBaseTestsAbs.collect_scripts + [ |
95 | 79 | textwrap.dedent(""" | 77 | textwrap.dedent(""" |
96 | 80 | cd OUTPUT_COLLECT_D | 78 | cd OUTPUT_COLLECT_D |
97 | diff --git a/tests/vmtests/test_network.py b/tests/vmtests/test_network.py | |||
98 | index 6ce4262..59a25fe 100644 | |||
99 | --- a/tests/vmtests/test_network.py | |||
100 | +++ b/tests/vmtests/test_network.py | |||
101 | @@ -437,7 +437,6 @@ class TestNetworkBasicAbs(TestNetworkBaseTestsAbs): | |||
102 | 437 | 437 | ||
103 | 438 | class CentosTestNetworkBasicAbs(TestNetworkBaseTestsAbs): | 438 | class CentosTestNetworkBasicAbs(TestNetworkBaseTestsAbs): |
104 | 439 | conf_file = "examples/tests/centos_basic.yaml" | 439 | conf_file = "examples/tests/centos_basic.yaml" |
105 | 440 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
106 | 441 | collect_scripts = TestNetworkBaseTestsAbs.collect_scripts + [ | 440 | collect_scripts = TestNetworkBaseTestsAbs.collect_scripts + [ |
107 | 442 | textwrap.dedent(""" | 441 | textwrap.dedent(""" |
108 | 443 | cd OUTPUT_COLLECT_D | 442 | cd OUTPUT_COLLECT_D |
109 | diff --git a/tests/vmtests/test_network_alias.py b/tests/vmtests/test_network_alias.py | |||
110 | index 258554f..903b395 100644 | |||
111 | --- a/tests/vmtests/test_network_alias.py | |||
112 | +++ b/tests/vmtests/test_network_alias.py | |||
113 | @@ -19,7 +19,6 @@ class TestNetworkAliasAbs(TestNetworkBaseTestsAbs): | |||
114 | 19 | 19 | ||
115 | 20 | 20 | ||
116 | 21 | class CentosTestNetworkAliasAbs(TestNetworkAliasAbs): | 21 | class CentosTestNetworkAliasAbs(TestNetworkAliasAbs): |
117 | 22 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
118 | 23 | collect_scripts = TestNetworkAliasAbs.collect_scripts + [ | 22 | collect_scripts = TestNetworkAliasAbs.collect_scripts + [ |
119 | 24 | textwrap.dedent(""" | 23 | textwrap.dedent(""" |
120 | 25 | cd OUTPUT_COLLECT_D | 24 | cd OUTPUT_COLLECT_D |
121 | diff --git a/tests/vmtests/test_network_bonding.py b/tests/vmtests/test_network_bonding.py | |||
122 | index 24cf60f..7d07413 100644 | |||
123 | --- a/tests/vmtests/test_network_bonding.py | |||
124 | +++ b/tests/vmtests/test_network_bonding.py | |||
125 | @@ -16,7 +16,6 @@ class TestNetworkBondingAbs(TestNetworkBaseTestsAbs): | |||
126 | 16 | 16 | ||
127 | 17 | 17 | ||
128 | 18 | class CentosTestNetworkBondingAbs(TestNetworkBondingAbs): | 18 | class CentosTestNetworkBondingAbs(TestNetworkBondingAbs): |
129 | 19 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
130 | 20 | collect_scripts = TestNetworkBondingAbs.collect_scripts + [ | 19 | collect_scripts = TestNetworkBondingAbs.collect_scripts + [ |
131 | 21 | textwrap.dedent(""" | 20 | textwrap.dedent(""" |
132 | 22 | cd OUTPUT_COLLECT_D | 21 | cd OUTPUT_COLLECT_D |
133 | diff --git a/tests/vmtests/test_network_bridging.py b/tests/vmtests/test_network_bridging.py | |||
134 | index 5691b00..ca8964e 100644 | |||
135 | --- a/tests/vmtests/test_network_bridging.py | |||
136 | +++ b/tests/vmtests/test_network_bridging.py | |||
137 | @@ -184,7 +184,6 @@ class TestBridgeNetworkAbs(TestNetworkBaseTestsAbs): | |||
138 | 184 | 184 | ||
139 | 185 | 185 | ||
140 | 186 | class CentosTestBridgeNetworkAbs(TestBridgeNetworkAbs): | 186 | class CentosTestBridgeNetworkAbs(TestBridgeNetworkAbs): |
141 | 187 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
142 | 188 | collect_scripts = TestBridgeNetworkAbs.collect_scripts + [ | 187 | collect_scripts = TestBridgeNetworkAbs.collect_scripts + [ |
143 | 189 | textwrap.dedent(""" | 188 | textwrap.dedent(""" |
144 | 190 | cd OUTPUT_COLLECT_D | 189 | cd OUTPUT_COLLECT_D |
145 | diff --git a/tests/vmtests/test_network_ipv6.py b/tests/vmtests/test_network_ipv6.py | |||
146 | index 9bbfc1e..6d87dcf 100644 | |||
147 | --- a/tests/vmtests/test_network_ipv6.py | |||
148 | +++ b/tests/vmtests/test_network_ipv6.py | |||
149 | @@ -25,7 +25,6 @@ class TestNetworkIPV6Abs(TestNetworkBaseTestsAbs): | |||
150 | 25 | 25 | ||
151 | 26 | 26 | ||
152 | 27 | class CentosTestNetworkIPV6Abs(TestNetworkIPV6Abs): | 27 | class CentosTestNetworkIPV6Abs(TestNetworkIPV6Abs): |
153 | 28 | extra_kern_args = "BOOTIF=eth0-bc:76:4e:06:96:b3" | ||
154 | 29 | collect_scripts = TestNetworkIPV6Abs.collect_scripts + [ | 28 | collect_scripts = TestNetworkIPV6Abs.collect_scripts + [ |
155 | 30 | textwrap.dedent(""" | 29 | textwrap.dedent(""" |
156 | 31 | cd OUTPUT_COLLECT_D | 30 | cd OUTPUT_COLLECT_D |
157 | diff --git a/tests/vmtests/test_network_mtu.py b/tests/vmtests/test_network_mtu.py | |||
158 | index 86f4e48..41b1383 100644 | |||
159 | --- a/tests/vmtests/test_network_mtu.py | |||
160 | +++ b/tests/vmtests/test_network_mtu.py | |||
161 | @@ -120,7 +120,6 @@ class TestNetworkMtuAbs(TestNetworkIPV6Abs): | |||
162 | 120 | 120 | ||
163 | 121 | class CentosTestNetworkMtuAbs(TestNetworkMtuAbs): | 121 | class CentosTestNetworkMtuAbs(TestNetworkMtuAbs): |
164 | 122 | conf_file = "examples/tests/network_mtu.yaml" | 122 | conf_file = "examples/tests/network_mtu.yaml" |
165 | 123 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
166 | 124 | collect_scripts = TestNetworkMtuAbs.collect_scripts + [ | 123 | collect_scripts = TestNetworkMtuAbs.collect_scripts + [ |
167 | 125 | textwrap.dedent(""" | 124 | textwrap.dedent(""" |
168 | 126 | cd OUTPUT_COLLECT_D | 125 | cd OUTPUT_COLLECT_D |
169 | diff --git a/tests/vmtests/test_network_static.py b/tests/vmtests/test_network_static.py | |||
170 | index 2d226c0..d96d3eb 100644 | |||
171 | --- a/tests/vmtests/test_network_static.py | |||
172 | +++ b/tests/vmtests/test_network_static.py | |||
173 | @@ -13,7 +13,6 @@ class TestNetworkStaticAbs(TestNetworkBaseTestsAbs): | |||
174 | 13 | 13 | ||
175 | 14 | 14 | ||
176 | 15 | class CentosTestNetworkStaticAbs(TestNetworkStaticAbs): | 15 | class CentosTestNetworkStaticAbs(TestNetworkStaticAbs): |
177 | 16 | extra_kern_args = "BOOTIF=eth0-52:54:00:12:34:00" | ||
178 | 17 | collect_scripts = TestNetworkBaseTestsAbs.collect_scripts + [ | 16 | collect_scripts = TestNetworkBaseTestsAbs.collect_scripts + [ |
179 | 18 | textwrap.dedent(""" | 17 | textwrap.dedent(""" |
180 | 19 | cd OUTPUT_COLLECT_D | 18 | cd OUTPUT_COLLECT_D |
181 | diff --git a/tests/vmtests/test_network_vlan.py b/tests/vmtests/test_network_vlan.py | |||
182 | index 00eb445..3cb6eae 100644 | |||
183 | --- a/tests/vmtests/test_network_vlan.py | |||
184 | +++ b/tests/vmtests/test_network_vlan.py | |||
185 | @@ -54,7 +54,6 @@ class TestNetworkVlanAbs(TestNetworkBaseTestsAbs): | |||
186 | 54 | 54 | ||
187 | 55 | 55 | ||
188 | 56 | class CentosTestNetworkVlanAbs(TestNetworkVlanAbs): | 56 | class CentosTestNetworkVlanAbs(TestNetworkVlanAbs): |
189 | 57 | extra_kern_args = "BOOTIF=eth0-d4:be:d9:a8:49:13" | ||
190 | 58 | collect_scripts = TestNetworkVlanAbs.collect_scripts + [ | 57 | collect_scripts = TestNetworkVlanAbs.collect_scripts + [ |
191 | 59 | textwrap.dedent(""" | 58 | textwrap.dedent(""" |
192 | 60 | cd OUTPUT_COLLECT_D | 59 | cd OUTPUT_COLLECT_D |
FAILED: Continuous integration, rev:22ccd46450c c183154d2c445ea 7d545db5c740eb /jenkins. ubuntu. com/server/ job/curtin- ci/843/ /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-amd64/ 843/console /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-arm64/ 843/console /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-ppc64el/ 843/console /jenkins. ubuntu. com/server/ job/curtin- ci/nodes= metal-s390x/ 843/console
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/curtin- ci/843/ rebuild
https:/