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

fix: Argo DB init conflict when deploy workflow-controller with multiple replicas #11177 #11569

Merged
merged 1 commit into from Sep 5, 2023

Conversation

astraw99
Copy link
Contributor

Fixes #11177

Motivation

Fix Argo DB init conflict when deploy workflow-controller with multiple replicas.

Modifications

Move the DB init logic to after the leader election completed.

Verification

After the code modification, tested the workflow-controller deployment in my environment with
multiple replicas (1, 5 and 10), all work ok.

10 for example:

workflow-controller-85bfb69457-4tcbz   1/1     Running   0          5s
workflow-controller-85bfb69457-dwvll   1/1     Running   0          6s
workflow-controller-85bfb69457-fvcvj   1/1     Running   0          5s
workflow-controller-85bfb69457-fzkv9   1/1     Running   0          5s
workflow-controller-85bfb69457-khs2v   1/1     Running   0          5s
workflow-controller-85bfb69457-mjwhs   1/1     Running   0          5s
workflow-controller-85bfb69457-npxb7   1/1     Running   0          5s
workflow-controller-85bfb69457-qq7zc   1/1     Running   0          5s
workflow-controller-85bfb69457-rmgc4   1/1     Running   0          5s
workflow-controller-85bfb69457-snrn9   1/1     Running   0          5s

@astraw99 astraw99 changed the title Fix init DB conflict with multiple replicas fix: Argo DB init conflict when deploy workflow-controller with multiple replicas #11177 Aug 13, 2023
@astraw99
Copy link
Contributor Author

@terrytangyuan Wrapped the DB init logic into a func, and called after the leader election.
PTAL thanks.

Signed-off-by: astraw99 <wangchengiscool@gmail.com>
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll review/merge this after the release to avoid any impact/regression

@agilgur5 agilgur5 added the area/controller Controller issues, panics label Aug 30, 2023
Copy link
Member

@Joibel Joibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels sane

workflow/controller/config.go Show resolved Hide resolved
@terrytangyuan terrytangyuan merged commit 297bea6 into argoproj:master Sep 5, 2023
23 checks passed
terrytangyuan pushed a commit that referenced this pull request Sep 5, 2023
…ple replicas #11177 (#11569)

Signed-off-by: astraw99 <wangchengiscool@gmail.com>
qudtjs0753 pushed a commit to qudtjs0753/argo-workflows that referenced this pull request Sep 6, 2023
…ple replicas argoproj#11177 (argoproj#11569)

Signed-off-by: astraw99 <wangchengiscool@gmail.com>
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this pull request May 9, 2024
…ple replicas argoproj#11177 (argoproj#11569)

Signed-off-by: astraw99 <wangchengiscool@gmail.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Argo DB init conflict when deploy workflow-controller with multiple replicas
4 participants