@@ -690,18 +690,6 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
690
690
metrics .SchedulerGoroutines .WithLabelValues ("binding" ).Inc ()
691
691
defer metrics .SchedulerGoroutines .WithLabelValues ("binding" ).Dec ()
692
692
693
- // Bind volumes first before Pod
694
- if ! allBound {
695
- err := sched .bindVolumes (assumedPod )
696
- if err != nil {
697
- sched .recordSchedulingFailure (assumedPodInfo , err , "VolumeBindingFailed" , err .Error ())
698
- metrics .PodScheduleErrors .Inc ()
699
- // trigger un-reserve plugins to clean up state associated with the reserved Pod
700
- fwk .RunUnreservePlugins (bindingCycleCtx , state , assumedPod , scheduleResult .SuggestedHost )
701
- return
702
- }
703
- }
704
-
705
693
// Run "permit" plugins.
706
694
permitStatus := fwk .RunPermitPlugins (bindingCycleCtx , state , assumedPod , scheduleResult .SuggestedHost )
707
695
if ! permitStatus .IsSuccess () {
@@ -722,6 +710,18 @@ func (sched *Scheduler) scheduleOne(ctx context.Context) {
722
710
return
723
711
}
724
712
713
+ // Bind volumes first before Pod
714
+ if ! allBound {
715
+ err := sched .bindVolumes (assumedPod )
716
+ if err != nil {
717
+ sched .recordSchedulingFailure (assumedPodInfo , err , "VolumeBindingFailed" , err .Error ())
718
+ metrics .PodScheduleErrors .Inc ()
719
+ // trigger un-reserve plugins to clean up state associated with the reserved Pod
720
+ fwk .RunUnreservePlugins (bindingCycleCtx , state , assumedPod , scheduleResult .SuggestedHost )
721
+ return
722
+ }
723
+ }
724
+
725
725
// Run "prebind" plugins.
726
726
preBindStatus := fwk .RunPreBindPlugins (bindingCycleCtx , state , assumedPod , scheduleResult .SuggestedHost )
727
727
if ! preBindStatus .IsSuccess () {
0 commit comments