Fix: Logging causes nilpointer

This commit is contained in:
sanposhiho 2021-05-23 15:52:33 +09:00
parent ec38907367
commit be16b7f818
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ func (pl *CSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod *v
node := nodeInfo.Node()
if node == nil {
return framework.NewStatus(framework.Error, fmt.Sprintf("node not found: %s", node.Name))
return framework.NewStatus(framework.Error, "node not found")
}
// If CSINode doesn't exist, the predicate may read the limits from Node object

View File

@ -215,7 +215,7 @@ func (pl *nonCSILimits) Filter(ctx context.Context, _ *framework.CycleState, pod
node := nodeInfo.Node()
if node == nil {
return framework.NewStatus(framework.Error, fmt.Sprintf("node not found: %s", node.Name))
return framework.NewStatus(framework.Error, "node not found")
}
var csiNode *storage.CSINode