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

PDB not created when Workflow waiting on lock #12966

Open
3 of 4 tasks
agilgur5 opened this issue Apr 22, 2024 · 1 comment
Open
3 of 4 tasks

PDB not created when Workflow waiting on lock #12966

agilgur5 opened this issue Apr 22, 2024 · 1 comment
Labels
area/controller Controller issues, panics area/mutex-semaphore area/synchronization `parallelism` configurations and other synchronization type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@agilgur5
Copy link
Member

agilgur5 commented Apr 22, 2024

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened/what did you expect to happen?

This is a follow-up to my findings in #6356 (comment) / #10178 (comment) / #12965 . This is technically a regression from 3.2.

When using a semaphore, mutex, or parallelism, if your Workflow cannot start due to waiting for a lock, any PDB on it will not be created.

PDB should be created regardless of usage of semaphore or mutex

Version

v3.5.6, latest

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

  1. Run this Workflow twice in quick succession (e.g. submit then immediately resubmit)
metadata:
  generateName: synchronization-wf-level-
spec:
  podDisruptionBudget:
    minAvailable: 1
  synchronization:
    mutex:
      name: workflow
  entrypoint: whalesay
  templates:
    - name: whalesay
      container:
        image: docker/whalesay:latest
        command:
          - sleep
        args:
          - "30"
  1. Check for PDBs:
$ kubectl get pdb
NAME                             MIN AVAILABLE   MAX UNAVAILABLE   ALLOWED DISRUPTIONS   AGE
synchronization-wf-level-6zqm6   1               N/A               0                     22s

Only 1 PDB, not 2. The second never gets created

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
@agilgur5 agilgur5 added type/bug type/regression Regression from previous behavior (a specific type of bug) area/controller Controller issues, panics area/mutex-semaphore area/synchronization `parallelism` configurations and other synchronization labels Apr 22, 2024
@agilgur5
Copy link
Member Author

Per #6356 (comment) and #10178 (comment), the solution here is actually not entirely straightforward unfortunately (otherwise, I would have submitted a PR directly). A Workflow without a lock shouldn't be creating resources like a PDB.

That's not the worst thing if we were to do that, but it's not quite correct and affects latency when using synchronization as well. So ideally this needs a larger refactor

@agilgur5 agilgur5 changed the title PDB not created when using mutex or semaphore and Workflow waiting on lock PDB not created when Workflow waiting on lock Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics area/mutex-semaphore area/synchronization `parallelism` configurations and other synchronization type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

No branches or pull requests

1 participant