Github user anshul1886 commented on the pull request:
https://github.com/apache/cloudstack/pull/885#issuecomment-143442228
We don't need new method isPowerStateUpToDate(long instanceId) as we are
already performing the same operations in
_instanceDao.updatePowerState(entry.getKey(), hostId, entry.getValue())) in
start of method processReport.
So here we only need one line change
Date vmStateUpdateTime = instance.getPowerStateUpdateTime();
instead of
Date vmStateUpdateTime = instance.updateTime();
Did you check how update_time is getting updated?
I think one place it is getting updated during state transitions of VM.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---