-
Notifications
You must be signed in to change notification settings - Fork 475
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
Raspberry Pi issue - gateway didn't start #506
Comments
Hi @schnable, Given that your version says 1.15, I'm assuming you're using I have an RPi4 here with k3s (1.14) installed with k3sup.dev, it worked great and I would suggest you use the same. (I would advise you not to install Docker on the host if you are using k3s, it can cause an issue that looks similar to this.) If your error applies only to the combination of the security context and K8s 1.15, then we may need to look the choice to specify a runAsUser. Alex
|
Where did you find that? I don't see the gateway using the
Here's the live container:
|
This may relate to the issue reported in #506 The armhf Dockerfile did not get the change to move to a non-root user, which was applied some time back to x86_64. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
Thanks for the response. I am using k8s directly (rather than k3s) as I am trying to create a specific configuration. I am currently running with flannel. WRT k3s-io/k3s#703, I suspect this is more of an issue with the new debian iptables implementation - see kubernetes/kubernetes#71305. There is workaround to force all the containers to use the legacy iptables which is what I am doing. I see that you recently updated the repository and pulled in a new version of the dockerfile that has the changes I suggested - this is great. To answer your question "Where did you find that" - see: https://github.com/openfaas/faas-netes/blob/b89240394f46b30bd83ba9f75dd1f93cf680113a/Dockerfile.armhf - the version from just a few days ago. The container I was using had a release tag of 0.8.5 and I see you released 0.8.6 just a little while ago with this fix. Thanks. I will give it a try. |
/close: fix published |
It was confusing when you said "gateway" is running as "root" and then mentioned Turned out that faas-netes for x86_64 was also not root, but the override Dockerfile.armhf still had it from some time ago. By "k8s directly" I assume you mean Please let me know how you get on with 0.8.6. |
Sorry for the confusion. I was thinking that when the container's Dockerfile doesn't specify USER, and when you don't have a runAsUser specified in your deployment's security context (which my hacky workaround was doing), you end up running as root. Yes - I am creating the cluster using kubeadm. I've just retested using the 0.8.6 and all is working well now. Thanks. |
That's great news and thank you for logging the issue and being so helpful with the level of detail. Are there any updates needed to my guide over here for kubeadm and 1.15? https://github.com/teamserverless/k8s-on-raspbian Please feel free to say hi on Slack to talk about more armhf + OpenFaaS |
/msg: slack |
-- |
My actions before raising this issue
I attempted to deploy openfaas using:
kubectl -f yaml_armhf
on my raspberry pi 4 cluster, but this results in the gateway pod entering a crashloop.
Expected Behaviour
gateway should start cleanly.
Current Behaviour
kubectl describe gateway-xxxxx-xxx
shows:
Examining the Dockerfile.armhf, I see this line:
WORKDIR /root/
Examining gateway-dep.yaml, I see the following security context defined:
The latest version of raspian ships with the /root as mode 700. It looks to me like the user 10001 isn't able to change the work directory to /root which results in the startup failure. A quick look at the container showed:
As a work around, I commented out the "runAsUser: 10001" from the securityContext, and then the pod starts without any issues.
Possible Solution
I don't think running the pod as root is the best solution; I would recommend copying the user creation logic from the main Dockerfile to the armhf version; this would eliminate the need to have /root/ accessible to the pod, and would allow the pod to run without root escalation.
Steps to Reproduce (for bugs)
See above.
Context
Well - I was able to get things going with the work around. I might try to rebuild the docker container with the suggested fix and use this version rather than the official binary.
Your Environment
FaaS-CLI version ( Full output from:
faas-cli version
):not installed yet - just trying to get things isntalled for the first time.
Docker version
docker version
(e.g. Docker 17.0.05 ):19.03.2
K8s - 1.15.3
Linux raspberrypi3 4.19.66-v7+ openfaas/faas#1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
See above
See above
Next steps
You may join Slack for community support.
The text was updated successfully, but these errors were encountered: