-
Notifications
You must be signed in to change notification settings - Fork 451
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
[BUG] ovs-ovn daemonset access denied when creating pid file in /var/run/openvswitch #4778
Comments
Hey there, @EdwardCooke! I'm here to help you with this issue. Let's work together to solve this! 🤖 To resolve the "Permission denied" error when the initContainers:
- name: hostpath-init
command:
- sh
- -xec
- |
chown -R nobody: /var/run/ovn /var/log/ovn /etc/openvswitch /var/run/openvswitch /var/log/openvswitch This command changes the ownership of If the issue persists, verify that the volumes:
- name: host-run-ovs
hostPath:
path: /run/openvswitch Ensure that the path |
@dosu the runasuser for the ovs-ovn daemonset is hardcoded to be nobody by default, it would only appropriately be set to root if I enable ipsec. I am unable to change it. The init pod doesn't seem to take affect in the filesystem itself since I checked the permissions on the directory on the host and it was still owned by root with 755 permissions and not by owned by nobody:nogroup. |
To change the containers:
- name: openvswitch
securityContext:
runAsUser: 0 # Set to 0 to run as root
privileged: false
capabilities:
add:
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
- SYS_NICE
- SYS_ADMIN Ensure this change is applied to the |
I'm trying to use the official helm chart and avoid managing resources manually as that become a big headache during upgrade/updates. |
Kube-OVN Version
kube-ovn-1.13.0
Kubernetes Version
Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.31.3
Operation-system/Kernel Version
"Ubuntu 24.04 LTS"
5.15.167.4-microsoft-standard-WSL2
Description
When using the helm chart, the
ovs-ovn
pods go into a crashloopbackoff state and cannot start reporting this error:ovsdb-server: /var/run/openvswitch/ovsdb-server.pid.tmp: create failed (Permission denied)
When I set the permissions to
777
on that directory the pods starts successfully. Which is definitely not the most ideal permission set.Steps To Reproduce
Install kubeovn using the helm chart with these values:
Current Behavior
ovs-ovn pods do not start due to filesystem permissions
Full logs of ovs-ovn pod failing:
Expected Behavior
ovs-ovn
pods would start successfully.The text was updated successfully, but these errors were encountered: