diff --git a/pkg/scheduler/algorithm/predicates/quota_predicate.go b/pkg/scheduler/algorithm/predicates/quota_predicate.go index d6534d9fbb..69eea5aa8c 100644 --- a/pkg/scheduler/algorithm/predicates/quota_predicate.go +++ b/pkg/scheduler/algorithm/predicates/quota_predicate.go @@ -21,6 +21,7 @@ import ( computemodels "yunion.io/x/onecloud/pkg/compute/models" "yunion.io/x/onecloud/pkg/scheduler/api" "yunion.io/x/onecloud/pkg/scheduler/core" + "yunion.io/x/onecloud/pkg/scheduler/options" ) type SQuotaPredicate struct { @@ -36,6 +37,9 @@ func (p *SQuotaPredicate) Clone() core.FitPredicate { } func (p *SQuotaPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error) { + if !options.GetOptions().EnableQuotaCheck { + return false, nil + } if len(u.SchedData().HostId) > 0 { return false, nil }