Created attachment 198376 [details] Patch release/tools/gce.conf to allow NTP queries After create a VM on GCE using a FreeBSD 12 image (projects/freebsd-org-cloud-dev/global/images/family/freebsd-12-0) for some reason I cannot query NTP because of non resolved hostname. # ntpq -p hostname nor servname provided, or not known After adding '127.0.0.1 localhost' to /etc/hosts I am able to do the query. # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *metadata.google 71.79.79.71 2 u 42 64 377 0.530 65.006 121.795 I attached a patch that instead of overwrite the /etc/hosts with this content: echo '169.254.169.254 metadata.google.internal metadata' > \ ${DESTDIR}/etc/hosts We simply append this line to the base /etc/hosts file. One of the tests that the Google Cloud team runs against images is to query NTP this way that I described, so this is making some tests failures.
I can also reproduce this issue using FreeBSD 11 image available in GCE.
A commit references this bug: Author: gjb Date: Mon Nov 26 17:00:40 UTC 2018 New revision: 340983 URL: https://svnweb.freebsd.org/changeset/base/340983 Log: Fix NTP query on GCE due to unresolved hostname. PR: 232456 Submitted by: Lucas Kanashiro MFC after: 3 days Sponsored by: The FreeBSD Foundation Changes: head/release/tools/gce.conf
A commit references this bug: Author: gjb Date: Thu Nov 29 00:28:09 UTC 2018 New revision: 341167 URL: https://svnweb.freebsd.org/changeset/base/341167 Log: MFC r340983: Fix NTP query on GCE due to unresolved hostname. PR: 232456 Submitted by: Lucas Kanashiro Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/release/tools/gce.conf _U stable/12/ stable/12/release/tools/gce.conf
Fixed, thank you!
A commit references this bug: Author: gjb Date: Thu Nov 29 01:02:52 UTC 2018 New revision: 341169 URL: https://svnweb.freebsd.org/changeset/base/341169 Log: MFS12 r341167: MFC r340983: Fix NTP query on GCE due to unresolved hostname. PR: 232456 Submitted by: Lucas Kanashiro Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Changes: _U releng/12.0/ releng/12.0/release/tools/gce.conf