mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
DRA: Kubelet: add namespace to error messages
Include the namespace in "unable to get claim info" error messages in prepareResources and GetResources for easier debugging.
This commit is contained in:
parent
7845a9b330
commit
65e0274e06
1 changed files with 3 additions and 3 deletions
|
|
@ -416,7 +416,7 @@ func (m *Manager) prepareResources(ctx context.Context, pod *v1.Pod) error {
|
|||
err := m.cache.withLock(logger, func() error {
|
||||
info, exists := m.cache.get(claim.Name, claim.Namespace)
|
||||
if !exists {
|
||||
return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s", claim.Name)
|
||||
return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s in namespace %s", claim.Name, claim.Namespace)
|
||||
}
|
||||
for _, device := range result.GetDevices() {
|
||||
info.addDevice(plugin.DriverName(), state.Device{PoolName: device.PoolName,
|
||||
|
|
@ -443,7 +443,7 @@ func (m *Manager) prepareResources(ctx context.Context, pod *v1.Pod) error {
|
|||
for _, claim := range resourceClaims {
|
||||
info, exists := m.cache.get(claim.Name, claim.Namespace)
|
||||
if !exists {
|
||||
return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s", claim.Name)
|
||||
return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s in namespace %s", claim.Name, claim.Namespace)
|
||||
}
|
||||
info.setPrepared()
|
||||
}
|
||||
|
|
@ -541,7 +541,7 @@ func (m *Manager) GetResources(pod *v1.Pod, container *v1.Container) (*Container
|
|||
err := m.cache.withRLock(func() error {
|
||||
claimInfo, exists := m.cache.get(claimName, pod.Namespace)
|
||||
if !exists {
|
||||
return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s", claimName)
|
||||
return fmt.Errorf("internal error: unable to get claim info for ResourceClaim %s in namespace %s", claimName, pod.Namespace)
|
||||
}
|
||||
|
||||
for _, requestName := range requestNames {
|
||||
|
|
|
|||
Loading…
Reference in a new issue