Browse Source

Merge "bugfix: Ensure kernel_package param is not required"

Zuul 6 months ago
parent
commit
48c6c20a7f
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      images/maas-region-controller/2.3_kernel_package.patch

+ 6
- 5
images/maas-region-controller/2.3_kernel_package.patch View File

@@ -1,12 +1,15 @@
1 1
 --- preseed.py	2018-10-15 12:52:41.611027184 -0700
2
-+++ preseed2.py	2018-10-16 13:42:51.824755746 -0700
3
-@@ -317,7 +317,23 @@
2
++++ preseed2.py	2018-10-19 07:26:10.985282758 -0700
3
+@@ -317,7 +317,25 @@
4 4
      The BootResourceFile table contains a mapping between hwe kernels and
5 5
      Ubuntu package names. If this mapping is missing we fall back to letting
6 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 11
 +    # determine if this node has kernel parameters applied by drydock
12
++    # and override kpackage if we discover the right properties
10 13
 +    kernel_opt_tag = "%s_kp" % (node.hostname)
11 14
 +    if kernel_opt_tag in node.tag_names():
12 15
 +
@@ -19,8 +22,6 @@
19 22
 +        kdict = dict(kparam.split('=') for kparam in kparams)
20 23
 +        if 'kernel_package' in kdict:
21 24
 +            kpackage = kdict['kernel_package']
22
-+    else:
23
-+        kpackage = BootResource.objects.get_kpackage_for_node(node)
24 25
 +
25 26
      if kpackage:
26 27
          kernel_config = {

Loading…
Cancel
Save