Skip to content

Commit bc53718

Browse files
authored
Merge pull request kosmos-io#211 from duanmengkk/release-1.21
fix: fix scheduler bug
2 parents 4191749 + 2cd4130 commit bc53718

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/scheduler/lifted/plugins/knodevolumebinding/knode_volume_binding.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (pl *VolumeBinding) PreFilterExtensions() framework.PreFilterExtensions {
9292
// retry scheduling.
9393
func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status {
9494
node, err := pl.NodeLister.Get(nodeName)
95-
if err == nil {
95+
if err != nil {
9696
return framework.NewStatus(framework.Error, "node not found")
9797
}
9898

@@ -126,7 +126,7 @@ func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState,
126126
// Reserve reserves volumes of pod and saves binding status in cycle state.
127127
func (pl *VolumeBinding) Reserve(_ context.Context, cs *framework.CycleState, p *corev1.Pod, nodeName string) *framework.Status {
128128
node, err := pl.NodeLister.Get(nodeName)
129-
if err == nil {
129+
if err != nil {
130130
return framework.NewStatus(framework.Error, "node not found")
131131
}
132132

0 commit comments

Comments
 (0)