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

[BUG] Pods started before InjectFinalizer is disabled are never deleted #2262

Closed
2 tasks done
hamersaw opened this issue Mar 16, 2022 · 0 comments · Fixed by flyteorg/flytepropeller#438
Closed
2 tasks done
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hamersaw
Copy link
Contributor

Describe the bug

The k8s plugin configuration has an InjectFinalizer option. In FlytePropeller this is used to add finalizers to new pods and clear finalizers from completed pods. When a pod is started with the InjectFinalizer option enabled and then it is disabled before pod completion the flyte finalizer remains on the pod indefinitely. This means that pod is never deleted.

Expected behavior

Pods should be able to complete if the InjectFinalizer configuration option changes during evaluation.

Additional context to reproduce

  1. Enable the InjectFinalizer configuration option
plugins:
  k8s:
    inject-finalizer: true
  1. Start any FlyteWorkflow
  2. Disable the InjectFinaizer configuration option
plugins:
  k8s:
    inject-finalizer: false
  1. View pod to see it's stuck in Terminating state, has the Flyte finalizer, and has been deleted
hamersaw@ragnarok:~$ kubectl -n flytesnacks-development get pods
NAME              READY   STATUS        RESTARTS   AGE
f1m271n9tr-n0-0   0/1     Terminating   0          65s

hamersaw@ragnarok:~$ kubectl -n flytesnacks-development get pod f1m271n9tr-n0-0 -o yaml
apiVersion: v1
kind: Pod
metadata:
  ...
  deletionGracePeriodSeconds: 0
  deletionTimestamp: "2022-03-16T14:33:43Z"
  finalizers:
  - flyte/flytek8s
  ...

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@hamersaw hamersaw added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers and removed untriaged This issues has not yet been looked at by the Maintainers labels Mar 16, 2022
@hamersaw hamersaw added this to the 1.0.1 milestone Mar 16, 2022
@hamersaw hamersaw self-assigned this Apr 6, 2022
@EngHabu EngHabu modified the milestones: 1.0.1, 1.0.2 May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants