oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
244 stars 38 forks source link

consider rewriting utmp/wtmp records after time sync #2516

Closed wesolows closed 1 year ago

wesolows commented 1 year ago

Filing this here because I'm currently assuming that sled-agent will be responsible for kicking off all the steps necessary to get the kernel's wall time synchronised with the outside world.

It may be nice to rewrite the system boot time records once the clock has been set. While this isn't used for anything of importance that I know about, it is used by w(1) and uptime(1) to show the time since last boot. There is no way for any customer or FE ever to use these commands, and they have no real utility. But engineers have used them a number of times during development; the incorrect records obscure the amount of time a sled has been running, which can lead to confusion in reconstructing timelines for debugging. While it's not difficult to reconstruct the true wall boot time, rewriting the record would simplify this when the machine has made it far enough to have its clock in sync.

smklein commented 1 year ago

FYI @citrus-it

citrus-it commented 1 year ago

See https://github.com/oxidecomputer/omicron/pull/2815

citrus-it commented 1 year ago

Integrated as https://github.com/oxidecomputer/omicron/commit/1d7a852f6c34cb6c83728eec73ae9a9bbc1b9679