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

cp: can't create directory '/etc/haproxy/lua': Permission denied #29

Open
sektorhybrid opened this issue Jul 19, 2021 · 3 comments
Open
Labels
bug Something isn't working

Comments

@sektorhybrid
Copy link

sektorhybrid commented Jul 19, 2021

Hello and thanks for your work on this ingress controller.

We tested with many different settings but we keep getting the following error:

  • installation

helm upgrade --install -n haproxy-ingress haproxy-ingress haproxy-ingress/haproxy-ingress --version 0.12.6 -f values.yaml

  • error
[root@xxxxxxxxxxxxx-01 haproxy]# kubectl -n haproxy-ingress logs haproxy-ingress-f7b8dc97f-znlq4 haproxy-ingress
cp: can't create directory '/etc/haproxy/lua': Permission denied
NAME                                               READY   STATUS             RESTARTS   AGE
haproxy-ingress-7f64d48f4b-ml24c                   0/2     CrashLoopBackOff   10         4m43s
  • values.yaml

values-lab.yaml.txt

@jcmoraisjr
Copy link
Member

Hi, thanks for reporting this. What OS are you using? Any special hardening, eg selinux enabled? Can you allow the process to create files and directories under /etc/haproxy?

@sektorhybrid
Copy link
Author

Hi, I am using RHEL 7.7 vanilla. This cp command runs inside the docker image and the error is from the image, it didn't seem to me that it refers to /etc folder in OS host level. Adding to that, I didn't see any volumes in the config that refer to host OS /etc mount. Am I missing something ? In the meanwhile I will try to create the folder and assign permissions in OS level just of curiosity but this doesn't seem to be a valid option as we need isolation.

@jcmoraisjr
Copy link
Member

jcmoraisjr commented Jul 21, 2021

Please check if the container process is running as root or uid 1001, otherwise if so we have some RHEL magic in place, like selinux enabled, which usually doesn't like an ordinary process messing the /etc subdir. We currently need this due to external haproxy support. I'll give a centos 7 box a try.

@jcmoraisjr jcmoraisjr added the bug Something isn't working label Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants