Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel-parameters does not accept single-word config options, specifying them causes reboot-loops #3957

Open
james-masson opened this issue May 14, 2024 · 3 comments
Labels
type/bug Something isn't working

Comments

@james-masson
Copy link

Image I'm using:
bottlerocket-aws-k8s-1.29-x86_64-v1.19.4

What I expected to happen:

I want to turn off SMT in the kernel via settings.boot.kernel-parameters
This is not a key-value pair.

[settings.boot]
reboot-to-reconcile = true

[settings.boot.kernel-parameters]
"nosmt" = []
# "nosmt"

What actually happened:

The config does not seem to accept anything other than key = value, and there are many kernel config options that are only key.

The system goes into a reboot loop if I leave an empty value array.

How to reproduce the problem:

Use one or other of the options below.

[settings.boot]
reboot-to-reconcile = true

[settings.boot.kernel-parameters]
"nosmt" = []
# "nosmt"
@james-masson james-masson added status/needs-triage Pending triage or re-evaluation type/bug Something isn't working labels May 14, 2024
@yeazelm
Copy link
Contributor

yeazelm commented May 14, 2024

Hello @james-masson, Thanks for cutting this issue! Can you try using nosmt=force for this affect?
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html?highlight=kernel%20parameters calls out that should work:

        nosmt           [KNL,MIPS,PPC,S390,EARLY] Disable symmetric multithreading (SMT).
                        Equivalent to smt=1.

                        [KNL,X86,PPC] Disable symmetric multithreading (SMT).
                        nosmt=force: Force disable SMT, cannot be undone
                                     via the sysfs control file.

@yeazelm yeazelm removed the status/needs-triage Pending triage or re-evaluation label May 14, 2024
@james-masson
Copy link
Author

Hi @yeazelm ,

Yes I did try that as well, it didn't work ( but the value was passed correctly to the kernel command line ). I did expect that to work, so was a bit puzzled. I also tried smt=1, which is another alternative.

I did succeed turning off SMT via sysfs, so the problem I'm reporting here is not that I can't turn SMT off, but more that Bottlerocket doesn't seem to understand the concept of the old-school single arg kernel options.

( and separately I'm cuing up a PR for the K8s reserved-cpus as per our email chain )

thanks!

@yeazelm
Copy link
Contributor

yeazelm commented May 14, 2024

Thanks for the confirmation @james-masson. I agree with your evaluation, it does look like the currently logic implicitly expects a key-value pair so I was hoping to find a pair that works which is faster than figuring out how we have the single line options. We have similar issues with order: #3647 but these are slightly different things.

You might also be able to do this with a bootstrap container until we sort out single value command line arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants