-
Notifications
You must be signed in to change notification settings - Fork 59
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
Lower kernel printk level after boot #1244
Comments
Yep. Luckily I think we are close to finishing that work.
I think the largest (most annoying) issue that I experience here is the audit messages getting printed out, which has its own separate issue and potential solution. |
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 before exiting the initramfs. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now.
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 before exiting the initramfs. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now.
Yeah, audit on FCOS is definitely a big part of it, but unfortunately we diverged here and rhcos includes auditd, so doesn't get hit by that. But...an example of something that's common between these is this:
Not spewing all that stuff about the default bridge device we create every time we run a container will be an IMO enormous win that is orthogonal to auditd. |
I'm still not convinced. I do think having the kernel messages hit the console are useful when there are no other ways to debug what went wrong. It feels like here we are optimizing for the "local typing on the console" case, which isn't really what we encourage users to do. Of course, sometimes a user needs to access the console to run commands to debug, but the kernel messages aren't that much of a bother in that case IMO. This lack of clear benefit, and considering we're about to fix #567 anyway makes me lean towards not doing this. Though, I'd be supportive if this was done Fedora wide or in dracut upstream. I'm interested in what others think. Added the meeting label for discussion. |
Note we do still get warning-level and above messages on the console. And we get all debug level messages from before the switch to the real root. |
We've seen downstream complaints about these exact messages and how they can be alarming - https://bugzilla.redhat.com/show_bug.cgi?id=2064467 |
This was discussed in today's community meeting:
|
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
quiet
The fix for this went into |
The fix for this went into |
The fix for this went into |
When For users who prefer the old spammy behavior, this can now be achieved using the following Terraform snippet
Sorry, we use Terraform with ignition directly, so I don't have a tested Butane version. But the translation into Butane should be straightforward I guess. Our use case is:
|
The Butane equivalent is: variant: fcos
version: 1.4.0
storage:
files:
- path: /etc/sysctl.d/99-printk.conf
contents:
inline: |
kernel.printk=7 4 1 7 The |
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
Closes: coreos/fedora-coreos-tracker#1244 A lot going on for this simple service. See the tracker issue above for more info, but briefly: Anaconda has historically injected `quiet` into the kernel command line in many cases, and this suppresses *both* kernel and systemd output. On computers in general, but particularly many bare metal servers, the serial console can be slow. This can cause reliability issues. However for servers, we usually *do* want to see informational output when they boot. For example, today the kernel "mitigations" information for hardware vulnerabilities is output. This change is a compromise; we boot up at the kernel's default verbosity level (which for Fedora and derivatives is the upstream 7), but switch to 4 very early on in the real root. At that point, we've gotten most of the boot time output, and our initramfs is not extremely performance sensitive right now. Also, we explicitly only *lower* the output log level, and only if there isn't explicitly `debug` on the kernel command line.
Most other Fedora editions use anaconda, which for a long time has injected the
quiet
kernel command line argument because it has a history of use on desktop systems where we don't want users to see kernel output spew by default.We do want server administrators to see kernel output by default.
Fedora CoreOS has never injected the
quiet
karg, and as a consequence too this means that for later runtime the kernel is much more verbose.This is particularly bad in concert with #567
which causes this verbose output on slow serial consoles.
I think #567 is the primary fix but we should also consider at least quieting kmsg after switching to the real root successfully.
The text was updated successfully, but these errors were encountered: