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

ovnkube.sh resets all permissions in /run/openvswitch to root:root by default #1982

Open
thywyn opened this issue Oct 14, 2024 · 2 comments · Fixed by #2024 · May be fixed by #2044
Open

ovnkube.sh resets all permissions in /run/openvswitch to root:root by default #1982

thywyn opened this issue Oct 14, 2024 · 2 comments · Fixed by #2024 · May be fixed by #2044

Comments

@thywyn
Copy link
Contributor

thywyn commented Oct 14, 2024

We are running into issues where the /run/openvswitch/ directory is getting reset to root:root after ovn-controller pods runs in the ovnkube.sh startup script. neuton-ovn-metadata-agent init scripts only resets the control and socket files back to 42424:42424.. So, VMs building with DPDK interfaces fail with errors like the following "libvirt.libvirtError: internal error: process exited while connecting to monitor: 2024-10-14T14:30:53.518766Z qemu-system-x86_64: -chardev socket,id=charnet0,path=/var/run/openvswitch/vhua820f710-65,server=on: Failed to bind socket to /var/run/openvswitch/vhua820f710-65: Permission denied"

ovn-controller pods do have an environment variable that could be used "OVS_USER_ID=...." but the 42424 user is not defined on the container. Without rebuilding the container with that user, the only other way I can think of is to expand the scope of the chown that neuton-ovn-metadata-agent init scripts does.

@ricolin
Copy link
Member

ricolin commented Oct 24, 2024

@thywyn I think the issue with current approach to expand the scope is, we don't really sure who gets to redeploy the last, and if ovn gets to redeploy, the permission will still bind to root:root.
We may need to rebuild the container with adding user 42424 and using OVS_USER_ID or make the permission expand right after ovnkube.sh changes the permission.
IMO, rebuild image and using OVS_USER_ID seems better option here.

@mnaser mnaser reopened this Oct 27, 2024
yaguangtang added a commit that referenced this issue Oct 28, 2024
…cess

update ovn-controler script to chown ovs bridge socket files so that
libvirt pod can read

fix #1982
yaguangtang added a commit that referenced this issue Oct 28, 2024
…cess

update ovn-controler script to chown ovs bridge socket files so that
libvirt pod can read

fix #1982
yaguangtang added a commit that referenced this issue Oct 29, 2024
…cess

update ovn-controler script to chown ovs bridge socket files so that
libvirt pod can read

fix #1982
@thywyn
Copy link
Contributor Author

thywyn commented Dec 2, 2024

Hey, I see that the the image is fixed.. When are you all adding the environment variable to the daemonset?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants