Commit dede3bf
committed
release: prepend logind configuration with number
Kubelet is hardcoded to create a 99-kubelet.conf[1] file when the current
InhibitDelayMaxSec is lower than the requested shutdownGracePeriod[2].
Kubelet then reloads systemd-logind and checks that its requested
InhibitDelayMaxSec has been applied.
Logind will gather all drop-in files and merge lexicographically[3],
with later files taking precedence on settings over earlier ones; the
current filename of `systemd-logind.conf` will _always_ have its
InhibitDelayMaxSec set over `99-kubelet.conf`. This results in kubelet
failing to set up an inhibition lock when setting
settings.kubernetes.shutdown-grace-period>=300.
Following this change, the InhibitDelayMaxSec set in the image still
applies but can be overridden when by kubelet as `99-kubelet.conf` will
take precedence.
[1] https://github.com/kubernetes/kubernetes/blob/release-1.33/pkg/kubelet/nodeshutdown/systemd/inhibit_linux.go#L173-L176
[2] https://github.com/kubernetes/kubernetes/blob/release-1.33/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go#L185
[3] https://www.freedesktop.org/software/systemd/man/latest/logind.conf.html1 parent dbe57db commit dede3bf
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
0 commit comments