mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #16471 from wanyaoqi/fix/live-migrate-cpu-mem-update
fix(host): update cpudesc on cpu hotpluged
This commit is contained in:
@@ -2398,6 +2398,7 @@ func (task *SGuestHotplugCpuMemTask) onAddMemDevice(reason string) {
|
||||
|
||||
func (task *SGuestHotplugCpuMemTask) updateGuestDesc() {
|
||||
task.Desc.Cpu += int64(task.addedCpuCount)
|
||||
task.Desc.CpuDesc.Cpus += uint(task.addedCpuCount)
|
||||
task.Desc.Mem += int64(task.addedMemSize)
|
||||
if task.addedMemSize > 0 {
|
||||
if task.Desc.MemDesc.MemSlots == nil {
|
||||
|
||||
@@ -2062,9 +2062,8 @@ func (s *SKVMGuestInstance) SyncConfig(
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// update guest live desc
|
||||
s.Desc.Cpu = guestDesc.Cpu
|
||||
s.Desc.Mem = guestDesc.Mem
|
||||
// update guest live desc, don't be here update cpu and mem
|
||||
// cpu and memory should update from SGuestHotplugCpuMemTask
|
||||
s.Desc.SGuestControlDesc = guestDesc.SGuestControlDesc
|
||||
s.Desc.SGuestProjectDesc = guestDesc.SGuestProjectDesc
|
||||
s.Desc.SGuestRegionDesc = guestDesc.SGuestRegionDesc
|
||||
|
||||
Reference in New Issue
Block a user