From 06f63cc4157119d9d0eaff9becab1dad797e77ec Mon Sep 17 00:00:00 2001 From: "Sphicas, Phil (ps3910)" Date: Sat, 5 Oct 2019 19:32:23 -0700 Subject: [PATCH] fix: failed to render preseed with kernel flags (not k=v) When using tags with kernel_opts that contain standalone flags (e.g. debug, rcu_nocb_poll, etc.), or anything not of the form param=value, deployments fail with the following error: Failed to render preseed: dictionary update sequence element #x has length 1; 2 is required This patchset accommodates these kernel flags, and also params with multiple '=' signs (root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) Change-Id: I14cf1ca1e6a23e5fedf61e4a6b57bbc57cafc971 --- images/maas-region-controller/2.3_kernel_package.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/maas-region-controller/2.3_kernel_package.patch b/images/maas-region-controller/2.3_kernel_package.patch index 943e8c1..423f4f4 100644 --- a/images/maas-region-controller/2.3_kernel_package.patch +++ b/images/maas-region-controller/2.3_kernel_package.patch @@ -19,7 +19,7 @@ + # parse the string and find our package param value + # e.g. kernel_package=linux-image-4.15.0-34-generic + kparams = kernel_opts.split() -+ kdict = dict(kparam.split('=') for kparam in kparams) ++ kdict = dict(kparam.split('=',1) for kparam in kparams if '=' in kparam) + if 'kernel_package' in kdict: + kpackage = kdict['kernel_package'] +