mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 03:57:41 +00:00
dra kubelet: fix error log
Previously we were returning the error string from 'err' (which is nil), when we should have been returning it from result.Error. Without this it is hard to debug issues with NodeUnprepareResources. Signed-off-by: Kevin Klues <kklues@nvidia.com>
This commit is contained in:
parent
b3926d137c
commit
fc2134c84c
@ -380,7 +380,7 @@ func (m *ManagerImpl) UnprepareResources(pod *v1.Pod) error {
|
|||||||
return fmt.Errorf("NodeUnprepareResources returned result for unknown claim UID %s", claimUID)
|
return fmt.Errorf("NodeUnprepareResources returned result for unknown claim UID %s", claimUID)
|
||||||
}
|
}
|
||||||
if result.Error != "" {
|
if result.Error != "" {
|
||||||
return fmt.Errorf("NodeUnprepareResources failed for claim %s/%s: %s", reqClaim.Namespace, reqClaim.Name, err)
|
return fmt.Errorf("NodeUnprepareResources failed for claim %s/%s: %s", reqClaim.Namespace, reqClaim.Name, result.Error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete last pod UID only if unprepare succeeds.
|
// Delete last pod UID only if unprepare succeeds.
|
||||||
|
Loading…
Reference in New Issue
Block a user