Merge pull request #502 from huffmanca/address-content-nil-error
Correct snapshotContent error propagation
This commit is contained in:
@@ -300,8 +300,8 @@ func (ctrl *csiSnapshotSideCarController) createSnapshotWrapper(content *crdv1.V
|
|||||||
// storage system has responded with an error
|
// storage system has responded with an error
|
||||||
klog.Infof("createSnapshotWrapper: CreateSnapshot for content %s returned error: %v", content.Name, err)
|
klog.Infof("createSnapshotWrapper: CreateSnapshot for content %s returned error: %v", content.Name, err)
|
||||||
if isCSIFinalError(err) {
|
if isCSIFinalError(err) {
|
||||||
if err := ctrl.removeAnnVolumeSnapshotBeingCreated(content); err != nil {
|
if removeAnnotationErr := ctrl.removeAnnVolumeSnapshotBeingCreated(content); removeAnnotationErr != nil {
|
||||||
return nil, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation from the content %s: %s", content.Name, err)
|
return nil, fmt.Errorf("failed to remove VolumeSnapshotBeingCreated annotation from the content %s: %s", content.Name, removeAnnotationErr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user