Name the workload, not the candidate, in the restart-policy refusal
is_permanently_stopped is called on the incumbent as well as the
candidate since 8448f83, so a message naming only the candidate would
misdirect the first person who hits it. Unreachable today -- observe_unit
guarantees every recorded workload is Restart=no -- which is exactly why
the wording would be read cold.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
8445c6b45a
commit
da927ea30e
1 changed files with 1 additions and 1 deletions
|
|
@ -2969,7 +2969,7 @@ impl WorkloadPort for SystemdTransientWorkloadDriver {
|
|||
fn is_permanently_stopped(&self, observation: &WorkloadObservation) -> Result<bool> {
|
||||
ensure!(
|
||||
observation.restart_policy == "no",
|
||||
"candidate unit does not carry the admitted Restart=no policy"
|
||||
"workload unit does not carry the admitted Restart=no policy"
|
||||
);
|
||||
let Some(unit) = self.show_unit(&observation.unit)? else {
|
||||
// systemd has forgotten the unit entirely, so nothing will start it.
|
||||
|
|
|
|||
Loading…
Reference in a new issue