mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Merge pull request #121670 from kerthcet/bug/add-status-message
Fix empty status message in logging
This commit is contained in:
commit
fb011badd7
@ -287,6 +287,10 @@ func (s *Status) Equal(x *Status) bool {
|
|||||||
return cmp.Equal(s.plugin, x.plugin)
|
return cmp.Equal(s.plugin, x.plugin)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Status) String() string {
|
||||||
|
return s.Message()
|
||||||
|
}
|
||||||
|
|
||||||
// NewStatus makes a Status out of the given arguments and returns its pointer.
|
// NewStatus makes a Status out of the given arguments and returns its pointer.
|
||||||
func NewStatus(code Code, reasons ...string) *Status {
|
func NewStatus(code Code, reasons ...string) *Status {
|
||||||
s := &Status{
|
s := &Status{
|
||||||
|
@ -515,7 +515,7 @@ func (p *PriorityQueue) runPreEnqueuePlugins(ctx context.Context, pInfo *framewo
|
|||||||
if s.Code() == framework.Error {
|
if s.Code() == framework.Error {
|
||||||
logger.Error(s.AsError(), "Unexpected error running PreEnqueue plugin", "pod", klog.KObj(pod), "plugin", pl.Name())
|
logger.Error(s.AsError(), "Unexpected error running PreEnqueue plugin", "pod", klog.KObj(pod), "plugin", pl.Name())
|
||||||
} else {
|
} else {
|
||||||
logger.Info("Status after running PreEnqueue plugin", "pod", klog.KObj(pod), "plugin", pl.Name(), "status", s)
|
logger.V(4).Info("Status after running PreEnqueue plugin", "pod", klog.KObj(pod), "plugin", pl.Name(), "status", s)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user