-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Descriptive restore error on timeout due to terminating namespace #7424
Descriptive restore error on timeout due to terminating namespace #7424
Conversation
73b25fd
to
bbd910c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7424 +/- ##
=======================================
Coverage 61.71% 61.71%
=======================================
Files 263 263
Lines 28869 28873 +4
=======================================
+ Hits 17816 17819 +3
- Misses 9793 9794 +1
Partials 1260 1260 ☔ View full report in Codecov by Sentry. |
cf72b8a
to
fb25a55
Compare
fb25a55
to
6a72c2f
Compare
dfe96a5
to
18bb3a0
Compare
7177214
to
c7b189d
Compare
98ee21a
to
28b5d26
Compare
ad879f3
28b5d26
to
ad879f3
Compare
… Descriptive restore error on terminating namespace. Signed-off-by: Tiger Kaovilai <[email protected]> revert utils_test.go Signed-off-by: Tiger Kaovilai <[email protected]> address https://github.com/vmware-tanzu/velero/pull/7424/files/c7b189dd6035839c9eb8ce3dab4ead574de77adb#r1494194484 Signed-off-by: Tiger Kaovilai <[email protected]> Update pkg/util/kube/utils.go Signed-off-by: Tiger Kaovilai <[email protected]> Signed-off-by: Tiger Kaovilai <[email protected]>
ad879f3
to
e7ffa62
Compare
HI @kaovilai @blackpiglet we are seeing the Issue #7516. Please look into it once in the same method. EnsureNamespaceExistsAndIsReady During restore for every resource within the namespace, we are calling the check to await on if namespace exists (wait for 10 min polling). For instance, if we have 100 resources in a namespace that itself is in terminating state for very long then it impacts the restore flow to get stuck/halt and it too increases the time to restore as it does it for each resource in the same namespace. |
@@ -97,6 +103,9 @@ func EnsureNamespaceExistsAndIsReady(namespace *corev1api.Namespace, client core | |||
|
|||
// err will be set if we timed out or encountered issues retrieving the namespace, | |||
if err != nil { | |||
if terminatingNamespace { | |||
return false, nsCreated, errors.Wrapf(err, "timed out waiting for terminating namespace %s to disappear before restoring", namespace.Name) | |||
} |
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.
as this call is used during restore as well, and if such error occur for the resource during restore, can we also add this to restore warnings list?
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.
Mention #7516
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.
Is warning preferred over restore 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.
Also per PR title, the intent is that the error are visible in restore 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.
What changes do you see needed to be made to the PR?
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.
Sorry on the late reply, I was awk.
Yes, overall its good to have this error that you added and its visible during restore
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.
For reducing the time to address the issue #7516 we need to look at other options.
@kaovilai , feel free to merge this now, approved it. |
@anshulahuja98 I don't have access to merge. Not a maintainer. |
Signed-off-by: Tiger Kaovilai [email protected]
Thank you for contributing to Velero!
Please add a summary of your change
Make restore error descriptive when namespace being restored is in terminating state.
Any user seeing this error should know that velero does not force a namespace to disappear by removing finalizers because that could be destructive to some workloads.
User should make namespace be in a state other than terminating for Velero to continue restore process.
Does your change fix a particular issue?
Fixes #5697
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.