mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
node: cpumgr: ErrorS -> InfoS
Convert uncommon use of ErrorS(nil, ...) into more regular use of InfoS. Set the verbosiness level to make sure the message is still emitted in regular expected configuration. Signed-off-by: Francesco Romani <fromani@redhat.com>
This commit is contained in:
parent
bc3c07091b
commit
a89c843edd
@ -381,7 +381,7 @@ func (m *manager) removeStaleState() {
|
|||||||
for podUID := range assignments {
|
for podUID := range assignments {
|
||||||
for containerName := range assignments[podUID] {
|
for containerName := range assignments[podUID] {
|
||||||
if _, ok := activeContainers[podUID][containerName]; !ok {
|
if _, ok := activeContainers[podUID][containerName]; !ok {
|
||||||
klog.ErrorS(nil, "RemoveStaleState: removing container", "podUID", podUID, "containerName", containerName)
|
klog.V(2).InfoS("RemoveStaleState: removing container", "podUID", podUID, "containerName", containerName)
|
||||||
err := m.policyRemoveContainerByRef(podUID, containerName)
|
err := m.policyRemoveContainerByRef(podUID, containerName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.ErrorS(err, "RemoveStaleState: failed to remove container", "podUID", podUID, "containerName", containerName)
|
klog.ErrorS(err, "RemoveStaleState: failed to remove container", "podUID", podUID, "containerName", containerName)
|
||||||
@ -392,7 +392,7 @@ func (m *manager) removeStaleState() {
|
|||||||
|
|
||||||
m.containerMap.Visit(func(podUID, containerName, containerID string) {
|
m.containerMap.Visit(func(podUID, containerName, containerID string) {
|
||||||
if _, ok := activeContainers[podUID][containerName]; !ok {
|
if _, ok := activeContainers[podUID][containerName]; !ok {
|
||||||
klog.ErrorS(nil, "RemoveStaleState: removing container", "podUID", podUID, "containerName", containerName)
|
klog.V(2).InfoS("RemoveStaleState: removing container", "podUID", podUID, "containerName", containerName)
|
||||||
err := m.policyRemoveContainerByRef(podUID, containerName)
|
err := m.policyRemoveContainerByRef(podUID, containerName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.ErrorS(err, "RemoveStaleState: failed to remove container", "podUID", podUID, "containerName", containerName)
|
klog.ErrorS(err, "RemoveStaleState: failed to remove container", "podUID", podUID, "containerName", containerName)
|
||||||
|
@ -515,7 +515,7 @@ func (p *staticPolicy) GetTopologyHints(s state.State, pod *v1.Pod, container *v
|
|||||||
// kubelet restart, for example.
|
// kubelet restart, for example.
|
||||||
if allocated, exists := s.GetCPUSet(string(pod.UID), container.Name); exists {
|
if allocated, exists := s.GetCPUSet(string(pod.UID), container.Name); exists {
|
||||||
if allocated.Size() != requested {
|
if allocated.Size() != requested {
|
||||||
klog.ErrorS(nil, "CPUs already allocated to container with different number than request", "pod", klog.KObj(pod), "containerName", container.Name, "requestedSize", requested, "allocatedSize", allocated.Size())
|
klog.InfoS("CPUs already allocated to container with different number than request", "pod", klog.KObj(pod), "containerName", container.Name, "requestedSize", requested, "allocatedSize", allocated.Size())
|
||||||
// An empty list of hints will be treated as a preference that cannot be satisfied.
|
// An empty list of hints will be treated as a preference that cannot be satisfied.
|
||||||
// In definition of hints this is equal to: TopologyHint[NUMANodeAffinity: nil, Preferred: false].
|
// In definition of hints this is equal to: TopologyHint[NUMANodeAffinity: nil, Preferred: false].
|
||||||
// For all but the best-effort policy, the Topology Manager will throw a pod-admission error.
|
// For all but the best-effort policy, the Topology Manager will throw a pod-admission error.
|
||||||
@ -565,7 +565,7 @@ func (p *staticPolicy) GetPodTopologyHints(s state.State, pod *v1.Pod) map[strin
|
|||||||
// kubelet restart, for example.
|
// kubelet restart, for example.
|
||||||
if allocated, exists := s.GetCPUSet(string(pod.UID), container.Name); exists {
|
if allocated, exists := s.GetCPUSet(string(pod.UID), container.Name); exists {
|
||||||
if allocated.Size() != requestedByContainer {
|
if allocated.Size() != requestedByContainer {
|
||||||
klog.ErrorS(nil, "CPUs already allocated to container with different number than request", "pod", klog.KObj(pod), "containerName", container.Name, "allocatedSize", requested, "requestedByContainer", requestedByContainer, "allocatedSize", allocated.Size())
|
klog.InfoS("CPUs already allocated to container with different number than request", "pod", klog.KObj(pod), "containerName", container.Name, "allocatedSize", requested, "requestedByContainer", requestedByContainer, "allocatedSize", allocated.Size())
|
||||||
// An empty list of hints will be treated as a preference that cannot be satisfied.
|
// An empty list of hints will be treated as a preference that cannot be satisfied.
|
||||||
// In definition of hints this is equal to: TopologyHint[NUMANodeAffinity: nil, Preferred: false].
|
// In definition of hints this is equal to: TopologyHint[NUMANodeAffinity: nil, Preferred: false].
|
||||||
// For all but the best-effort policy, the Topology Manager will throw a pod-admission error.
|
// For all but the best-effort policy, the Topology Manager will throw a pod-admission error.
|
||||||
|
Loading…
Reference in New Issue
Block a user