mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
userns: Wrap more errors
Most errors where already wrapped, but these were missing. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
parent
c0eb9e3433
commit
e885986393
@ -434,12 +434,12 @@ func (m *UsernsManager) GetOrCreateUserNamespaceMappings(pod *v1.Pod, runtimeHan
|
||||
if string(content) != "" {
|
||||
userNs, err = m.parseUserNsFileAndRecord(pod.UID, content)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("user namespace: %w", err)
|
||||
}
|
||||
} else {
|
||||
userNs, err = m.createUserNs(pod)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("create user namespace: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ func (m *UsernsManager) CleanupOrphanedPodUsernsAllocations(pods []*v1.Pod, runn
|
||||
allFound := sets.New[string]()
|
||||
found, err := m.kl.ListPodsFromDisk()
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("user namespace: read pods from disk: %w", err)
|
||||
}
|
||||
|
||||
for _, podUID := range found {
|
||||
|
Loading…
Reference in New Issue
Block a user