scheduler: fix baremetal disk and storage not match

This commit is contained in:
Zexi Li
2019-09-16 20:19:29 +08:00
parent 9014c65e81
commit 3600fa351d
@@ -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 {
if len(d.Backend) != 0 && storage.StorageType != computeapi.STORAGE_BAREMETAL {
if storage.StorageType != d.Backend {
return &FailReason{
fmt.Sprintf("Storage %s backend %s != %s", storage.Name, storage.StorageType, d.Backend),