Global kernel command line options not passed with tags

Bug #1927657 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Unassigned

Bug Description

While debugging another bug I was asked to add "earlyprintk=efi" to the kernel command line. I added it on the settings page as a global kernel command line option. When I checked this option wasn't applied to the ephemeral environment nor was it applied to a deployed system.

Related branches

Revision history for this message
Björn Tillenius (bjornt) wrote :

Are you referring to the earlyprintk parameter specifically, or kernel parameters in general?

Because I've confirmed that you can get serial console logging to work, both for the ephemeral environments and the deployed machine, using the global kernel parameter settings.

I also tried adding earlyprintk=efi, but didn't see any extra debug printing from that. So I'm assuming that's the problem, which I don't think is serious enough to block a release. How does this work in 2.9?

Changed in maas:
milestone: 3.0.0-rc1 → 3.0.1
Revision history for this message
Lee Trager (ltrager) wrote :

When I added earlyprintk=efi to global kernel command line options it was never added to any system in either the ephemeral or deployed environment. I confirmed this by checking /proc/cmdline in both the ephemeral and deployed system. On the deployed systems the command line option is never added to /boot/efi/EFI/ubuntu/grub.cfg, /boot/grub/grub.cfg, or /etc/default/grub.

Alberto updated Node.get_effective_kernel_options() in 7278a2491e to include all kernel command line options from different tags but dropped global kernel command line support.

Lee Trager (ltrager)
summary: - Kernel command line options not passed
+ Global kernel command line options not passed with tags
Revision history for this message
Björn Tillenius (bjornt) wrote :

Ah, I missed that you said the systems had tags in the title.

Then that explains it. If the machine has a tag that defines kernel options, the global ones aren't used. This is true for both 2.9 and 3.0, so no regression there.

Also, if the machine doesn't have a tag, the global kernel options are used. This is true in both 2.9 and 3.0.

Yes, Alberto changed get_effective_kernel_options(), to not get the default kernel options from the DB config. But get_effective_kernel_options() is always called with the default kernel options as default_kernel_opts, which does get returned if no tags match. Just like in 2.9.

I agree that this is confusing. But considering the are "default" kernel parameters, it implies that you can override it somehow. So I do think the behavior makes sense for 3.0, but at some point we should revisit how we handle kernel parameters.

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Lee Trager (ltrager) wrote :

The way kernel options are done is confusing for two reasons

1. You can only add kernel options as global kernel options in the UI. There is no way to create tags with kernel options. The UI leads users to think that is the only way to add kernel options. No where in the UI does it state these options may be overridden by tags.
2. MAAS automatically adds a tag with kernel options for console logging when machines are composed. So MAAS is automatically overriding user defined options without warning the user.

The attached MP adds global kernel options before kernel options from tags. The kernel uses the last definition so this allows tags to override the global default. This behavior is predictable and ensures user defined options, wherever they may be, continue to get used.

Changed in maas:
status: Incomplete → In Progress
Changed in maas:
status: In Progress → Fix Committed
Alberto Donato (ack)
Changed in maas:
milestone: 3.0.1 → 3.0.0-rc1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.