From 9014c65e81981177968afca186fe5be5534dd533 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Mon, 16 Sep 2019 11:48:24 +0800 Subject: [PATCH] scheduler: fix disk local backend not select matched storage --- pkg/scheduler/algorithm/predicates/disk_schedtag_predicate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/scheduler/algorithm/predicates/disk_schedtag_predicate.go b/pkg/scheduler/algorithm/predicates/disk_schedtag_predicate.go index 40e7c2d8ad..d33cfd5716 100644 --- a/pkg/scheduler/algorithm/predicates/disk_schedtag_predicate.go +++ b/pkg/scheduler/algorithm/predicates/disk_schedtag_predicate.go @@ -105,7 +105,7 @@ func (p *DiskSchedtagPredicate) IsResourceFitInput(u *core.Unit, c core.Candidat if c.Getter().ResourceType() == computeapi.HostResourceTypePrepaidRecycle { return nil } - if !(len(d.Backend) == 0 || d.Backend == computeapi.STORAGE_LOCAL) { + if len(d.Backend) != 0 { if storage.StorageType != d.Backend { return &FailReason{ fmt.Sprintf("Storage %s backend %s != %s", storage.Name, storage.StorageType, d.Backend),