Merge pull request #2913 from zexi/hotfix/schedule-storage-backend

scheduler: fix disk local backend not select matched storage
This commit is contained in:
Zexi Li
2019-09-16 14:44:05 +08:00
committed by GitHub
@@ -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),