Omer Frenkel has posted comments on this change.

Change subject: core: Hot set number of CPUs using update VM
......................................................................


Patch Set 6:

(5 comments)

are we ok with the fact that any other error than the one you handled will 
rollback the whole vm update?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 210:             VDSReturnValue vdsReturnValue = 
runVdsCommand(VDSCommandType.SetNumberOfCpus,
Line 211:                     new SetNumberOfCpusVDSCommand.Params(
Line 212:                             getVm().getRunOnVds(),
Line 213:                             getVm().getId(),
Line 214:                             getParameters().getVm().getNumOfCpus()));
i guess you could use here newVmStatic (and below again as well)
Line 215: 
Line 216:             AuditLogableBase logable = new AuditLogableBase();
Line 217:             logable.setVmId(getVmId());
Line 218:             logable.addCustomValue("numberOfCpus", 
String.valueOf(getParameters().getVm().getNumOfCpus()));


Line 215: 
Line 216:             AuditLogableBase logable = new AuditLogableBase();
Line 217:             logable.setVmId(getVmId());
Line 218:             logable.addCustomValue("numberOfCpus", 
String.valueOf(getParameters().getVm().getNumOfCpus()));
Line 219:             logable.addCustomValue("ErrorMessage", 
vdsReturnValue.getVdsError().getMessage());
in case of success. vdsReturnValue.getVdsError() will not be null?
Line 220: 
Line 221:             boolean hotPlugUnplugSucceeded = 
vdsReturnValue.getSucceeded() && vdsReturnValue.getVdsError().getCode() == 
VdcBllErrors.Done;
Line 222: 
Line 223:             AuditLogDirector.log(logable, hotPlugUnplugSucceeded ?


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java
Line 65:     @EditableOnVmStatusField
Line 66:     @EditableOnTemplate
Line 67:     private int memSizeMb;
Line 68: 
Line 69:     @EditableOnVmStatusField(statuses = {VMStatus.Down, VMStatus.Up} )
if we allow updating on up now, we need canDo to block non-supported versions 
on updateVm
Line 70:     @EditableOnTemplate
Line 71:     private int numOfSockets;
Line 72: 
Line 73:     @EditableOnVmStatusField


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java
Line 70:                 String.valueOf(vm.getNumOfCpus()));
Line 71:         if (Config.<Boolean> getValue(ConfigValues.SendSMPOnRunVm)) {
Line 72:             createInfo.put(VdsProperties.cores_per_socket,
Line 73:                     (Integer.toString(vm.getCpuPerSocket())));
Line 74:             if 
(vm.getVdsGroupCompatibilityVersion().compareTo(Version.v3_3) == 1) { // TODO 
change this when Version 3.4 is added
why not use feature supported?
Line 75:                 createInfo.put(VdsProperties.max_number_of_cpus, 
Config.<String> getValue(ConfigValues.MaxNumOfVmCpus));
Line 76:             }
Line 77:         }
Line 78:         final String compatibilityVersion = 
vm.getVdsGroupCompatibilityVersion().toString();


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java
Line 172:         
getModel().getIsDeleteProtected().setEntity(vm.isDeleteProtected());
Line 173:         getModel().selectSsoMethod(vm.getSsoMethod());
Line 174: 
Line 175:         
getModel().getNumOfSockets().setSelectedItem(vm.getNumOfSockets());
Line 176:         getModel().getNumOfSockets().setIsChangable(true);
not sure if its acceptable in UI to check for feature supported as well and 
allow according to the cluster version
Line 177: 
Line 178:         
getModel().getCoresPerSocket().setIsChangable(!vm.isRunning());
Line 179: 
Line 180:         
getModel().getKernel_parameters().setEntity(vm.getKernelParams());


-- 
To view, visit http://gerrit.ovirt.org/22757
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I464a3dda5f143d1fcef63fd903eb615b01efe081
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to