-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Error log bug #207
Fix Error log bug #207
Conversation
Signed-off-by: Shashank Singh <[email protected]>
Signed-off-by: Shashank Singh <[email protected]>
@@ -267,7 +267,8 @@ func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnap | |||
if err != nil { | |||
if err == wait.ErrWaitTimeout { | |||
if snapshotContent.Status != nil && snapshotContent.Status.Error != nil { | |||
log.Errorf("Timed out awaiting reconciliation of volumesnapshot, Volumesnapshotcontent %s has error: %v", snapshotContent.Name, snapshotContent.Status.Error.Message) | |||
log.Errorf("Timed out awaiting reconciliation of volumesnapshot, Volumesnapshotcontent %s has error: %v", snapshotContent.Name, *snapshotContent.Status.Error.Message) | |||
return nil, errors.Errorf("CSI got timed out with error: %v", *snapshotContent.Status.Error.Message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure about this return statement here, we return on line 276 with the original error, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shubham-pampattiwar, here in line 268 the err is compared to wait.ErrWaitTimeout which is timed out waiting for the condition
and while returning this error message is floated in the velero rather than actual error.
So, I've added this return statement for floating actual error
Improved error floatation during csi-polling timeout scenario.