Skip to content

Commit

Permalink
don't return when check imageHub failed
Browse files Browse the repository at this point in the history
  • Loading branch information
aajkl committed Jul 2, 2024
1 parent d74914e commit b6bcc28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/service/boar/boar.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,16 @@ func (svc *Boar) IsHealthy(ctx context.Context) (ans bool) {
if err1 := vmiFact.CheckHealth(ctx); err1 != nil {
svc.mCol.imageHealthy.Store(false)
err = errors.CombineErrors(err, errors.WithMessagef(err1, "failed to check image hub")) //nolint

Check failure on line 167 in internal/service/boar/boar.go

View workflow job for this annotation

GitHub Actions / lint

directive `//nolint` is unused (nolintlint)
return false
} else {
svc.mCol.imageHealthy.Store(true)
}
svc.mCol.imageHealthy.Store(true)
// check libvirt health
if err1 := checkLibvirtSocket(); err1 != nil {
svc.mCol.libvirtHealthy.Store(false)
err = errors.CombineErrors(err, errors.WithMessagef(err1, "failed to check libvirt socket"))
} else {
svc.mCol.libvirtHealthy.Store(true)
}
svc.mCol.libvirtHealthy.Store(true)
// check network drivers, including clico, ovn etc
if err1 := networkFactory.CheckHealth(ctx); err1 != nil {
err = errors.CombineErrors(err, errors.WithMessagef(err1, "failed to check network drivers"))
Expand Down

0 comments on commit b6bcc28

Please sign in to comment.