From 17c7e1b8cf9725fb1ef75fa31d1e50065b74c6da Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Fri, 24 Aug 2018 16:55:57 -0700 Subject: [PATCH] Allow new discovered error to show up --- pkg/controller/snapshot_controller.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/controller/snapshot_controller.go b/pkg/controller/snapshot_controller.go index 6f08afaf..2401eda6 100644 --- a/pkg/controller/snapshot_controller.go +++ b/pkg/controller/snapshot_controller.go @@ -360,15 +360,14 @@ func (ctrl *csiSnapshotController) updateSnapshotErrorStatusWithEvent(snapshot * return nil } snapshotClone := snapshot.DeepCopy() - if snapshot.Status.Error == nil { - statusError := &storage.VolumeError{ - Time: metav1.Time{ - Time: time.Now(), - }, - Message: message, - } - snapshotClone.Status.Error = statusError + statusError := &storage.VolumeError{ + Time: metav1.Time{ + Time: time.Now(), + }, + Message: message, } + snapshotClone.Status.Error = statusError + snapshotClone.Status.Ready = false newSnapshot, err := ctrl.clientset.VolumesnapshotV1alpha1().VolumeSnapshots(snapshotClone.Namespace).Update(snapshotClone) if err != nil {