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

Update user accounting database once time is synced #2815

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

citrus-it
Copy link
Contributor

(PST within the zones notwithstanding, see
oxidecomputer/helios-omicron-brand#4)

This change rewrites the user accounting databases for all running zones
(including the GZ) once time is synchronised. It uses the
/usr/platform/oxide/bin/tmpx command which is available in very recent
stlouis. If that's missing, it will just carry on regardless, leaving the
system uptime showing 13k days as before.

{"msg":"Timesync for [fd00:1122:3344:101::1]:12345 TimeSync { sync: false, skew: 0.0, correction: 0.0 }","v":0,"name":"SledAgent","level":30,"time":"1986-12-28T00:15:45.669141687Z","hostname":"gimlet-sn06","pid":101256,"component":"RSS"}
{"msg":"Time is not yet synchronized","v":0,"name":"SledAgent","level":40,"time":"1986-12-28T00:15:45.669154267Z","hostname":"gimlet-sn06","pid":101256,"component":"RSS","error":"\"Time is synchronized on 0/1 sleds\""}
...
gimlet-sn06 # date; uptime
Sun Dec 28 00:26:49 UTC 1986
00:26:49    up 1 min(s),  2 users,  load average: 1.31, 1.54, 0.77
gimlet-sn06 # zlogin oxz_internal_dns 'date; uptime'
Sat Dec 27 16:27:07 PST 1986
16:27:07    up 1 min(s),  0 users,  load average: 0.00, 0.00, 0.00
...
{"msg":"Timesync for [fd00:1122:3344:101::1]:12345 TimeSync { sync: true, skew: 117.186, correction: 2.207e-5 }","v":0,"name":"SledAgent","level":30,"time":"2023-04-11T22:34:20.543455275Z","hostname":"gimlet-sn06","pid":101256,"component":"RSS"}
...
gimlet-sn06 # date; uptime
Tue Apr 11 23:28:19 UTC 2023
23:28:19    up 1 min(s),  2 users,  load average: 4.75, 2.14, 1.10
gimlet-sn06 # zlogin oxz_internal_dns 'date; uptime'
Tue Apr 11 16:28:23 PDT 2023
16:28:23    up 1 min(s),  0 users,  load average: 0.00, 0.00, 0.00

@citrus-it citrus-it requested a review from smklein April 11, 2023 23:37
sled-agent/src/services.rs Outdated Show resolved Hide resolved
sled-agent/src/services.rs Show resolved Hide resolved
@citrus-it citrus-it enabled auto-merge (squash) April 12, 2023 15:09
@citrus-it citrus-it merged commit 1d7a852 into oxidecomputer:main Apr 12, 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.

2 participants