core: Also refresh confext extensions when reloading notify-reload service (#33995)
`ExtensionImages=` and `ExtensionDirectories=` now let you specify vpick-named extensions; however, since they just get set up once when the service is started, you can't see newer versions without restarting the service entirely. Here, also reload confext extensions when you reload a service. This allows you to deploy a new version of some configuration and have it picked up at reload time without interruption to your workload. Right now, we would only reload confext extensions and leave the sysext ones behind, since it didn't seem prudent to swap out what is likely program code at reload. This is made possible by only going for the `SYSTEMD_CONFEXT_HIERARCHIES` overlays (which only contains `/etc`). This PR: - Adjusts `service.c` to also refresh extensions when needed. - Adds integration tests to check that a confext reload actually occurred. - Adds to the `systemd.exec` man pages to document this behavior. This is a follow up to #24864 and #31364. Thank you to @bluca and @goenkam for help in getting this up.
This commit is contained in:
@@ -213,6 +213,7 @@ static const char* const service_state_table[_SERVICE_STATE_MAX] = {
|
||||
[SERVICE_RELOAD] = "reload",
|
||||
[SERVICE_RELOAD_SIGNAL] = "reload-signal",
|
||||
[SERVICE_RELOAD_NOTIFY] = "reload-notify",
|
||||
[SERVICE_REFRESH_EXTENSIONS] = "refresh-extensions",
|
||||
[SERVICE_STOP] = "stop",
|
||||
[SERVICE_STOP_WATCHDOG] = "stop-watchdog",
|
||||
[SERVICE_STOP_SIGTERM] = "stop-sigterm",
|
||||
|
||||
@@ -138,6 +138,7 @@ typedef enum ServiceState {
|
||||
SERVICE_RELOAD, /* Reloading via ExecReload= */
|
||||
SERVICE_RELOAD_SIGNAL, /* Reloading via SIGHUP requested */
|
||||
SERVICE_RELOAD_NOTIFY, /* Waiting for READY=1 after RELOADING=1 notify */
|
||||
SERVICE_REFRESH_EXTENSIONS,/* Refreshing extensions for a reload request */
|
||||
SERVICE_MOUNTING, /* Performing a live mount into the namespace of the service */
|
||||
SERVICE_STOP, /* No STOP_PRE state, instead just register multiple STOP executables */
|
||||
SERVICE_STOP_WATCHDOG,
|
||||
|
||||
Reference in New Issue
Block a user