Skip to content

Commit

Permalink
feat(log): don't emit "Failed to auto-balance volume in ..." for deta…
Browse files Browse the repository at this point in the history
…ched volumes

Longhorn 10302

Signed-off-by: Derek Su <[email protected]>
  • Loading branch information
derekbit committed Feb 18, 2025
1 parent 457c62b commit 032cdaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller/volume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,9 @@ func (c *VolumeController) getReplicaCountForAutoBalanceLeastEffort(v *longhorn.
}

if v.Status.Robustness != longhorn.VolumeRobustnessHealthy {
log.Warnf("Failed to auto-balance volume in %s state", v.Status.Robustness)
if v.Status.State != longhorn.VolumeStateDetached {
log.Warnf("Failed to auto-balance volume in %s state", v.Status.Robustness)
}
return 0
}

Expand Down

0 comments on commit 032cdaa

Please sign in to comment.