mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
node: device-mgr: Change ErrorS(nil, ...) to InfoS
Ensure consistency across resource managers and update ErrorS(nil, ...) to InfoS. Similar changes have been proposed in CPU Manager and Memory Manager. Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
parent
a716ea756d
commit
f8596d6d28
@ -453,7 +453,7 @@ func (m *ManagerImpl) GetCapacity() (v1.ResourceList, v1.ResourceList, []string)
|
|||||||
// should always be consistent. Otherwise, we run with the risk
|
// should always be consistent. Otherwise, we run with the risk
|
||||||
// of failing to garbage collect non-existing resources or devices.
|
// of failing to garbage collect non-existing resources or devices.
|
||||||
if !ok {
|
if !ok {
|
||||||
klog.ErrorS(nil, "Unexpected: healthyDevices and endpoints are out of sync")
|
klog.InfoS("Unexpected: healthyDevices and endpoints are out of sync")
|
||||||
}
|
}
|
||||||
delete(m.endpoints, resourceName)
|
delete(m.endpoints, resourceName)
|
||||||
delete(m.healthyDevices, resourceName)
|
delete(m.healthyDevices, resourceName)
|
||||||
@ -468,7 +468,7 @@ func (m *ManagerImpl) GetCapacity() (v1.ResourceList, v1.ResourceList, []string)
|
|||||||
eI, ok := m.endpoints[resourceName]
|
eI, ok := m.endpoints[resourceName]
|
||||||
if (ok && eI.e.stopGracePeriodExpired()) || !ok {
|
if (ok && eI.e.stopGracePeriodExpired()) || !ok {
|
||||||
if !ok {
|
if !ok {
|
||||||
klog.ErrorS(nil, "Unexpected: unhealthyDevices and endpoints are out of sync")
|
klog.InfoS("Unexpected: unhealthyDevices and endpoints are out of sync")
|
||||||
}
|
}
|
||||||
delete(m.endpoints, resourceName)
|
delete(m.endpoints, resourceName)
|
||||||
delete(m.unhealthyDevices, resourceName)
|
delete(m.unhealthyDevices, resourceName)
|
||||||
@ -952,7 +952,7 @@ func (m *ManagerImpl) GetDeviceRunContainerOptions(pod *v1.Pod, container *v1.Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !m.checkPodActive(pod) {
|
if !m.checkPodActive(pod) {
|
||||||
klog.ErrorS(nil, "pod deleted from activePods, skip to reAllocate", "podUID", podUID)
|
klog.InfoS("pod deleted from activePods, skip to reAllocate", "podUID", podUID)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ func (m *ManagerImpl) GetTopologyHints(pod *v1.Pod, container *v1.Container) map
|
|||||||
allocated := m.podDevices.containerDevices(string(pod.UID), container.Name, resource)
|
allocated := m.podDevices.containerDevices(string(pod.UID), container.Name, resource)
|
||||||
if allocated.Len() > 0 {
|
if allocated.Len() > 0 {
|
||||||
if allocated.Len() != requested {
|
if allocated.Len() != requested {
|
||||||
klog.ErrorS(nil, "Resource already allocated to pod with different number than request", "resource", resource, "pod", klog.KObj(pod), "containerName", container.Name, "request", requested, "allocated", allocated.Len())
|
klog.InfoS("Resource already allocated to pod with different number than request", "resource", resource, "pod", klog.KObj(pod), "containerName", container.Name, "request", requested, "allocated", allocated.Len())
|
||||||
deviceHints[resource] = []topologymanager.TopologyHint{}
|
deviceHints[resource] = []topologymanager.TopologyHint{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ func (m *ManagerImpl) GetTopologyHints(pod *v1.Pod, container *v1.Container) map
|
|||||||
available := m.getAvailableDevices(resource)
|
available := m.getAvailableDevices(resource)
|
||||||
reusable := m.devicesToReuse[string(pod.UID)][resource]
|
reusable := m.devicesToReuse[string(pod.UID)][resource]
|
||||||
if available.Union(reusable).Len() < requested {
|
if available.Union(reusable).Len() < requested {
|
||||||
klog.ErrorS(nil, "Unable to generate topology hints: requested number of devices unavailable", "resource", resource, "request", requested, "available", available.Union(reusable).Len())
|
klog.InfoS("Unable to generate topology hints: requested number of devices unavailable", "resource", resource, "request", requested, "available", available.Union(reusable).Len())
|
||||||
deviceHints[resource] = []topologymanager.TopologyHint{}
|
deviceHints[resource] = []topologymanager.TopologyHint{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ func (m *ManagerImpl) GetPodTopologyHints(pod *v1.Pod) map[string][]topologymana
|
|||||||
allocated := m.podDevices.podDevices(string(pod.UID), resource)
|
allocated := m.podDevices.podDevices(string(pod.UID), resource)
|
||||||
if allocated.Len() > 0 {
|
if allocated.Len() > 0 {
|
||||||
if allocated.Len() != requested {
|
if allocated.Len() != requested {
|
||||||
klog.ErrorS(nil, "Resource already allocated to pod with different number than request", "resource", resource, "pod", klog.KObj(pod), "request", requested, "allocated", allocated.Len())
|
klog.InfoS("Resource already allocated to pod with different number than request", "resource", resource, "pod", klog.KObj(pod), "request", requested, "allocated", allocated.Len())
|
||||||
deviceHints[resource] = []topologymanager.TopologyHint{}
|
deviceHints[resource] = []topologymanager.TopologyHint{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ func (m *ManagerImpl) GetPodTopologyHints(pod *v1.Pod) map[string][]topologymana
|
|||||||
// Get the list of available devices, for which TopologyHints should be generated.
|
// Get the list of available devices, for which TopologyHints should be generated.
|
||||||
available := m.getAvailableDevices(resource)
|
available := m.getAvailableDevices(resource)
|
||||||
if available.Len() < requested {
|
if available.Len() < requested {
|
||||||
klog.ErrorS(nil, "Unable to generate topology hints: requested number of devices unavailable", "resource", resource, "request", requested, "available", available.Len())
|
klog.InfoS("Unable to generate topology hints: requested number of devices unavailable", "resource", resource, "request", requested, "available", available.Len())
|
||||||
deviceHints[resource] = []topologymanager.TopologyHint{}
|
deviceHints[resource] = []topologymanager.TopologyHint{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user