diff options
Diffstat (limited to 'net/dns/resolved.go')
| -rw-r--r-- | net/dns/resolved.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dns/resolved.go b/net/dns/resolved.go index d82d3fc31..fe7345fba 100644 --- a/net/dns/resolved.go +++ b/net/dns/resolved.go @@ -165,7 +165,7 @@ func (m *resolvedManager) run(ctx context.Context) { // Reset backoff and SetNSOSHealth after successful on reconnect. bo.BackOff(ctx, nil) - m.health.SetDNSOSHealth(nil) + m.health.SetHealthy(OSConfigWarnable) return nil } @@ -243,9 +243,11 @@ func (m *resolvedManager) run(ctx context.Context) { // Set health while holding the lock, because this will // graciously serialize the resync's health outcome with a // concurrent SetDNS call. - m.health.SetDNSOSHealth(err) if err != nil { m.logf("failed to configure systemd-resolved: %v", err) + m.health.SetUnhealthy(OSConfigWarnable, health.Args{health.ArgError: err.Error()}) + } else { + m.health.SetHealthy(OSConfigWarnable) } } } |
