Skip to content

fix most resource leaks, resource management utils

Ryan Goodfellow requested to merge mergetb/tech/cogs:rygoo into master

Plugging Leaks

this MR clears out containerd images, namespaces and most cgroups after an infrapod is destroyed. there are still some leaking cgroups. it appears that all the task level cgroups are now being cleaned up, but the top level cgroup that carries the name of the namespace is not disappearing. so

<cgroup>:/<mzid>/<container>

cgroups all go away, however

<cgroup>:/<mzid>

remains, currently the actual cgroups that are leaking are

  • memory
  • perf_event
  • cpu,cpuacct
  • net_cls,net_prio
  • blkio
  • pids
  • cpuset
  • devices
  • freezer

Management utils

the prune function frees resources that are no longer needed. in a perfect world this function would not be needed, but today's world is not perfect and this is a powerful cleanup tool.

this initial commit cross references active materializations with virtual network interfaces, cleaning up any that are no longer in use.

  • cog mz container down [containers...]
  • cog mz container up [containers...]

Merge request reports