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

roachprod: Install and configure chrony on GCE clusters #62108

Merged
merged 1 commit into from
Mar 22, 2021

Conversation

rail
Copy link
Member

@rail rail commented Mar 16, 2021

Fixes #62063

In #31577 we switched to chrony for AWS, but not for CGE. By default
they GCE clusters based on Ubuntu 16.04 use ntp.

This patch installs chrony (and automatically removes ntp) on GCE
and configures chrony to use Google's time server.

Release note: None

@rail rail self-assigned this Mar 16, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rail
Copy link
Member Author

rail commented Mar 16, 2021

I created a cluster using this change:

ubuntu@rail-chrony-test-0001:~$ systemctl status chrony
● chrony.service - LSB: Controls chronyd NTP time daemon
   Loaded: loaded (/etc/init.d/chrony; bad; vendor preset: enabled)
   Active: active (running) since Tue 2021-03-16 20:18:23 UTC; 1min 38s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5364 ExecStop=/etc/init.d/chrony stop (code=exited, status=0/SUCCESS)
  Process: 5371 ExecStart=/etc/init.d/chrony start (code=exited, status=0/SUCCESS)
    Tasks: 1
   Memory: 1.4M
      CPU: 21ms
   CGroup: /system.slice/chrony.service
           └─5389 /usr/sbin/chronyd

Mar 16 20:18:21 rail-chrony-test-0001 systemd[1]: Starting LSB: Controls chronyd NTP time daemon...
Mar 16 20:18:21 rail-chrony-test-0001 chronyd[5389]: chronyd version 2.1.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -DEBUG +ASYNCDNS +IPV6 +SECHASH)
Mar 16 20:18:21 rail-chrony-test-0001 chronyd[5389]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/chrony.drift
Mar 16 20:18:23 rail-chrony-test-0001 chronyd[5389]: Source 162.159.200.1 online
Mar 16 20:18:23 rail-chrony-test-0001 chronyd[5389]: Source 107.170.0.6 online
Mar 16 20:18:23 rail-chrony-test-0001 chronyd[5389]: Source 23.131.160.7 online
Mar 16 20:18:23 rail-chrony-test-0001 chronyd[5389]: Source 23.157.160.168 online
Mar 16 20:18:23 rail-chrony-test-0001 chrony[5371]: chronyd is running and online.
Mar 16 20:18:23 rail-chrony-test-0001 systemd[1]: Started LSB: Controls chronyd NTP time daemon.
Mar 16 20:18:27 rail-chrony-test-0001 chronyd[5389]: Selected source 169.254.169.254

Fixes cockroachdb#62063

In cockroachdb#31577 we switched to `chrony` for AWS, but not for CGE. By default
they GCE clusters based on Ubuntu 16.04 use `ntp`.

This patch installs `chrony` (and automatically removes `ntp`) on GCE
and configures `chrony` to use Google's time server.

Release note: None
@rail
Copy link
Member Author

rail commented Mar 17, 2021

The optional CI failures don't look related, but I can rebase again, just in case.

@stevendanna
Copy link
Collaborator

Potentially related: #62060

@rail
Copy link
Member Author

rail commented Mar 17, 2021

Potentially related: #62060

Sounds the same to me. Thank you!

@tbg
Copy link
Member

tbg commented Mar 17, 2021

Interesting. We frequently see clock offset panics in our attempts at long-running roachtests such as #47652. I had poked at that in the past and never got anywhere, but maybe this will help. Either way thank you for looking into this!

Copy link
Collaborator

@petermattis petermattis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

I thought GCE VMs had good time synchronization out of the box that obviated the need for chrony. My knowledge is admittedly a few years out of date. I'm fine to see if this helps.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rail)

@rail
Copy link
Member Author

rail commented Mar 22, 2021

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 22, 2021

Build succeeded:

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.

roachtest: kv/splits/nodes=3/quiesce=true failed
5 participants