Fix log messages and error messages
This commit is contained in:
@@ -260,21 +260,21 @@ func (ctrl *csiSnapshotSideCarController) checkandUpdateContentStatusOperation(c
|
||||
if content.Spec.VolumeSnapshotClassName != nil {
|
||||
class, err := ctrl.getSnapshotClass(*content.Spec.VolumeSnapshotClassName)
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to get snapshot class %s for snapshot content %s", *content.Spec.VolumeSnapshotClassName, err)
|
||||
return nil, fmt.Errorf("failed to get snapshot class %s for snapshot content %s", *content.Spec.VolumeSnapshotClassName, err)
|
||||
klog.Errorf("Failed to get snapshot class %s for snapshot content %s: %v", *content.Spec.VolumeSnapshotClassName, content.Name, err)
|
||||
return nil, fmt.Errorf("failed to get snapshot class %s for snapshot content %s: %v", *content.Spec.VolumeSnapshotClassName, content.Name, err)
|
||||
}
|
||||
|
||||
snapshotterListSecretRef, err := utils.GetSecretReference(utils.SnapshotterListSecretParams, class.Parameters, content.GetObjectMeta().GetName(), nil)
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to get secret reference for snapshot %s: %s", content.Name, err)
|
||||
return nil, fmt.Errorf("failed to get secret reference for snapshot %s: %s", content.Name, err)
|
||||
klog.Errorf("Failed to get secret reference for snapshot content %s: %v", content.Name, err)
|
||||
return nil, fmt.Errorf("failed to get secret reference for snapshot content %s: %v", content.Name, err)
|
||||
}
|
||||
|
||||
snapshotterListCredentials, err = utils.GetCredentials(ctrl.client, snapshotterListSecretRef)
|
||||
if err != nil {
|
||||
// Continue with deletion, as the secret may have already been deleted.
|
||||
klog.Errorf("Failed to get credentials for snapshot %s: %s", content.Name, err)
|
||||
return nil, fmt.Errorf("failed to get credentials for snapshot %s: %s", content.Name, err)
|
||||
klog.Errorf("Failed to get credentials for snapshot content %s: %v", content.Name, err)
|
||||
return nil, fmt.Errorf("failed to get credentials for snapshot content %s: %v", content.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user