Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update user accounting database once time is synced (#2815)
(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 ```
- Loading branch information