-
Notifications
You must be signed in to change notification settings - Fork 17
Fix private operator time drift #2300
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
base: main
Are you sure you want to change the base?
Conversation
…BTechLab/uid2-operator into ccm-UID2-6489-add-sync-fix-time-drift
…ator into ccm-UID2-6489-drift
…ator into ccm-UID2-6489-drift
…ator into ccm-UID2-6489-drift
| fi | ||
| } | ||
|
|
||
| start_time_sync_loop() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this is a bit complex.
Why not something much simpler like
sync_enclave_time() {
curl -s -f -x socks5h://127.0.0.1:3305 "${TIME_SYNC_URL}" | xargs -I{} date -u -s "{}"
}
Trust the parent instance clock without the condition ?
|
|
||
| start_time_sync_loop() { | ||
| while true; do | ||
| sleep "${TIME_SYNC_INTERVAL_SECONDS}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest using cron. Python sleep is process based, if process crashes (this process running, isn't a requirement for our enclave), it stops.
Using cron on systemd timer would be better IMO
| name: nmap-ncat | ||
| state: latest | ||
|
|
||
| - name: Install chrony for time sync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we need this. This AMI is the parent instance which already has time sync configured with AWS time server
Correct the time drift once a day
Test: