Merge lp:~julian-edwards/maas/1.4-enable-arm-again into lp:maas/1.4

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 1713
Proposed branch: lp:~julian-edwards/maas/1.4-enable-arm-again
Merge into: lp:maas/1.4
Diff against target: 130 lines (+55/-9)
5 files modified
etc/maas/import_pxe_files (+1/-1)
etc/maas/templates/pxe/config.commissioning.armhf.template (+6/-1)
etc/maas/templates/pxe/config.install.armhf.template (+6/-1)
scripts/maas-import-pxe-files (+3/-6)
src/provisioningserver/pxe/tests/test_config.py (+39/-0)
To merge this branch: bzr merge lp:~julian-edwards/maas/1.4-enable-arm-again
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+192553@code.launchpad.net

Commit message

Backport trunk r1719: Fix armhf kernel downloading and ephemeral usage for the post-quantal era where the highbank subarch is now just generic.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Self-approving straight backport.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/maas/import_pxe_files'
2--- etc/maas/import_pxe_files 2013-10-09 15:23:58 +0000
3+++ etc/maas/import_pxe_files 2013-10-24 17:40:47 +0000
4@@ -13,6 +13,6 @@
5
6
7 #RELEASES="precise quantal raring saucy"
8-#ARCHES="amd64/generic i386/generic armhf/highbank"
9+#ARCHES="amd64/generic i386/generic armhf/highbank armhf/generic"
10 #LOCALE="en_US"
11 #IMPORT_EPHEMERALS=1
12
13=== modified file 'etc/maas/templates/pxe/config.commissioning.armhf.template'
14--- etc/maas/templates/pxe/config.commissioning.armhf.template 2013-06-03 11:32:28 +0000
15+++ etc/maas/templates/pxe/config.commissioning.armhf.template 2013-10-24 17:40:47 +0000
16@@ -1,7 +1,12 @@
17 DEFAULT execute
18
19 LABEL execute
20- {{py: # SAY is not implemented in U-Boot }}
21+ {{# SAY is not implemented in U-Boot }}
22+ {{if kernel_params.release not in ("precise", "quantal")}}
23+ {{# Return a copy of kernel_params with an overridden subarch.
24+ See https://bugs.launchpad.net/maas/+bug/1166994 }}
25+ {{py: kernel_params=kernel_params(subarch="generic")}}
26+ {{endif}}
27 KERNEL {{kernel_params | kernel_path }}
28 INITRD {{kernel_params | initrd_path }}
29 APPEND {{kernel_params | kernel_command}}
30
31=== modified file 'etc/maas/templates/pxe/config.install.armhf.template'
32--- etc/maas/templates/pxe/config.install.armhf.template 2013-06-03 11:32:28 +0000
33+++ etc/maas/templates/pxe/config.install.armhf.template 2013-10-24 17:40:47 +0000
34@@ -1,7 +1,12 @@
35 DEFAULT execute
36
37 LABEL execute
38- {{py: # SAY is not implemented in U-Boot }}
39+ {{# SAY is not implemented in U-Boot }}
40+ {{if kernel_params.release not in ("precise", "quantal")}}
41+ {{# Return a copy of kernel_params with an overridden subarch.
42+ See https://bugs.launchpad.net/maas/+bug/1166994 }}
43+ {{py: kernel_params=kernel_params(subarch="generic")}}
44+ {{endif}}
45 KERNEL {{kernel_params | kernel_path }}
46 INITRD {{kernel_params | initrd_path }}
47 APPEND {{kernel_params | kernel_command}}
48
49=== modified file 'scripts/maas-import-pxe-files'
50--- scripts/maas-import-pxe-files 2013-10-03 13:53:44 +0000
51+++ scripts/maas-import-pxe-files 2013-10-24 17:40:47 +0000
52@@ -39,10 +39,7 @@
53 STABLE_RELEASE=$(distro-info --stable)
54
55 # Supported architectures.
56-# armhf/highbank is also supported by this script, but cannot be enabled here
57-# until maas-import-ephemerals also supports it or IMPORT_EPHEMERALS is set to
58-# 0.
59-ARCHES=${ARCHES:-amd64/generic i386/generic armhf/highbank}
60+ARCHES=${ARCHES:-amd64/generic i386/generic armhf/highbank armhf/generic}
61
62 # Command line to download a resource at a given URL into the current
63 # directory. A wget command line will work here, but curl will do as well.
64@@ -191,7 +188,7 @@
65 amd64/*|i386/*)
66 echo "linux initrd.gz"
67 ;;
68- armhf/highbank)
69+ armhf/*)
70 echo "vmlinuz initrd.gz"
71 ;;
72 *)
73@@ -211,7 +208,7 @@
74 amd64/*|i386/*)
75 # do nothing
76 ;;
77- armhf/highbank)
78+ armhf/*)
79 mv vmlinuz linux
80 ;;
81 *)
82
83=== modified file 'src/provisioningserver/pxe/tests/test_config.py'
84--- src/provisioningserver/pxe/tests/test_config.py 2013-10-07 09:12:40 +0000
85+++ src/provisioningserver/pxe/tests/test_config.py 2013-10-24 17:40:47 +0000
86@@ -234,6 +234,45 @@
87 self.assertNotIn("LOCALBOOT", output)
88
89
90+class TestRenderArmhfSubarchScenarios(MAASTestCase):
91+ """See bug https://bugs.launchpad.net/maas/+bug/1166994"""
92+
93+ scenarios = [
94+ ("install_precise", dict(
95+ arch="armhf", purpose="install", release="precise",
96+ expect_in_output="highbank")),
97+ ("install_quantal", dict(
98+ arch="armhf", purpose="install", release="quantal",
99+ expect_in_output="highbank")),
100+ ("install_saucy", dict(
101+ arch="armhf", purpose="install", release="saucy",
102+ expect_in_output="generic")),
103+ ("commission_precise", dict(
104+ arch="armhf", purpose="commissioning", release="precise",
105+ expect_in_output="highbank")),
106+ ("commission_quantal", dict(
107+ arch="armhf", purpose="commissioning", release="quantal",
108+ expect_in_output="highbank")),
109+ ("commission_saucy", dict(
110+ arch="armhf", purpose="commissioning", release="saucy",
111+ expect_in_output="generic")),
112+ ]
113+
114+ def test_highbank_scenarios(self):
115+ # get_ephemeral_name depends on ephemeral images being present but
116+ # doesn't affect the test outcome, so patch it out.
117+ self.patch(
118+ kernel_opts,
119+ "get_ephemeral_name").return_value = "ephemeral_name"
120+ options = {
121+ "kernel_params": make_kernel_parameters(
122+ arch=self.arch, purpose=self.purpose, subarch="highbank",
123+ release=self.release),
124+ }
125+ output = render_pxe_config(**options)
126+ self.assertIn(self.expect_in_output, output)
127+
128+
129 class TestRenderPXEConfigScenarios(MAASTestCase):
130 """Tests for `provisioningserver.pxe.config.render_pxe_config`."""
131

Subscribers

People subscribed via source and target branches

to all changes: