For network stats aggregation job, get the most recent mgmt server id to do the aggregation. Set dao filter to descending.

(cherry picked from commit ce5c35b193)
This commit is contained in:
Kishan Kavala 2014-10-01 12:12:58 +05:30 committed by David Nalley
parent b29d075108
commit 759b5fa048
1 changed files with 1 additions and 1 deletions

View File

@ -1020,7 +1020,7 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
if (scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
//Check for ownership
//msHost in UP state with min id should run the job
final ManagementServerHostVO msHost = _msHostDao.findOneInUpState(new Filter(ManagementServerHostVO.class, "id", true, 0L, 1L));
final ManagementServerHostVO msHost = _msHostDao.findOneInUpState(new Filter(ManagementServerHostVO.class, "id", false, 0L, 1L));
if (msHost == null || (msHost.getMsid() != mgmtSrvrId)) {
s_logger.debug("Skipping aggregate network stats update");
scanLock.unlock();