@@ -362,17 +362,16 @@ func main() {
362362 }
363363 defer containersControl .Delete () //nolint:errcheck
364364
365- // Create virtual-pods cgroup hierarchy for multi-pod support
366- // This will be the parent for all virtual pod cgroups: /containers/virtual-pods/{virtualSandboxID}
367- virtualPodsControl , err := cgroup .NewManager ("/containers/virtual-pods" , & oci.LinuxResources {
365+ // Create /pods cgroup hierarchy for all pods (sandbox, virtual pod, and v2).
366+ podsControl , err := cgroup .NewManager ("/pods" , & oci.LinuxResources {
368367 Memory : & oci.LinuxMemory {
369- Limit : & containersLimit , // Share the same limit as containers
368+ Limit : & containersLimit ,
370369 },
371370 })
372371 if err != nil {
373- logrus .WithError (err ).Fatal ("failed to create containers/virtual- pods cgroup" )
372+ logrus .WithError (err ).Fatal ("failed to create pods cgroup" )
374373 }
375- defer virtualPodsControl .Delete () //nolint:errcheck
374+ defer podsControl .Delete () //nolint:errcheck
376375
377376 gcsControl , err := cgroup .NewManager ("/gcs" , & oci.LinuxResources {})
378377 if err != nil {
@@ -394,10 +393,6 @@ func main() {
394393 EnableV4 : * v4 ,
395394 }
396395 h := hcsv2 .NewHost (rtime , tport , initialEnforcer , logWriter )
397- // Initialize virtual pod support in the host
398- if err := h .InitializeVirtualPodSupport (virtualPodsControl ); err != nil {
399- logrus .WithError (err ).Warn ("Virtual pod support initialization failed" )
400- }
401396 b .AssignHandlers (mux , h )
402397
403398 var bridgeIn io.ReadCloser
@@ -433,13 +428,13 @@ func main() {
433428 oomFile := os .NewFile (oom , "cefd" )
434429 defer oomFile .Close ()
435430
436- // Setup OOM monitoring for virtual- pods cgroup
437- virtualPodsOom , err := virtualPodsControl .OOMEventFD ()
431+ // Setup OOM monitoring for pods cgroup
432+ podsOom , err := podsControl .OOMEventFD ()
438433 if err != nil {
439- logrus .WithError (err ).Fatal ("failed to retrieve the virtual- pods cgroups oom eventfd" )
434+ logrus .WithError (err ).Fatal ("failed to retrieve the pods cgroups oom eventfd" )
440435 }
441- virtualPodsOomFile := os .NewFile (virtualPodsOom , "vp -oomfd" )
442- defer virtualPodsOomFile .Close ()
436+ podsOomFile := os .NewFile (podsOom , "pods -oomfd" )
437+ defer podsOomFile .Close ()
443438
444439 // time synchronization service
445440 if ! (* disableTimeSync ) {
@@ -450,7 +445,7 @@ func main() {
450445
451446 go readMemoryEvents (startTime , gefdFile , "/gcs" , int64 (* gcsMemLimitBytes ), gcsControl )
452447 go readMemoryEvents (startTime , oomFile , "/containers" , containersLimit , containersControl )
453- go readMemoryEvents (startTime , virtualPodsOomFile , "/containers/virtual- pods" , containersLimit , virtualPodsControl )
448+ go readMemoryEvents (startTime , podsOomFile , "/pods" , containersLimit , podsControl )
454449 err = b .ListenAndServe (bridgeIn , bridgeOut )
455450 if err != nil {
456451 logrus .WithFields (logrus.Fields {
0 commit comments