-
Notifications
You must be signed in to change notification settings - Fork 4.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
Container will not start when deployed to OpenShift 3.11 with chmod /dev/stdout /dev/stderr permission error #14138
Comments
/assign phlax |
hi @ToniCipriani can you tell me the user you are starting the container as |
On OpenShift, it runs as a randomly generated user ID. I haven't specified ENVOY_UID or GID.
|
I also tried downgrading to the 1.15 and 1.14 containers, and managed to get 1.14.5 working without the error. However I don't think this is ideal. |
it needs to run as root - the entrypoint script drops permission to the envoy user |
Running as root is not an option here, this will be flagged by the company's security. I do see in the gateway-proxy of Gloo (which I believe is based on Envoy) has an option of using the container as a floating user? I think that is the issue here. Is it possible to configure Envoy to run as such?
https://docs.solo.io/gloo-edge/latest/installation/platform_configuration/cluster_setup/#openshift And AFAIK it is not necessary to run the chown command on /dev/stdout and /dev/stderr for it to write properly, I'm not aware of any other container that does this. |
I also tried taking your advice to set ENVOY_UID/GID as 0, now the container starts but no logs are observed in /dev/stdout. Ideally we want these logs to be there to be picked up by ELK. |
hi - so to clarify envoy/user id Envoy has an entrypoint that drops permissions from root to envoy inside the container. This means to use this container it must be started as root - ie non-optional If you do not want to start the container as root you will need to change the entrypoint - that would work fine - you should be able to run as the envoy uid (101) and things will mostly work. you may have some issue with stdout/err still |
and to be clear - im not suggesting setting |
@ToniCipriani see #14141 |
@ToniCipriani there is an underlying problem here i think in that if you start the container as non-root it doesnt work and doesnt notify you why not Its not an uncommon pattern to drop root in the entrypoint (otherwise gosu and suexec would not exist) It is also possible to run this container (with some big caveats/limitations) as non-root without the entrypoint - but its not currently set up to do that (which is why i opened #14141 ) In the meantime, while that issue is considered/discussed/resolved, if you wish to run the container as non-root you will have to hack the entrypoint yourself. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions. |
Description:
Repro steps:
Admin and Stats Output:
Logs:
The text was updated successfully, but these errors were encountered: