mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #17505 from CloudCourierStation/master
fix fillStorage get storage cause scheduler panic
This commit is contained in:
+4
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user