daemon: move check for CPU-realtime daemon options#43131
Conversation
| if cdcgroups.Mode() == cdcgroups.Unified { | ||
| return errors.New("daemon-scoped cpu-rt-period and cpu-rt-runtime are not implemented for cgroup v2") | ||
| } | ||
|
|
||
| // FIXME this is very expensive way to check if cpu rt is supported | ||
| sysInfo := daemon.RawSysInfo() | ||
| if !sysInfo.CPURealtime { | ||
| return errors.New("daemon-scoped cpu-rt-period and cpu-rt-runtime are not supported by the kernel") | ||
| } | ||
|
|
There was a problem hiding this comment.
If we have merged #43130, we could consider to keep the check here as well, but I don't think we would need it if we make the daemon fail to start with these options set
bd2fa3b to
1637aa6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
1637aa6 to
d907ca2
Compare
d907ca2 to
89902f0
Compare
|
@tianon @AkihiroSuda ptal |
| return errors.New("daemon-scoped cpu-rt-period and cpu-rt-runtime are not implemented for cgroup v2") | ||
| } | ||
|
|
||
| // FIXME this is very expensive way to check if cpu rt is supported |
There was a problem hiding this comment.
Is it expensive enough that we should skip it for now or just that we should think about maybe finding an alternative "eventually" ? (Given that this is a comment and the check is here, I'm assuming the latter? 🙈)
There was a problem hiding this comment.
Yeah, so I doubted it I should just remove it now. Previously it was part of "container create", so far more critical if it was slow. Now that it's in the daemon startup, I guess it's not really a problem anymore (only done once / twice at startup)
There was a problem hiding this comment.
Removed the TODO / comment 👍
Perform the validation when the daemon starts instead of performing these validations for each individual container, so that we can fail early. Signed-off-by: Sebastiaan van Stijn <[email protected]>
89902f0 to
5263bea
Compare
|
@AkihiroSuda PTAL |
|
Thanks @AkihiroSuda ! If you find some time at some point, perhaps you could have a look at #43213 (you probably know more about that from the top of your head than I do 😅) |
follow-up to #43130
Perform the validation when the daemon starts instead of performing these
validations for each individual container, so that we can fail early.
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)