The clock skew daemon interferes with ntpd upon startup. On boot, the following is observed: Starting sshd. Performing sanity check on sshd configuration. Starting google_network_setup. Starting google_ip_forwarding_daemon. Starting google_clock_skew_daemon. Starting google_accounts_daemon. ntpd is not running. No core dumps found. Clearing /tmp (X related). Updating motd:. Mounting late filesystems:. Starting ntpd. Sep 8 20:17:20 yertle ntpd[697]: unable to bind to wildcard address :: - another process may be running - EXITING What happens is that the clock skew daemon starts and does not see ntpd running. It then proceeds to set the time using ntpdate. By luck of timing, it does so at the precise moment that ntpd wants to start, causing that to fail. Subsequently, since ntpd was not discovered by the daemon it is not restarted, and the system time drifts without ntpd to keep it in check. Once the system is running, if you stop the clock skew daemon, start ntpd, then re-start the clock skew daemon, you will observe it stop and restart ntpd. If you stop ntpd, and restart the clock skew daemon, you will observe the "ntpd is not running." message, and ntpd is not started. It seems to me that ntpd should come before the clock skew daemon in the startup order. The documentation implies that the daemon only does work on startup or migrate, so it is necessary for migration and ntpd is necessary for the rest of the time.
Also as an aside, the "setup" rc.d scripts only run actions at boot and do not leave daemons running, so their "stop" actions should be null, instead of complaining: # /usr/local/etc/rc.d/google_network_setup stop google_network_setup not running? (check /var/run/google_network_setup.pid). # /usr/local/etc/rc.d/google_instance_setup stop google_instance_setup not running? (check /var/run/google_instance_setup.pid).
Created attachment 186713 [details] Path which adds ntpd as a requirement in clock skew rc script (In reply to Vick Khera from comment #0) Thanks for your report. I attached a patch that should solve the issue (could you confirm please?)
Created attachment 186714 [details] Set stop action to null in the "setup" scripts (In reply to Vick Khera from comment #1) Thanks for your report. Please see attached patch that fixes this
Created attachment 186715 [details] Patch which adds ntpd as requirement for clock skew and set stop action to null in the "setup" scripts Re-adding the patch against the svn tree and merging both patch in a single diff to make it easier to merge
Thanks. The ntpd is restarted upon boot now. Sorry for the delay, but I don't reboot this system very often. Any idea on when this will get committed to ports tree?
(In reply to Vick Khera from comment #5) Thank you for reporting this bug and testing the patch I set the merge-quarterly flag, I guess we need to wait for a committer to apply this patch or ping some commiter/mailinglist
A commit references this bug: Author: ultima Date: Sun Oct 15 22:11:31 UTC 2017 New revision: 452169 URL: https://svnweb.freebsd.org/changeset/ports/452169 Log: Fixed ntpd starting too early causing other services to fail at start. Fixed error when stopping services. PR: 222197 Submitted by: Helen Koike (maintainer) Reported by: Vick Khera MFH: 2017Q4 Changes: head/sysutils/py-google-compute-engine/Makefile head/sysutils/py-google-compute-engine/files/google_clock_skew_daemon.in head/sysutils/py-google-compute-engine/files/google_instance_setup.in head/sysutils/py-google-compute-engine/files/google_network_setup.in
Bumped port revision and committed, thanks! Waiting for MFC approval.
A commit references this bug: Author: ultima Date: Tue Oct 24 17:16:22 UTC 2017 New revision: 452788 URL: https://svnweb.freebsd.org/changeset/ports/452788 Log: MFH: r452169 Fixed ntpd starting too early causing other services to fail at start. Fixed error when stopping services. PR: 222197 Submitted by: Helen Koike (maintainer) Reported by: Vick Khera Approved by: portmgr (swills) Changes: _U branches/2017Q4/ branches/2017Q4/sysutils/py-google-compute-engine/Makefile branches/2017Q4/sysutils/py-google-compute-engine/files/google_clock_skew_daemon.in branches/2017Q4/sysutils/py-google-compute-engine/files/google_instance_setup.in branches/2017Q4/sysutils/py-google-compute-engine/files/google_network_setup.in