Arik Hadas 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));
it should be more efficient that way, each time we add something to 
autoStartVmsToRun it creates a 'snapshot' of the set (since it is 
CopyOnWriteArraySet). by adding all the stuff that should be added together, 
the set is being cloned only once
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 also thought about it, but if someday we'll think of caching layer right 
before saving the audit logs to the db, we'll have a problem (all the logs will 
be as the last one). So since it was that way before, I think I'll just leave 
it that way for now
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);
the code or the comment?
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

Reply via email to