diff --git a/pkg/crcontrollers/drive/drivecontroller.go b/pkg/crcontrollers/drive/drivecontroller.go index 46caf94f0..d915dcb75 100644 --- a/pkg/crcontrollers/drive/drivecontroller.go +++ b/pkg/crcontrollers/drive/drivecontroller.go @@ -134,7 +134,7 @@ func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu switch status { case update: if err := c.client.UpdateCR(ctx, drive); err != nil { - log.Errorf("Failed to update Drive %s CR", driveName) + log.Errorf("Failed to update Drive %s CR, error: %s", driveName, err.Error()) return ctrl.Result{}, client.IgnoreNotFound(err) } case remove: diff --git a/pkg/node/volumemgr.go b/pkg/node/volumemgr.go index f1ef6509d..ace6ef560 100644 --- a/pkg/node/volumemgr.go +++ b/pkg/node/volumemgr.go @@ -76,7 +76,7 @@ const ( // Discover function replaces drive health with passed value if the annotation is set driveHealthOverrideAnnotation = "health" - numberOfRetries = 2 + numberOfRetries = 5 delayBeforeRetry = 2 ) @@ -400,6 +400,7 @@ func (m *VolumeManager) retryDriveUpdate(ctx context.Context, volume *volumecrd. m.addVolumeStatusAnnotation(drive, volume.Name, apiV1.VolumeUsageReleased) } if err := m.k8sClient.UpdateCR(ctx, drive); err != nil { + ll.Infof("Volume %s annotation on drive %s failed, error: %s", volume.Name, drive.Name, err.Error()) ll.Infof("Retrying to update drive %s usage status to %s. Retry number: %d. Sleep %d seconds and retry ...", drive.Name, drive.Spec.Usage, i, delayBeforeRetry) time.Sleep(time.Second * delayBeforeRetry)