Skip to content

Finalizer patch on the pod may overwrite other changes to the finalizer #3899

Open
@troychiu

Description

What happened:
In our cluster, I noticed that a change to the pod's finalizer was reverted when Kueue attempted to remove its own finalizer. I found we are using non-strict mode patch

return clientutil.Patch(ctx, c, pod, false, func() (bool, error) {
, resulting in the race condition.

What you expected to happen:
Kueue should not overwrite other changes to the finalizer.

How to reproduce it (as minimally and precisely as possible):
Create a pod with finalizers in addition to Kueue's finalizer. However, this issue doesn't always occur.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Kueue version (use git describe --tags --dirty --always):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions