Skip to content
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

Merged
merged 4 commits into from
Jul 8, 2021
Merged

vSphere snapshot delete error checking #1046

merged 4 commits into from
Jul 8, 2021

Conversation

bathina2
Copy link
Contributor

@bathina2 bathina2 commented Jul 8, 2021

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:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

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")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@carlbraganza carlbraganza left a 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?

Copy link
Contributor

@carlbraganza carlbraganza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bathina2 bathina2 added the kueue label Jul 8, 2021
@mergify mergify bot merged commit dfed9b1 into master Jul 8, 2021
@mergify mergify bot deleted the K10-7504 branch July 8, 2021 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants