Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #382: do not clear service conditions if only paused
Introduced back in v4.3-rc2, 82cc10b, the support for automatic service conditions have had a weird and unintended behavior. Any change in state (see doc/svc-machine.png) caused Finit to clear out *all* previously acquired service conditions. However, when moving between RUNNING and PAUSED states, a service should not have its conditions cleared. The PAUSED state, seen also by all conditions moving to FLUX, is only temporary while an `initctl reload` is processed. If a service has no changes to be applied it will move back to RUNNING. Also, we cannot clear the service conditions because other run/task or services may depend on it and clearing them would cause Finit to SIGTERM these processes (since they are no longer eligible to run). This patch not only adds this pre-condition to `cond_clearn()`, it also clarifies which state (before or after) the particular code is interested in. Signed-off-by: Joachim Wiberg <[email protected]>
- Loading branch information