This commit is contained in:
wanyaoqi
2019-06-06 23:11:24 +08:00
parent 9deaa82e37
commit cf090235c5
15 changed files with 114 additions and 23 deletions
@@ -74,6 +74,10 @@ func (p *DiskSchedtagPredicate) GetResources(c core.Candidater) []ISchedtagCandi
func (p *DiskSchedtagPredicate) IsResourceFitInput(u *core.Unit, c core.Candidater, res ISchedtagCandidateResource, input ISchedtagCustomer) error {
storage := res.(*api.CandidateStorage)
if storage.Status == computeapi.STORAGE_OFFLINE || !storage.Enabled {
return fmt.Errorf("Storage status is %s, enable is %v", storage.Status, storage.Enabled)
}
d := input.(*diskW)
if d.Storage != "" {
if storage.Id != d.Storage && storage.Name != d.Storage {