mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
fix error treatment and remove annotations from proto
This commit is contained in:
parent
09817b320f
commit
dc8dc31442
@ -423,11 +423,12 @@ func (m *kubeGenericRuntimeManager) updatePodSandboxResources(sandboxID string,
|
||||
if err != nil {
|
||||
stat, _ := grpcstatus.FromError(err)
|
||||
if stat.Code() == codes.Unimplemented {
|
||||
klog.ErrorS(err, "updatePodSandboxResources failed: method unimplemented on runtime service", "sandboxID", sandboxID)
|
||||
klog.InfoS("updatePodSandboxResources failed: method unimplemented on runtime service", "sandboxID", sandboxID)
|
||||
return nil
|
||||
}
|
||||
klog.ErrorS(err, "updatePodSandboxResources failed", "sandboxID", sandboxID)
|
||||
}
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// makeDevices generates container devices for kubelet runtime v1.
|
||||
|
@ -747,6 +747,7 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podContainerC
|
||||
// partially actuated.
|
||||
defer m.runtimeHelper.SetPodWatchCondition(pod.UID, "doPodResizeAction", func(*kubecontainer.PodStatus) bool { return true })
|
||||
|
||||
anyResizeDone := false
|
||||
if len(podContainerChanges.ContainersToUpdate[v1.ResourceMemory]) > 0 || podContainerChanges.UpdatePodResources {
|
||||
currentPodMemoryConfig, err := pcm.GetPodCgroupConfig(pod, v1.ResourceMemory)
|
||||
if err != nil {
|
||||
@ -775,9 +776,7 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podContainerC
|
||||
result.Fail(errResize)
|
||||
return
|
||||
}
|
||||
if errUpdate := m.updatePodSandboxResources(podContainerChanges.SandboxID, pod); errUpdate != nil {
|
||||
klog.ErrorS(err, "updatePodSandboxResources failed", "pod", pod.Name)
|
||||
}
|
||||
anyResizeDone = true
|
||||
}
|
||||
if len(podContainerChanges.ContainersToUpdate[v1.ResourceCPU]) > 0 || podContainerChanges.UpdatePodResources {
|
||||
if podResources.CPUShares == nil {
|
||||
@ -804,8 +803,12 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podContainerC
|
||||
result.Fail(errResize)
|
||||
return
|
||||
}
|
||||
anyResizeDone = true
|
||||
}
|
||||
|
||||
if anyResizeDone {
|
||||
if errUpdate := m.updatePodSandboxResources(podContainerChanges.SandboxID, pod); errUpdate != nil {
|
||||
klog.ErrorS(err, "updatePodSandboxResources failed", "pod", pod.Name)
|
||||
klog.ErrorS(errUpdate, "updatePodSandboxResources failed", "pod", pod.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user