Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getPodUIDAndContainerIDFromCGroups (0.19 sec)

  1. cni/pkg/nodeagent/podcgroupns_test.go

    		},
    	} {
    		t.Run(tt.name, func(t *testing.T) {
    			podUID, containerID, err := getPodUIDAndContainerIDFromCGroups(makeCGroups(tt.cgroupPaths))
    
    			if tt.expectMsg != "" {
    				assert.Equal(t, tt.expectMsg, err.Error())
    				return
    			}
    			assert.Equal(t, tt.expectPodUID, podUID)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 24 17:36:49 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/podcgroupns.go

    	cgroups, err := GetCgroups(procCgroupData)
    	if err != nil {
    		return "", "", fmt.Errorf("unable to obtain cgroups: %v", err)
    	}
    
    	return getPodUIDAndContainerIDFromCGroups(cgroups)
    }
    
    func getPodUIDAndContainerIDFromCGroups(cgroups []Cgroup) (types.UID, string, error) {
    	var podUID types.UID
    	var containerID string
    	for _, cgroup := range cgroups {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top