-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Sync SONiC host's timezone to all containers #9493
base: master
Are you sure you want to change the base?
Conversation
/azpw run |
/AzurePipelines run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
Commenter does not have sufficient privileges for PR 9493 in repo Azure/sonic-buildimage |
Sync the content of /etc/timezone and /etc/localtime from the SONiC host to all containers during their own systemd services be started.
0a4f0a7
to
b451504
Compare
If there is a runtime change of timezone in the host, would all running containers pick up the new timezone automatically? |
No, the timezone would not be applied automatically. It is only applied during service starting. |
Do you mean each docker need to be restarted to sync its timezone with the host's timezone? Or only restart the services in each docker use the timezone? |
Yes, the script would be executed while the service is restarted and the restarted operation includes restarting the container. It is triggered by using the |
Sync the content of /etc/timezone and /etc/localtime from the SONiC host to all containers
during their own systemd services be started.
Why I did it
The containers are not awared the timezone change in the SONiC host, it may cause some info
are inconsistent e.g. time gap between syslog and swss.rec/sairedis.rec
How I did it
In the systemd scripts of services, then timezone of containers will be sync in the postStartAction()
and therefore the containers will have same timezone after their own services are restarted
How to verify it
Change the timezone in the SONiC host and then exec the sudo config reload -y
To check the containers timezone are changed
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)