-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Optional REDIS_PASSWORD env variable cause race condition and Redis NOAUTH failures #2836
Comments
@shlomitubul Also it would make sense to involve @mbevc1 and @yu-croco as you approved the implementation. |
Oh,,, I just thought the PR was trying to fix a small mistake (I was the mistake after all🙃 ) since I didn't realize the case in this issue . 🫠 |
While waiting for @shlomitubul 's reply, I prepared draft PR for this issue. 🙏 |
I just came across this after upgrading to v2.11.6 and trying to figure out if I have the same issue you do. Were you able to verify that this was indeed the issue? I checked the environment of each of the pods, and they had My gut tells me this is related to argoproj/argo-cd#15912 - something makes configuration inconsistent between components. Trying to get this set up in my local cluster so I can iterate more. EDIT: narrowed it to v2.11.1: argoproj/argo-cd@v2.11.0...v2.11.1 |
Can this be re-opened? #2839 did not fix this, as suspected. argocd: v2.12.0+ec30a48
BuildDate: 2024-08-05T13:46:43Z
GitCommit: ec30a48bce7a60046836e481cd2160e28c59231d
GitTreeState: clean
GoVersion: go1.22.5
Compiler: gc
Platform: darwin/arm64
argocd-server: v2.12.0+ec30a48
BuildDate: 2024-08-05T13:46:43Z
GitCommit: ec30a48bce7a60046836e481cd2160e28c59231d
GitTreeState: clean
GoVersion: go1.22.5
Compiler: gc
Platform: darwin/arm64 |
@purajit What is your issue? Your Argo CD components cannot connect to Redis? |
@mkilchhofer Yup, any path like In particular, while basic Argo sync still works, |
Ah we are only talking about the CLI functionality? You didn't saw any suspicious log line(s) inside the running Argo CD pods? |
Sorry for the misunderstanding, no, since this is an issue with the overall setup, there are Here are examples of internal logs:
|
Hi @purajit You shared logs of the redis-ha container or sentinel container, right? I think the issue is related but a bit different than the one described in the initial post of this issue. Nevertheless, could you share the values.yaml you use for your Argo CD setup, so we can try to reproduce your issue? |
Haven't included server:
extraArgs:
- --insecure
- --enable-gzip
replicas: <...>
resources: <...>
serviceAccount: <...>
redis-ha:
enabled: true
exporter:
enabled: false
extraLabels:
app.kubernetes.io/name: argocd-redis-ha-haproxy
haproxy:
image:
repository: public.ecr.aws/docker/library/haproxy
image:
repository: public.ecr.aws/docker/library/redis
configs:
clusterCredentials: <...>
cm:
dex.config: <...>
statusbadge.enabled: <...>
url: <...>
credentialTemplates: <...>
params:
redis.compression: none
rbac: <...>
repositories: <...>
secret:
githubSecret: <...> |
argoproj/argo-cd#19599 looks promising |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This did indeed resolve the issue for me. It's available in 2.11.10, 2.12.5, and 2.13.0 |
Describe the bug
In PR #2800 the
REDIS_PASSWORD
environment variable was madeoptional
, i.e. severalDeployment
resource have something along these lines:The problem is if the secret does not exist when Pods start, then these Pods will be unable to authenticate to Redis. The Redis Pod itself does not have this env variable marked as
optional
, i,e, Redis will not startup until the secret is available.The chart can generate the secret through a
Job
or the secret can be created by external means. Both of these can cause the secret not to be available when e.g. repo-server or application-controller Pods start.Related helm chart
argo-cd
Helm chart version
Any after PR #2800, e.g. 7.3.7
To Reproduce
Install ArgoCD with
redisSecretInit.enabled = false
, let Pods startup - e.g. repo-server and application-controller will start successfully whereas redis will restart repeatedly with 'config error' due to missing secret. Finally, create secret to let redis start. After this, one can observe 'NOAUTH Authentication required' logs in repo-server and application-controller Pods.Expected behavior
Pods that must authenticate towards Redis and thus relies on the Redis secret do not start until the secret is available - like the redis Pod itself does now.
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: