Skip to content

Commit

Permalink
fix: don't reset health status if service doesn't support health checks
Browse files Browse the repository at this point in the history
Fixes #9839

Bug was introduced in #9273

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Nov 29, 2024
1 parent b7609ed commit 95c6958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/system/service_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func (svcrunner *ServiceRunner) run(ctx context.Context, runnr runner.Runner) er
errCh <- runnr.Run(func(s events.ServiceState, msg string, args ...any) {
svcrunner.UpdateState(ctx, s, msg, args...)

if s != events.StateRunning {
if _, healthSupported := svcrunner.service.(HealthcheckedService); healthSupported && s != events.StateRunning {
svcrunner.healthState.Update(false, "service not running")
}
})
Expand Down

0 comments on commit 95c6958

Please sign in to comment.