summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Meadows <alan.meadows@gmail.com>2018-10-19 07:56:18 -0700
committerAlan Meadows <alan.meadows@gmail.com>2018-10-19 07:56:18 -0700
commit037bde993421857af1b39955354341395ed2a858 (patch)
treefd8b68272a4a59990eb99b38c552941ba5d574a1
parentcdfb1737da21bbb097113a6aaeaae37117038781 (diff)
bugfix: Ensure kernel_package param is not required
A previous patchset introduced a new kernel param option 'kernel_package.' This patch corrects the logic in that so that the parameter is not a required parameter - and if absent falls back to the traditional MaaS behavior which will select the latest kernel from the appropriate line. Change-Id: Icc62b27e0f39914fb73fb9f655d9b7b0b6c6f489
Notes
Notes (review): Code-Review+2: Kaspars Skels <kaspars.skels@gmail.com> Code-Review+2: Scott Hussey <sthussey@att.com> Code-Review+2: Craig Anderson <craig.anderson@att.com> Workflow+1: Craig Anderson <craig.anderson@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 19 Oct 2018 16:06:50 +0000 Reviewed-on: https://review.openstack.org/611897 Project: openstack/airship-maas Branch: refs/heads/master
-rw-r--r--images/maas-region-controller/2.3_kernel_package.patch11
1 files changed, 6 insertions, 5 deletions
diff --git a/images/maas-region-controller/2.3_kernel_package.patch b/images/maas-region-controller/2.3_kernel_package.patch
index 8ac56cd..943e8c1 100644
--- a/images/maas-region-controller/2.3_kernel_package.patch
+++ b/images/maas-region-controller/2.3_kernel_package.patch
@@ -1,12 +1,15 @@
1--- preseed.py 2018-10-15 12:52:41.611027184 -0700 1--- preseed.py 2018-10-15 12:52:41.611027184 -0700
2+++ preseed2.py 2018-10-16 13:42:51.824755746 -0700 2+++ preseed2.py 2018-10-19 07:26:10.985282758 -0700
3@@ -317,7 +317,23 @@ 3@@ -317,7 +317,25 @@
4 The BootResourceFile table contains a mapping between hwe kernels and 4 The BootResourceFile table contains a mapping between hwe kernels and
5 Ubuntu package names. If this mapping is missing we fall back to letting 5 Ubuntu package names. If this mapping is missing we fall back to letting
6 Curtin figure out which kernel should be installed""" 6 Curtin figure out which kernel should be installed"""
7- kpackage = BootResource.objects.get_kpackage_for_node(node) 7+
8+ # previous logic to retrieve kpackage parameter
9 kpackage = BootResource.objects.get_kpackage_for_node(node)
8+ 10+
9+ # determine if this node has kernel parameters applied by drydock 11+ # determine if this node has kernel parameters applied by drydock
12+ # and override kpackage if we discover the right properties
10+ kernel_opt_tag = "%s_kp" % (node.hostname) 13+ kernel_opt_tag = "%s_kp" % (node.hostname)
11+ if kernel_opt_tag in node.tag_names(): 14+ if kernel_opt_tag in node.tag_names():
12+ 15+
@@ -19,8 +22,6 @@
19+ kdict = dict(kparam.split('=') for kparam in kparams) 22+ kdict = dict(kparam.split('=') for kparam in kparams)
20+ if 'kernel_package' in kdict: 23+ if 'kernel_package' in kdict:
21+ kpackage = kdict['kernel_package'] 24+ kpackage = kdict['kernel_package']
22+ else:
23+ kpackage = BootResource.objects.get_kpackage_for_node(node)
24+ 25+
25 if kpackage: 26 if kpackage:
26 kernel_config = { 27 kernel_config = {