diff --git a/controller/volume_controller.go b/controller/volume_controller.go index af658367e9..57bac3af98 100644 --- a/controller/volume_controller.go +++ b/controller/volume_controller.go @@ -749,7 +749,7 @@ func (c *VolumeController) ReconcileEngineReplicaState(v *longhorn.Volume, es ma } else { after, err := util.TimestampAfterTimestamp(transitionTime, r.Spec.LastHealthyAt) if err != nil { - log.Errorf("Failed to check if replica %v transitioned to mode %v after it was last healthy", r.Name, mode) + log.WithError(err).Errorf("Failed to check if replica %v transitioned to mode %v after it was last healthy", r.Name, mode) } if after || err != nil { r.Spec.LastHealthyAt = now