Skip to content

Commit 3d210f5

Browse files
authored
Merge pull request kosmos-io#212 from duanmengkk/cherry_pick
fix scheduler pvc create bug error
2 parents 0022ed1 + 2cdcb80 commit 3d210f5

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
@@ -234,7 +234,7 @@ func (pl *VolumeBinding) Filter(_ context.Context, cs *framework.CycleState, pod
234234
// Reserve reserves volumes of pod and saves binding status in cycle state.
235235
func (pl *VolumeBinding) Reserve(_ context.Context, cs *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status {
236236
node, err := pl.NodeLister.Get(nodeName)
237-
if err == nil {
237+
if err != nil {
238238
return framework.NewStatus(framework.Error, "node not found")
239239
}
240240

@@ -268,7 +268,7 @@ func (pl *VolumeBinding) Reserve(_ context.Context, cs *framework.CycleState, po
268268
// retry scheduling.
269269
func (pl *VolumeBinding) PreBind(ctx context.Context, cs *framework.CycleState, pod *corev1.Pod, nodeName string) *framework.Status {
270270
node, err := pl.NodeLister.Get(nodeName)
271-
if err == nil {
271+
if err != nil {
272272
return framework.NewStatus(framework.Error, "node not found")
273273
}
274274

0 commit comments

Comments
 (0)