fix: report internally service as unhealthy if not running
Otherwise the internal code might assume that the service is still running and healthy, never issuing a health change event. Fixes #9271 Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
bc8bf9e8a8
commit
07b91797ca
@ -282,6 +282,10 @@ func (svcrunner *ServiceRunner) run(ctx context.Context, runnr runner.Runner) er
|
||||
go func() {
|
||||
errCh <- runnr.Run(func(s events.ServiceState, msg string, args ...any) {
|
||||
svcrunner.UpdateState(ctx, s, msg, args...)
|
||||
|
||||
if s != events.StateRunning {
|
||||
svcrunner.healthState.Update(false, "service not running")
|
||||
}
|
||||
})
|
||||
}()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user