scheduler: fix disk local backend not select matched storage

This commit is contained in:
Zexi Li
2019-09-16 11:48:24 +08:00
parent ec3b8cf66a
commit 9014c65e81
@@ -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),