mirror of https://github.com/apache/cloudstack.git
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:
parent
b29d075108
commit
759b5fa048
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue