diff --git a/pkg/scheduler/cache/candidate/base.go b/pkg/scheduler/cache/candidate/base.go index cf7909bb92..033cff9bc2 100644 --- a/pkg/scheduler/cache/candidate/base.go +++ b/pkg/scheduler/cache/candidate/base.go @@ -774,6 +774,10 @@ func (b *BaseHostDesc) fillStorages(host *computemodels.SHost) error { ss := make([]*api.CandidateStorage, 0) for _, s := range host.GetHoststorages() { storage := s.GetStorage() + if storage == nil { + log.Warningf("%s invoke s.GetStorage return nil", storage.Id) + continue + } cs := &api.CandidateStorage{ SStorage: storage, ActualFreeCapacity: storage.Capacity - storage.ActualCapacityUsed,