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

kapp should skip waiting on transient resources when delete strategy is orphan. #469

Open
rohitagg2020 opened this issue Mar 28, 2022 · 4 comments
Assignees
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request priority/important-soon Must be staffed and worked on currently or soon.

Comments

@rohitagg2020
Copy link
Contributor

Describe the problem/challenge you have
While doing a kapp delete, if delete-strategy is orphan for a resource, kapp doesn't delete that resource and its transient resource which is expected behavior. But kapp output continues to print the message which implies that it is waiting for the transient resource to get deleted and ultimately, it errors out. This leads to ambiguity.

Describe the solution you'd like
If delete-strategy is orphan, then kapp should skip waiting on transient resources also.


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@rohitagg2020 rohitagg2020 added enhancement This issue is a feature request carvel triage This issue has not yet been reviewed for validity labels Mar 28, 2022
@rohitagg2020 rohitagg2020 removed the carvel triage This issue has not yet been reviewed for validity label Mar 28, 2022
@renuy
Copy link
Contributor

renuy commented Mar 29, 2022

related to #452

@davidblum
Copy link

Ran into this recently. Got lots of excellent help from the dev team in slack

It's also worth noting that when you apply the correct delete strategy to your application, and then run: kapp delete -a validation.app --wait=false you are greeted with a confusing error message:

kapp: Error: Expected all resources to be gone, but found: replicaset/validation-podinfo-7958dcdc9b (apps/v1) namespace: my-system-validation, pod/validation-podinfo-7958dcdc9b-qxjrz (v1) namespace: my-system-validation

This error reads like it failed, but it actually succeeded, and those resources should exist due to the delete-strategy annotation.

Full log:
(with some details redacted)

kapp delete -a validation.app --wait=false
Target cluster 'https://my-eks-cluster.eks.amazonaws.com' (nodes: my-node.ec2.internal, 4+)

Changes

Namespace  Name  Kind  Age  Op  Op st.  Wait to  Rs  Ri

Op:      0 create, 0 delete, 0 update, 0 noop, 0 exists
Wait to: 0 reconcile, 0 delete, 0 noop

Continue? [yN]: y

12:10:17PM: ---- applying complete [0/0 done] ----
12:10:17PM: ---- waiting complete [0/0 done] ----

kapp: Error: Expected all resources to be gone, but found: replicaset/validation-podinfo-7958dcdc9b (apps/v1) namespace: my-system-validation, pod/validation-podinfo-7958dcdc9b-qxjrz (v1) namespace: my-system-validation

@praveenrewar
Copy link
Member

The above error is related to #577. At the end of kapp delete, kapp tries to validate that all the resources have been deleted and then deletes the app metadata configmap and that's why --wait=false doesn't work well with delete because it's bound to fail in scenarios where deletion takes more than a second. The solution would be to not validate that the resources have been deleted or not in case --wait=false is specified.

@renuy renuy added carvel accepted This issue should be considered for future work and that the triage process has been completed priority/important-soon Must be staffed and worked on currently or soon. labels May 18, 2023
@renuy
Copy link
Contributor

renuy commented Aug 8, 2023

recent bump and more discussion here https://kubernetes.slack.com/archives/CH8KCCKA5/p1691422335059309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carvel accepted This issue should be considered for future work and that the triage process has been completed enhancement This issue is a feature request priority/important-soon Must be staffed and worked on currently or soon.
Projects
Status: Prioritized Backlog
Development

No branches or pull requests

5 participants