mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 20:42:26 +00:00
Merge pull request #118578 from bart0sh/PR117-DRA-log-manager-errors
DRA: report NodePrepareResource errors
This commit is contained in:
commit
42141aaf93
@ -74,6 +74,7 @@ const (
|
||||
FailedCreatePodSandBox = "FailedCreatePodSandBox"
|
||||
FailedStatusPodSandBox = "FailedPodSandBoxStatus"
|
||||
FailedMountOnFilesystemMismatch = "FailedMountOnFilesystemMismatch"
|
||||
FailedPrepareDynamicResources = "FailedPrepareDynamicResources"
|
||||
)
|
||||
|
||||
// Image manager event reason list
|
||||
|
@ -1089,7 +1089,14 @@ func (m *kubeGenericRuntimeManager) SyncPod(ctx context.Context, pod *v1.Pod, po
|
||||
|
||||
// Prepare resources allocated by the Dynammic Resource Allocation feature for the pod
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
||||
if m.runtimeHelper.PrepareDynamicResources(pod) != nil {
|
||||
if err := m.runtimeHelper.PrepareDynamicResources(pod); err != nil {
|
||||
ref, referr := ref.GetReference(legacyscheme.Scheme, pod)
|
||||
if referr != nil {
|
||||
klog.ErrorS(referr, "Couldn't make a ref to pod", "pod", klog.KObj(pod))
|
||||
return
|
||||
}
|
||||
m.recorder.Eventf(ref, v1.EventTypeWarning, events.FailedPrepareDynamicResources, "Failed to prepare dynamic resources: %v", err)
|
||||
klog.ErrorS(err, "Failed to prepare dynamic resources", "pod", klog.KObj(pod))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user