Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/redis] error: failed switching to "redis": unable to find user redis: no matching entries in passwd file #15246

Closed
MohammedFadin opened this issue Jul 4, 2019 · 4 comments · Fixed by #15276

Comments

@MohammedFadin
Copy link

MohammedFadin commented Jul 4, 2019

Describe the bug
Master and Slave pods keep crashing due to the below error.

Version of Helm and Kubernetes: Kubernetes: v1.14, Helm v2.9.1

Which chart: stable/redis

What happened:

Mohammeds-MacBook-Pro:further-exchange mfadin$ kubectl logs gogs-redis-master-1
INFO  ==> ** Starting Redis **
error: failed switching to "redis": unable to find user redis: no matching entries in passwd file

Mohammeds-MacBook-Pro:further-exchange mfadin$ kubectl logs gogs-redis-slave-0
INFO  ==> ** Starting Redis **
error: failed switching to "redis": unable to find user redis: no matching entries in passwd file

What you expected to happen: Pods to run

How to reproduce it (as minimally and precisely as possible):

helm upgrade  --tls gogs-redis --set master.persistence.size=20Gi --set master.persistence.storageClass=ibmc-file-bronze --set securityContext.enabled=true --set securityContext.fsGroup=0 --set securityContext.runAsUser=0  --set volumePermissions.enabled=true  stable/redis

Anything else we need to know: None

@miguelaeh
Copy link
Collaborator

Hi @MohammedFadin ,
Thank you very much for reporting the issue. I can replicate it and it seems it happens when you deploy the Chart as root. But also I can see it doesn't appear when using docker-compose as root.
We will investigate the issue and let you know about the workaround.
Again, thank you for reporting.

@miguelaeh
Copy link
Collaborator

Hi @MohammedFadin ,
Is there any reason you have to run Redis as root?
You can see in the documentation the following:

Redis does not requires root privileges to run. It is recommended to run it as an unprivileged redis user that is only used for this purpose.

@MohammedFadin
Copy link
Author

Thank you @miguelaeh !

Our Volume Storage requires root user privileges only to read and write.

@miguelaeh
Copy link
Collaborator

Hi @MohammedFadin ,
When that PR will be merged it should solve your problem.
Thank you again for reporting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants