-
Notifications
You must be signed in to change notification settings - Fork 374
Cannot update sandbox‘s CPU config #2129
Comments
I want to use Container.config directly at kata-runtime update process. |
…ners sandbox.config.Containers is not up to date, so use container.config directly Fixes: kata-containers#2129 Signed-off-by: Wang Liang <wangliangzz@inspur.com>
@fuxiao511 are you running kata containers using only the it seems like the vcpus are not hotplugged because the cgroup is empy, I'd like to see agent logs |
container.config does not point to sandbox.config.Containers.ContainerConfig which caused the ContainerConfig not sync. Fixes: kata-containers#2129 Signed-off-by: Wang Liang <wangliangzz@inspur.com>
Have changed newContainer's contConfig parameter from value to reference due to sandbox's ContainerConfig and Container's ContainerConfig not sync. Fixes: kata-containers#2129 Signed-off-by: Wang Liang <wangliangzz@inspur.com>
Have changed newContainer's contConfig parameter from value to reference due to sandbox's ContainerConfig and Container's ContainerConfig not sync. Fixes: kata-containers#2129 Signed-off-by: Wang Liang <wangliangzz@inspur.com>
container.config does not point to sandbox.config.Containers.ContainerConfig which caused the ContainerConfig not sync. Fixes: kata-containers#2129 Signed-off-by: Wang Liang <wangliangzz@inspur.com>
@devimc Sorry about respond so slowly. I am using only the kata-runtime. kata-runtime --log=/dev/stdout run --bundle /home/wl/busybox/ aaa |
container.config does not point to sandbox.config.Containers.ContainerConfig which caused the ContainerConfig not sync. Fixes: kata-containers#2129 Signed-off-by: Wang Liang <wangliangzz@inspur.com>
Description of problem
[root@localhost runtime]# cat /root/updatetxt
{
"memory": {
"limit": 0,
"reservation": 0,
"swap": 0,
"kernel": 0,
"kernelTCP": 0
},
"cpu": {
"shares": 0,
"quota": 200000,
"period": 100000,
"realtimeRuntime": 0,
"realtimePeriod": 0,
"cpus": "",
"mems": ""
},
"blockIO": {
"weight": 0
},
"pids": {
"limit": 0
}
}
[root@localhost runtime]# kata-runtime --log=/dev/stdout update -r /root/updatetxt aaa
INFO[0000] loaded configuration arch=amd64 command=update file=/etc/kata-containers/configuration.toml format=TOML name=kata-runtime pid=16102 source=katautils
DEBU[0000] arch=amd64 command=update default-kernel-parameters="systemd.unit=kata-containers.target systemd.mask=systemd-networkd.service systemd.mask=systemd-networkd.socket" name=kata-runtime pid=16102 source=katautils
INFO[0000] arch=amd64 arguments=""update -r /root/updatetxt aaa"" command=update commit=c7b4c5eab9f950dd0f933fbfbd7205a62a717242 name=kata-runtime pid=16102 source=runtime version=1.9.0-rc0
ERRO[0000] Unable to determine if running rootless arch=amd64 command=update container=aaa error="Failed to parse uid map file /proc/self/uid_map" name=kata-runtime pid=16102 source=rootless
DEBU[0000] New filesystem store backend for /var/lib/vc/sbs/aaa arch=amd64 backend=filesystem command=update container=aaa name=kata-runtime path=/var/lib/vc/sbs/aaa pid=16102 source=virtcontainers/store subsystem=store
DEBU[0000] New filesystem store backend for /run/vc/sbs/aaa arch=amd64 backend=filesystem command=update container=aaa name=kata-runtime path=/run/vc/sbs/aaa pid=16102 source=virtcontainers/store subsystem=store
DEBU[0000] New filesystem store backend for /var/lib/vc/uuid arch=amd64 backend=filesystem command=update container=aaa name=kata-runtime path=/var/lib/vc/uuid pid=16102 source=virtcontainers/store subsystem=store
INFO[0000] fetch sandbox arch=amd64 command=update container=aaa name=kata-runtime pid=16102 source=virtcontainers
DEBU[0000] converting /home/wl/busybox/config.json source=virtcontainers subsystem=compatoci
DEBU[0000] New filesystem store backend for /var/lib/vc/sbs/aaa/aaa arch=amd64 backend=filesystem command=update container=aaa name=kata-runtime path=/var/lib/vc/sbs/aaa/aaa pid=16102 source=virtcontainers/store subsystem=store
DEBU[0000] New filesystem store backend for /run/vc/sbs/aaa/aaa arch=amd64 backend=filesystem command=update container=aaa name=kata-runtime path=/run/vc/sbs/aaa/aaa pid=16102 source=virtcontainers/store subsystem=store
INFO[0000] release sandbox arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
INFO[0000] fetch sandbox arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers
DEBU[0000] converting /home/wl/busybox/config.json source=virtcontainers subsystem=compatoci
DEBU[0000] Request to hypervisor to update vCPUs arch=amd64 command=update container=aaa cpus-sandbox=1 name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
DEBU[0000] Sandbox CPUs: 1 arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
DEBU[0000] Request to hypervisor to update memory arch=amd64 command=update container=aaa memory-sandbox-size-byte=2147483648 name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
INFO[0000] {"QMP": {"version": {"qemu": {"micro": 0, "minor": 1, "major": 4}, "package": "v4.1.0-dirty"}, "capabilities": ["oob"]}} arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=qmp
INFO[0000] {"execute":"qmp_capabilities"} arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=qmp
INFO[0000] {"return": {}} arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=qmp
DEBU[0000] Sandbox memory size: 2048 MB arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
INFO[0000] New client arch=amd64 command=update container=aaa name=kata-runtime pid=16102 proxy=16069 sandbox=aaa source=virtcontainers subsystem=kata_agent url="unix:///run/vc/sbs/aaa/proxy.sock"
DEBU[0000] sending request arch=amd64 command=update container=aaa name=grpc.OnlineCPUMemRequest pid=16102 req= sandbox=aaa source=virtcontainers subsystem=kata_agent
INFO[0000] New client arch=amd64 command=update container=aaa name=kata-runtime pid=16102 proxy=16069 sandbox=aaa source=virtcontainers subsystem=kata_agent url="unix:///run/vc/sbs/aaa/proxy.sock"
DEBU[0000] sending request arch=amd64 command=update container=aaa name=grpc.UpdateContainerRequest pid=16102 req="container_id:"aaa" resources:<Memory:<> CPU:<Quota:200000 Period:100000 > Pids:<> BlockIO:<> > " sandbox=aaa source=virtcontainers subsystem=kata_agent
WARN[0000] sandbox's cgroup won't be updated: cgroup path is empty arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
INFO[0000] release sandbox arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=sandbox
INFO[0000] sanner return error: read unix @->/run/vc/vm/aaa/qmp.sock: use of closed network connection arch=amd64 command=update container=aaa name=kata-runtime pid=16102 sandbox=aaa source=virtcontainers subsystem=qmp
Expected result
hotplug 2 CPU devices to meet demand
Actual result
there is no hotplug CPU device due to ContainerConfig in Sandbox is not upto date
[root@localhost qemu]# ./scripts/qmp/qmp-shell -v -p /run/vc/vm/aaa/qmp.sock
Welcome to the QMP low-level shell!
Connected to QEMU 4.1.0
(QEMU) query-hotpluggable-cpus
{
"execute": "query-hotpluggable-cpus",
"arguments": {}
}
{
"return": [
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 7,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 6,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 5,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 4,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 3,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 2,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 1,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
},
{
"qom-path": "/machine/unattached/device[0]",
"type": "host-x86_64-cpu",
"vcpus-count": 1,
"props": {
"die-id": 0,
"socket-id": 0,
"node-id": 0,
"core-id": 0,
"thread-id": 0
}
}
]
}
The text was updated successfully, but these errors were encountered: