Need help! Time synchronization issue. #12514
-
|
Dear CloudStack Community, I would be very grateful if someone could help me investigate a problem I’m currently facing. It is difficult to pinpoint exactly when this started, but I’ve noticed that CloudStack has stopped updating the state of virtual machines promptly when they are shut down from within the guest OS. Usually, it takes about 3 minutes for CloudStack to reflect the power state change. However, in my current infrastructure, this update now takes roughly 3 hours. To clarify: from the moment I execute halt -p inside the guest system until the state actually changes in the UI, 3 hours pass. I found the following entries in the management server logs: As seen in the message, the management server received a state update from the future, and the time difference is approximately 3 hours. All my servers—management, KVM nodes, and database servers—are synchronized to the same time in the Europe/Moscow zone, which is UTC +3 hours. I have verified this using timedatectl. DB time settings is: But if I understand correctly, the timestamps should still be in UTC. It would be great if someone could point out the error in my configuration or explain where this time offset might be coming from, as well as the correct way to fix it without causing any issues. I'm using: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
@SviridoffA, this sounds very similar to an issue I encountered while testing VM HA. As documented here: #12183 using a custom timezone can impact certain CloudStack operations. In my case, the root cause was a timezone mismatch in the following code: One of these values was returned in UTC, while the other was returned in local time because it relied on NOW() in MySQL. As a result, CloudStack ended up comparing timestamps from two different timezones, which caused a consistent offset (3 hours in my case). Switching the system and database timezone back to the default UTC resolved the issue. I suspect doing the same would likely fix your problem as well. |
Beta Was this translation helpful? Give feedback.
@SviridoffA, this sounds very similar to an issue I encountered while testing VM HA. As documented here: #12183 using a custom timezone can impact certain CloudStack operations. In my case, the root cause was a timezone mismatch in the following code:
One of these values was returned in UTC, while the other was returned in local time because it relied on NOW() in MySQL. As a result, CloudStack ended up comparing timestamps from two different timezones, which caused a consistent offset (3 hours in my case). Switching the system and database timezone back to the default UTC resolved the issue. I su…