-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Description of problem
When running Kata Containers in rootless VMM mode, the runtime incorrectly creates the katahostshareddir under the global path /run/kata-containers/shared/sandboxes/ , instead of under the user-specific runtime directory /run/user/<uid>/kata-containers/shared/sandboxes/ .
I reproduced the issue using the following configuration and command to start a rootless VM:
➜ crictl_pods_rootless cat sandbox.yaml
metadata:
attempt: 1
name: test-pod-rootless
namespace: default
uid: hdishd83djaidwnduwk28bcsb
log_directory: /tmp
linux:
namespaces:
options: {}
➜ crictl_pods_rootless sudo crictl runp --runtime=kata sandbox.yaml
49d2f3d5aac6de56fac78def7ba95511470ca31c7ef88e48e2bd9410467e46db
After this, I observed that the runtime created the shared directory at:
root@kata-szt-vm:/run/user/1011/run# ls
vc
root@kata-szt-vm:/run/user/1011/run# cd /run/kata-containers/
root@kata-szt-vm:/run/kata-containers# ls
shared
Expected result
In rootless VMM mode, all runtime-specific files (like the shared directory used for 9pfs or virtiofs) should reside under the user's runtime directory:
/run/user/<uid>/kata-containers/shared/sandboxes/<sandbox-id>/
Actual result
The directory is created globally, as if in rootful mode:
/run/kata-containers/shared/sandboxes/<sandbox-id>/
Further information
Kata Containers survey
Please consider taking the survey to help us help you: https://openinfrafoundation.formstack.com/forms/kata_containers_user_survey