-
Notifications
You must be signed in to change notification settings - Fork 375
kata not supporting cpuset/cpus via cri? #1079
Comments
similar failure on $ docker run -d --cpuset-cpus="0-1" ubuntu sleep 30000
347be183369a3a73d0a1be40dc64a418401f219e8aa1f34a6a9efd58c0b4e331
docker: Error response from daemon: OCI runtime create failed: rpc error: code = Internal desc = Could not run process: container_linux.go:348: starting container process caused "process_linux.go:279: applying cgroup configuration for process caused \"failed to write 0-1 to cpuset.cpus: write /sys/fs/cgroup/cpuset/docker/347be183369a3a73d0a1be40dc64a418401f219e8aa1f34a6a9efd58c0b4e331/cpuset.cpus: invalid argument\"": unknown. while no error with runc: # docker run -d --cpuset-cpus="0-1" --runtime runc ubuntu sleep 30000
7852efd248e08125a91b703db545913785d257db00d1a560717e85cb8dba0fac |
Thanks for the issue, @peter-wangxu To clarify, your original comment / issue description just suggestes --cpus 2 -- this should work with Kata today. Your comment does make use of --cpuset-cpus, though, which is not supported today. I believe this covers the same issue. WDYT? I'm hoping to get this feature added once more of us are back from holidays. |
@jcvenegas - FYI. |
hi @egernst, thanks for point out my flaw in the original issue. What I expected is the
sudo docker run --name cpus_runc --runtime runc -d --cpus 2 ubuntu:latest sleep 1000
peter@ubuntu:/sys/fs/cgroup/cpu/docker/1824e5251ce38ac1efbdaf78845e405319fcf7b505fca881ade888b1fe2c47bd$ cat cpu.cfs_period_us
100000
peter@ubuntu:/sys/fs/cgroup/cpu/docker/1824e5251ce38ac1efbdaf78845e405319fcf7b505fca881ade888b1fe2c47bd$ cat cpu.cfs_quota_us
200000
$ sudo docker run --name cpus_kata --runtime kata-runtime -d --cpus 2 ubuntu:latest sleep 1000
5ef1ae1bc8a062d765fea2a1f034144e3968df06f4b5b5882ebcad16b575b05c
peter@ubuntu:/sys/fs/cgroup/cpu/kata/5ef1ae1bc8a062d765fea2a1f034144e3968df06f4b5b5882ebcad16b575b05c$ cat cpu.cfs_period_us
100000
peter@ubuntu:/sys/fs/cgroup/cpu/kata/5ef1ae1bc8a062d765fea2a1f034144e3968df06f4b5b5882ebcad16b575b05c$ cat cpu.cfs_quota_us
-1 My doubt is how kata throttles the qemu-based container? Did I miss something here? |
@egernst, i have the same question for this cpus resources seeting. |
@peter-wangxu @zhiminghufighting
a POD is a group of containers sharing something (network, etc), when kata is the runtime, those containers run inside a virtual machine (qemu), cgroups and namespaces are applied in the guest not in the host, it's no possible for a process (like qemu) be part of two or more cgroups at the same time. For example if the cpu constrain for container A is 2 and 3 for the container B, what should be the cpu constrain for qemu 2, 3 or 5? also this number must be updated when a container is created or finished. |
this issue is fixed in #1189 |
fixed #1189 |
Description of problem
sudo docker run --name cpuset -d --cpus 2 ubuntu:latest sleep 1000
cat /sys/fs/cgroup/cpuset/kata/a3c6c718df1e4f5ec595ea13894d5446ff5c504b0d4b346288926f2bb32dd329/cpuset.cpus
0-2
obviously, both the docker inspect and cgroup parameter did not respect my input
--cpus 2
Expected result
we should see
0-1
from the output of cpuset.cpusActual result
kata-collect-data.sh
Meta details
Running
kata-collect-data.sh
version1.4.1 (commit 45ea48e)
at2018-12-28.01:19:16.260745953-0800
.Runtime is
/usr/bin/kata-runtime
.kata-env
Output of "
/usr/bin/kata-runtime kata-env
":Runtime config files
Runtime default config files
Runtime config file contents
Config file
/etc/kata-containers/configuration.toml
not foundOutput of "
cat "/usr/share/defaults/kata-containers/configuration.toml"
":KSM throttler
version
Output of "
/usr/libexec/kata-ksm-throttler/kata-ksm-throttler --version
":systemd service
Image details
Initrd details
No initrd
Logfiles
Runtime logs
Recent runtime problems found in system journal:
Proxy logs
Recent proxy problems found in system journal:
Shim logs
No recent shim problems found in system journal.
Throttler logs
No recent throttler problems found in system journal.
Container manager details
Have
docker
Docker
Output of "
docker version
":Output of "
docker info
":Output of "
systemctl show docker
":Have
kubectl
Kubernetes
Output of "
kubectl version
":Output of "
kubectl config view
":Output of "
systemctl show kubelet
":No
crio
Packages
Have
dpkg
Output of "
dpkg -l|egrep "(cc-oci-runtimecc-runtimerunv|kata-proxy|kata-runtime|kata-shim|kata-ksm-throttler|kata-containers-image|linux-container|qemu-)"
":No
rpm
The text was updated successfully, but these errors were encountered: