Skip to content

Commit

Permalink
engine: Save updated Numa Nodes into NEXT_RUN snapshot
Browse files Browse the repository at this point in the history
When creating a VM configuration string from the VM object,
the NUMA Node list was always updated from the database.
This caused that the new settings for the VM were not
saved into the NEXT_RUN snapshot.

Bug-Url: https://bugzilla.redhat.com/2099225
  • Loading branch information
ljelinkova authored and ahadas committed Jun 29, 2022
1 parent 762fedb commit 3f13de6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ public Snapshot addSnapshot(Guid snapshotId,
* The VM to generate configuration from.
* @return A String containing the VM configuration.
*/
private String generateVmConfiguration(VM vm, List<DiskImage> disks, Map<Guid, VmDevice> vmDevices) {
private String generateVmConfiguration(VM vm,
List<DiskImage> disks,
Map<Guid, VmDevice> vmDevices) {
if (vm.getInterfaces() == null || vm.getInterfaces().isEmpty()) {
vm.setInterfaces(vmNetworkInterfaceDao.getAllForVm(vm.getId()));
}
Expand Down Expand Up @@ -323,7 +325,11 @@ private String generateVmConfiguration(VM vm, List<DiskImage> disks, Map<Guid, V
if (vm.getStaticData().getVmInit() == null) {
vmHandler.updateVmInitFromDB(vm.getStaticData(), true);
}
vmHandler.updateNumaNodesFromDb(vm);

if (vm.getStaticData().getvNumaNodeList() == null) {
vmHandler.updateNumaNodesFromDb(vm);
}

return ovfManager.exportVm(vm,
fullEntityOvfData,
clusterUtils.getCompatibilityVersion(vm));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public interface NextRunFieldMessages extends ConstantsWithLookup {

String initrdUrl();

String vNumaNodeList();

// Devices

String memballoon();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ virtioScsiMultiQueuesEnabled=VirtIO-SCSI Multi Queue
kernelUrl=Kernel URL
kernelParams=Kernel Parameters
initrdUrl=Initrd Url
vNumaNodeList=NUMA Nodes Configuration
# Devices - from VmManagementParametersBase with @EditableDeviceOnVmStatusField annotation
memballoon=Memory Balloon
watchdog=Watchdog
Expand Down

0 comments on commit 3f13de6

Please sign in to comment.