Skip to content

Conversation

@haslersn
Copy link

@haslersn haslersn commented Sep 12, 2023

Skip Pod hooks when the Pod's phase isn't Running.

Replaces #5211
Fixes #5137

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@kaovilai
Copy link
Collaborator

We might want to skip on completed or failed pods but if pod is not yet running due to it being very new velero should wait a bit.

@haslersn
Copy link
Author

if pod is not yet running due to it being very new velero should wait a bit.

Currently Velero doesn't wait either, so changing that behavior is a separate issue that can be done in a separate PR.

@haslersn
Copy link
Author

Though maybe we should return an error when the Pod is Pending (and also when the Pod is Failed?), so the hook isn't silently skipped.

@haslersn
Copy link
Author

maybe we should return an error when the Pod is Pending (and also when the Pod is Failed?)

I just implemented this, PTAL.

@haslersn haslersn force-pushed the fix-5137 branch 2 times, most recently from 07c7628 to 16f989f Compare September 12, 2023 19:10
haslersn and others added 2 commits September 13, 2023 09:36
Skip Pod hooks when the Pod's phase isn't Running.

Fixes vmware-tanzu#5137

Signed-off-by: Sebastian Hasler <[email protected]>
@@ -1 +0,0 @@
fix run preHook and postHook on completed pods No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this changelog meant to be deleted completely rather than a single line?

Copy link
Author

Choose a reason for hiding this comment

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

The file is deleted in the commit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Velero tries to run preHook and postHook on Completed Pods

2 participants