From 2e29ef9cab63102400482238e8b66e1c0b12d474 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Sat, 29 May 2021 11:10:32 +0800 Subject: [PATCH 1/3] runtime: remove TODO comment from StatusContainer It is no longer valid as containerd already doesn't treat container pid as host process pid. Signed-off-by: Peng Tao --- src/runtime/virtcontainers/sandbox.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/virtcontainers/sandbox.go b/src/runtime/virtcontainers/sandbox.go index 5f2bd56d57..68930f20c2 100644 --- a/src/runtime/virtcontainers/sandbox.go +++ b/src/runtime/virtcontainers/sandbox.go @@ -1271,7 +1271,6 @@ func (s *Sandbox) DeleteContainer(ctx context.Context, containerID string) (VCCo } // StatusContainer gets the status of a container -// TODO: update container status properly, see kata-containers/runtime#253 func (s *Sandbox) StatusContainer(containerID string) (ContainerStatus, error) { if containerID == "" { return ContainerStatus{}, vcTypes.ErrNeedContainerID From fee0004ad4e3412efe40b13981c7d9ab03cf0e9c Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Sat, 29 May 2021 11:15:50 +0800 Subject: [PATCH 2/3] runtime: remove TODO about hot add memory in qemu.go Already addressed by https://github.com/kata-containers/runtime/pull/786 Signed-off-by: Peng Tao --- src/runtime/virtcontainers/qemu.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/virtcontainers/qemu.go b/src/runtime/virtcontainers/qemu.go index cf1c4377ee..42085fd8c3 100644 --- a/src/runtime/virtcontainers/qemu.go +++ b/src/runtime/virtcontainers/qemu.go @@ -2256,7 +2256,6 @@ func calcHotplugMemMiBSize(mem uint32, memorySectionSizeMB uint32) (uint32, erro return mem, nil } - // TODO: hot add memory aligned to memory section should be more properly. See https://github.com/kata-containers/runtime/pull/624#issuecomment-419656853 return uint32(math.Ceil(float64(mem)/float64(memorySectionSizeMB))) * memorySectionSizeMB, nil } From 1f5b229befc2a6fab4e8e644ed1f60588a06b632 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Sat, 29 May 2021 11:57:43 +0800 Subject: [PATCH 3/3] runtime: remove FIXME in SandboxState about CgroupPath It is in real life usage as we put non constrained sandbox processes (like shim) in a separate cgroup path. Fixes: #1944 Signed-off-by: Peng Tao --- src/runtime/virtcontainers/persist/api/sandbox.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/virtcontainers/persist/api/sandbox.go b/src/runtime/virtcontainers/persist/api/sandbox.go index efda2d296e..6f6e341154 100644 --- a/src/runtime/virtcontainers/persist/api/sandbox.go +++ b/src/runtime/virtcontainers/persist/api/sandbox.go @@ -34,7 +34,6 @@ type SandboxState struct { // CgroupPath is the cgroup hierarchy where sandbox's processes // including the hypervisor are placed. - // FIXME: sandbox can reuse "SandboxContainer"'s CgroupPath so we can remove this field. CgroupPath string // CgroupPath is the cgroup hierarchy where sandbox's processes