mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #98593 from chymy/scheduler-structured-logs-0130
migrate pkg/scheduler/framework/plugins/volume to structured logs
This commit is contained in:
commit
4225e1f1cc
@ -254,13 +254,13 @@ func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState,
|
|||||||
if !ok {
|
if !ok {
|
||||||
return framework.AsStatus(fmt.Errorf("no pod volumes found for node %q", nodeName))
|
return framework.AsStatus(fmt.Errorf("no pod volumes found for node %q", nodeName))
|
||||||
}
|
}
|
||||||
klog.V(5).Infof("Trying to bind volumes for pod \"%v/%v\"", pod.Namespace, pod.Name)
|
klog.V(5).InfoS("Trying to bind volumes for pod", "pod", klog.KObj(pod))
|
||||||
err = pl.Binder.BindPodVolumes(pod, podVolumes)
|
err = pl.Binder.BindPodVolumes(pod, podVolumes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.V(1).Infof("Failed to bind volumes for pod \"%v/%v\": %v", pod.Namespace, pod.Name, err)
|
klog.V(1).InfoS("Failed to bind volumes for pod", "pod", klog.KObj(pod), "err", err)
|
||||||
return framework.AsStatus(err)
|
return framework.AsStatus(err)
|
||||||
}
|
}
|
||||||
klog.V(5).Infof("Success binding volumes for pod \"%v/%v\"", pod.Namespace, pod.Name)
|
klog.V(5).InfoS("Success binding volumes for pod", "pod", klog.KObj(pod))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ func (pl *VolumeZone) Filter(ctx context.Context, _ *framework.CycleState, pod *
|
|||||||
nodeV, _ := nodeConstraints[k]
|
nodeV, _ := nodeConstraints[k]
|
||||||
volumeVSet, err := volumehelpers.LabelZonesToSet(v)
|
volumeVSet, err := volumehelpers.LabelZonesToSet(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Warningf("Failed to parse label for %q: %q. Ignoring the label. err=%v. ", k, v, err)
|
klog.InfoS("Failed to parse label, ignoring the label", "label", fmt.Sprintf("%s:%s", k, v), "err", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user