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

Quoting all space-containing values breaks kernel command line management #28

Open
greatflyingsteve opened this issue Jul 31, 2024 · 1 comment · May be fixed by #29
Open

Quoting all space-containing values breaks kernel command line management #28

greatflyingsteve opened this issue Jul 31, 2024 · 1 comment · May be fixed by #29

Comments

@greatflyingsteve
Copy link

We use this module to create a custom profile, which includes the default network-latency profile. The default profile includes:

[bootloader]
cmdline_network_latency=skew_tick=1 tsc=reliable rcupdate.rcu_normal_after_boot=1

Our custom profile includes:

[bootloader]
cmdline="transparent_hugepage=never default_hugepagesz=1G hugepagesz=1G skew_tick=1"

These two values for cmdline get baked down into a single merged value, which of course contains the arguments from both - but it includes a little too much from both. The final result that ends up in the grub.cfg file is:

set tuned_params="skew_tick=1 tsc=reliable rcupdate.rcu_normal_after_boot=1 "transparent_hugepage=never default_hugepagesz=1G hugepagesz=1G skew_tick=1""

The quotes added by this template appear in the final result. That shouldn't happen, pretty obviously.

Going a step further, if you look at the default profiles that the tuned package installs under CentOS Stream 9, and you try to look for values that contain spaces and examine whether they're in fact quoted, a pattern emerges: mostly, no. They aren't quoted. sysctls that have spaces in the value, in fact, are the only quoted values anywhere in any of the default files.

While the quotes are probably treated as part of the value that eventually gets handed to sysctl, they are definitely treated as part of the value for the kernel command line, and that's pretty plainly never correct. It would be awesome to do away with quotes by default, and have our commandline functional again.

@greatflyingsteve
Copy link
Author

Before I forget completely: I have a patch for this that is tested and working across all ~3k of our hosts, which I do intend to contribute here just as soon as I can get a minute or five free to port the commits across from our in-house mirror.

@greatflyingsteve greatflyingsteve linked a pull request Sep 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant