mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #15348 from swordqiu/hotfix/qj-scheduler-ignore-storage-capacity-constraint-if-migrating
fix: scheduler ignore storage capacity constraint if migrating
This commit is contained in:
@@ -134,7 +134,8 @@ func (p *StoragePredicate) Execute(ctx context.Context, u *core.Unit, c core.Can
|
||||
} else if len(disk.DiskId) > 0 && len(disk.Storage) > 0 {
|
||||
// server attach to an existing disk
|
||||
storeRequest[disk.Storage] = 1
|
||||
} else {
|
||||
} else if !isMigrate() || (isMigrate() && isLocalhostBackend(disk.Backend)) {
|
||||
// if migrate, only local storage need check capacity constraint
|
||||
if _, ok := sizeRequest[disk.Backend]; !ok {
|
||||
sizeRequest[disk.Backend] = map[string]int64{"max": -1, "total": 0}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user