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

make timesync persistent #379

Closed

Conversation

andiradulescu
Copy link
Collaborator

@andiradulescu andiradulescu commented Sep 18, 2024

Fixes #374 by:

  • making the default system time to build time (by touching /usr/lib/clock-epoch) thus making the system time > /etc/fstab mtime (to prevent the fstab warning)
  • symlinked timesyncd clock so that the last time set is set first at next boot
  • validated by doing a couple of reboots and checking if 'systemctl daemon-reload' is requested
$ journalctl -u systemd-timesyncd
Sep 18 13:53:23 comma systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization...
Sep 18 13:53:23 comma (imesyncd)[3060]: systemd-timesyncd.service: ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.
Sep 18 21:09:51 comma systemd-timesyncd[3060]: System clock time unset or jumped backwards, restored from recorded timestamp: Wed 2024-09-18 21:09:51 UTC
Sep 18 21:09:51 comma systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization.
Sep 18 21:10:16 comma-cb80a5fa systemd-timesyncd[3060]: Network configuration changed, trying to establish connection.
Sep 18 21:10:29 comma-cb80a5fa systemd-timesyncd[3060]: Contacted time server 91.189.91.157:123 (ntp.ubuntu.com).
Sep 18 21:10:29 comma-cb80a5fa systemd-timesyncd[3060]: Initial clock synchronization to Wed 2024-09-18 21:10:29.738480 UTC.
$ sudo mount -o rw,remount /
$ 

@adeebshihadeh
Copy link
Contributor

This breaks this.

Aside from that, I don't think we want the time to pick up where it left off. If the time is incorrect, I think I'd prefer it starting from the same point unless you have a good reason for this?

@andiradulescu
Copy link
Collaborator Author

andiradulescu commented Sep 18, 2024

The only reason I thought it's good to pick up from where it left off is that routes/logs are arranged in chronological order, and other events, like sentry, etc. any reasons why starting from the same point is better?

@andiradulescu andiradulescu changed the title fix fstab by making timesync persistent make timesync persistent Sep 19, 2024
@andiradulescu andiradulescu reopened this Sep 19, 2024
@andiradulescu andiradulescu marked this pull request as draft September 19, 2024 09:44
@andiradulescu andiradulescu added the enhancement New feature or request label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fstab warning on v11
2 participants