Add event for snapshotting in progress
Signed-off-by: zhuc <zhucan@xsky.com>
This commit is contained in:
@@ -682,6 +682,9 @@ func (ctrl *csiSnapshotCommonController) createSnapshotContent(snapshot *crdv1.V
|
||||
return nil, newControllerUpdateError(utils.SnapshotKey(snapshot), err.Error())
|
||||
}
|
||||
|
||||
msg := fmt.Sprintf("Waiting for a snapshot %s to be created by the CSI driver.", utils.SnapshotKey(snapshot))
|
||||
ctrl.eventRecorder.Event(snapshot, v1.EventTypeNormal, "CreatingSnapshot", msg)
|
||||
|
||||
// Update content in the cache store
|
||||
_, err = ctrl.storeContentUpdate(updateContent)
|
||||
if err != nil {
|
||||
|
@@ -206,7 +206,7 @@ func TestCreateSnapshotSync(t *testing.T) {
|
||||
{"update", "volumesnapshots", errors.New("mock update error")},
|
||||
{"update", "volumesnapshots", errors.New("mock update error")},
|
||||
},
|
||||
expectedEvents: []string{"Warning SnapshotStatusUpdateFailed"},
|
||||
expectedEvents: []string{"Normal CreatingSnapshot"},
|
||||
expectSuccess: false,
|
||||
test: testSyncSnapshot,
|
||||
},
|
||||
|
Reference in New Issue
Block a user