Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Not able to mount sockets from /var/lib/vhost_sockets/ into the pod but it works on pod restart. #78

@shweta50

Description

@shweta50

I'm running ovs-dpdk in a pod. To enable Userspace CNI to access containerized OVS-DPDK using a workaround take ovs-vsctl calls made from the host and direct them to the appropriate container running OVS-DPDK.
Userspace creates vhost user sockets on the host. ( Mount from /var/lib/kubelet/pods/d034a197-2908-4889-9831-c0040ddb2bae/volumes/kubernetes.io~empty-dir/shared-dir to /var/lib/vhost_sockets/d034a197-2908-4889-9831-c0040ddb2bae)

# ls -l /var/lib/vhost_sockets/d034a197-2908-4889-9831-c0040ddb2bae/36505445fd91-net1 
srwxrwxr-x 1 uuidd input 0 Mar 22 10:34 /var/lib/vhost_sockets/d034a197-2908-4889-9831-c0040ddb2bae/36505445fd91-net1

As it’s communicating with ovs-dpdk in the pod it’s looking for sockets in the ovs-dpdk pod. I'm trying to mount sockets into the pod, but it’s not mounting the socket.
options: {vhost-server-path=“/var/lib/vhost_sockets/91aa04fd-df05-402b-b4c1-4d4ea85fc8e5/e3dbe834316c-net1”}

Not just sockets it’s not mounting other files created in the socket dir too.
however, it gets mounted when we restart ovs-dpdk pod.

I see that permissions of the socket directory in the pod are different before and after pod restart.
before restart,

bash-5.1# ls -l /var/lib/vhost_sockets/
drwxr-x--- 2 root root 4096 Mar 22 10:34 d034a197-2908-4889-9831-c0040ddb2bae

after pod restart,

bash-5.1# ls -l /var/lib/vhost_sockets/
drwxrwxrwx 2 root root 4096 Mar 22 10:37 d034a197-2908-4889-9831-c0040ddb2bae

Any pointers on what can be done here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions