Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clock] Update system timezone via ConfigDB #57

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

fastiuk
Copy link
Contributor

@fastiuk fastiuk commented Apr 13, 2023

hld #1219
closes #1171

This PR brings functionality that allows us to update the system timezone by writing to the timezone field of the DEVICE_METADATA table of ConfigDB.
The clock CLI implemented in #2793 uses that functionality as the backend.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 13, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
…gs according to the new timezone.

Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@fastiuk please update the PR description and the PR subject. this PR is not for CLI but for a backend.

@yxieca
Copy link
Contributor

yxieca commented May 2, 2023

The fact that this code in hostcfgd is needed, does that imply that the BIOS clock is NOT synchronized with the OS settings? Which further implies that during reboot, the clock would be wrong until hostcfgd fixes the date/time? This is not safe for upgrades.

Copy link
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this change?

@fastiuk fastiuk changed the title [Clock] Implement clock CLI [Clock] Update system timezone via ConfigDB May 2, 2023
@fastiuk fastiuk assigned fastiuk and unassigned fastiuk May 2, 2023
@fastiuk
Copy link
Contributor Author

fastiuk commented May 2, 2023

The fact that this code in hostcfgd is needed, does that imply that the BIOS clock is NOT synchronized with the OS settings? Which further implies that during reboot, the clock would be wrong until hostcfgd fixes the date/time? This is not safe for upgrades.

No, it doesn't. The code reflected here is to update the system timezone, and it doesn't touch system time.
I would say, even more, changing the timezone is a permanent change, which will persist after a reboot, because timedatectl writes timezone to /etc/timezone.

@fastiuk
Copy link
Contributor Author

fastiuk commented May 2, 2023

Why do we need this change?

Which one, I don't see any code snippet

@fastiuk
Copy link
Contributor Author

fastiuk commented May 7, 2023

Ping here

@fastiuk fastiuk requested a review from yxieca May 17, 2023 06:18
@yxieca
Copy link
Contributor

yxieca commented May 20, 2023

Please confirm if there are tabs in the diff. If so, please change to white spaces.

@fastiuk
Copy link
Contributor Author

fastiuk commented May 22, 2023

Please confirm if there are tabs in the diff. If so, please change to white spaces.

no tabs in diff

@yxieca yxieca merged commit 7e6b5a4 into sonic-net:master Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standalone local clock setting
4 participants