Liron Ar has posted comments on this change.
Change subject: core: Plug disk to VM when adding a new disk
......................................................................
Patch Set 1:
(3 comments)
see inline..
what about the REST implementation?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
Line 546: super.endSuccessfully();
Line 547: }
Line 548:
Line 549: private void plugDiskToVmIfNeeded() {
Line 550: if (getVm() != null && getParameters().getPlugDiskToVm() &&
getVm().getStatus() != VMStatus.Down) {
please change the order of the checks here, getParameters().getPlugDiskToVm()
should be first to avoid possible db load.
Line 551: HotPlugDiskToVmParameters params = new
HotPlugDiskToVmParameters(getVmId(), getParameters().getDiskInfo().getId());
Line 552:
Backend.getInstance().runInternalAction(VdcActionType.HotPlugDiskToVm, params);
Line 553: }
Line 554: }
Line 548:
Line 549: private void plugDiskToVmIfNeeded() {
Line 550: if (getVm() != null && getParameters().getPlugDiskToVm() &&
getVm().getStatus() != VMStatus.Down) {
Line 551: HotPlugDiskToVmParameters params = new
HotPlugDiskToVmParameters(getVmId(), getParameters().getDiskInfo().getId());
Line 552:
Backend.getInstance().runInternalAction(VdcActionType.HotPlugDiskToVm, params);
1. in case of failure in the CDA of the hotplug command, the user won't get any
notification about that, there should be an audit log.
2. when executing the hotplug command, the exclusive lock on the disk shouldn't
be taken as it's already locked by us (as we added it), please check there if
the execution is internal on the getExclusiveLocks method
Line 553: }
Line 554: }
Line 555:
Line 556: @Override
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddDiskParameters.java
Line 6: public class AddDiskParameters extends VmDiskOperationParameterBase {
Line 7: private static final long serialVersionUID = -7832310521101821905L;
Line 8: private Guid vmSnapshotId;
Line 9: private Guid storageDomainId;
Line 10: private boolean plugDiskToVm = true;
The default here should be false -
in case of user scripts that add disks (for some reason.. ) - we will now
hotplug each disk by default which will change the user experience, can take
all the slots in the vm and increase the time it takes to add a disk..the user
experience shouldn't be changed for "existing" users of that command.
Line 11:
Line 12: public AddDiskParameters() {
Line 13: storageDomainId = Guid.Empty;
Line 14: }
--
To view, visit http://gerrit.ovirt.org/21851
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia9778bcaf21b346a55992590159cabd8d78f0c66
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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