Omer Frenkel has posted comments on this change.
Change subject: core: add VMs from the same VDS to auto startup job in bulk
......................................................................
Patch Set 7:
(3 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AutoStartVmsRunner.java
Line 70: final DateTime now = DateTime.getNow();
Line 71: LinkedList<Pair<Guid, DateTime>> vmsToAdd = new LinkedList<>();
Line 72:
Line 73: for (Guid vmId: vmIds) {
Line 74: vmsToAdd.add(new Pair<>(vmId, now));
why add to one list and then addAll to the other? why not add directly to the
target?
Line 75: }
Line 76:
Line 77: autoStartVmsToRun.addAll(vmsToAdd);
Line 78: }
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java
Line 277: @Override
Line 278: public void runFailedAutoStartVMs(List<Guid> vmIds) {
Line 279: for (Guid vmId: vmIds) {
Line 280: // Alert that the virtual machine failed:
Line 281: AuditLogableBase event = new AuditLogableBase();
i guess you could create the event only once and reuse it, up to you
Line 282: event.setVmId(vmId);
Line 283: AuditLogDirector.log(event, AuditLogType.HA_VM_FAILED);
Line 284:
Line 285: log.infoFormat("Highly Available VM went down. Attempting
to restart. VM Name: {0}, VM Id: {1}",
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 425: _vdsManager.SuccededToRunVm(vm_guid);
Line 426: }
Line 427:
Line 428: // Refrain from auto-start HA VM during its re-run
attempts.
Line 429: _autoVmsToRun.removeAll(_vmsToRerun);
this is not clear
Line 430: // run all vms that crushed that marked with auto startup
Line 431:
getVdsEventListener().runFailedAutoStartVMs(_autoVmsToRun);
Line 432:
Line 433: // process all vms that their ip changed.
--
To view, visit http://gerrit.ovirt.org/19504
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I560383c8e73bb1728441fe5786954eba7ba88e60
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[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