-
Notifications
You must be signed in to change notification settings - Fork 152
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
vSphere snapshot delete error checking #1046
Conversation
pkg/blockstorage/vmware/vmware.go
Outdated
if soap.IsVimFault(lerr) { | ||
switch soap.ToVimFault(err).(type) { | ||
case *types.InvalidArgument: | ||
log.Debug().WithError(err).Print("Disk doesn't have given snapshot due to the snapshot stamp was removed in the previous DeleteSnapshot operation which failed with InvalidState fault. And it will be resolved by the next snapshot operation on the same VM. Will NOT retry") |
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.
Grammar!
- "... due to the snapshot stamp being removed..." or "... because the snapshot stamp was removed ..."
- "with an InvalidState fault"
- Sentence starts with "And"
Debug errors are useless as K10 eats them up. Please change to Error.
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.
So these error messages are copied verbatim. I can change them for our purposes. Will change to error.
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.
Can you also update the SnapshotCreate retry conditions too?
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.
LGTM
Change Overview
The following changes address the issue where a snapshot can be deleted even if the initial result of the delete seems to be unsuccessful. The error handling was that was used belongs to the open source package https://github.com/vmware-tanzu/astrolabe/blob/91eeed4dcf77edd1387a25e984174f159d66fedb/pkg/ivd/ivd_protected_entity.go#L433
Pull request type
Please check the type of change your PR introduces: