Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for allocateOne (0.15 sec)

  1. pkg/kubelet/userns/userns_manager_test.go

    	require.NoError(t, err)
    
    	allocated, length, err := m.allocateOne("one")
    	assert.NoError(t, err)
    	assert.Equal(t, userNsLength, int(length), "m.isSet(%d).length=%v", allocated, length)
    	assert.Equal(t, true, m.isSet(allocated), "m.isSet(%d)", allocated)
    
    	allocated2, length2, err := m.allocateOne("two")
    	assert.NoError(t, err)
    	assert.NotEqual(t, allocated, allocated2, "allocated != allocated2")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  2. pkg/kubelet/userns/userns_manager.go

    	if index < 0 || index >= m.len {
    		return true
    	}
    	return m.used.Has(index)
    }
    
    // allocateOne finds a free user namespace and allocate it to the specified pod.
    // The first return value is the first ID in the user namespace, the second returns
    // the length for the user namespace range.
    func (m *UsernsManager) allocateOne(pod types.UID) (firstID uint32, length uint32, err error) {
    	firstZero, found, err := m.used.AllocateNext()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.3K bytes
    - Viewed (0)
Back to top