Code review comment for ~ltrager/maas:lp1927657

Revision history for this message
Lee Trager (ltrager) wrote :

It was an improvement to include kernel options for all tags but it still leaves out the global kernel command line option. This includes everything. The global kernel command line options are defined first. This allows tags to override the kernel command line option as the kernel uses the last definition.

I've verified this by setting my kernel command line to the following and still having the system boot properly
BOOT_IMAGE=/boot/vmlinuz-5.4.0-73-generic root=/dev/null root=/dev/mapper/vg0-lv0 ro

I ran into this bug while testing UEFI SecureBoot with an LXD VM. I needed to add "earlyprintk=efi" to the kernel command line to gather additional debug information. The UI has no way to add a tag with a kernel option, the only way to do a kernel option in the UI is to add a global kernel command line option. The UI states "Boot parameters to pass to the kernel by default" which led me to believe it would always be added. When I deployed Ubuntu on an LXD VM my kernel command line option wasn't added. This was because MAAS automatically tags LXD VMs with "pod-console-logging" which contains a kernel command line option and any tag with a kernel option overrides the global default.

I feel this is safe to land because users can always override the global kernel command line option with a tag. It also makes it much clearer to always add all options instead of sometimes adding the global option and sometimes not.

« Back to merge proposal