mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
04cf68b45e
make nginx responsible for downloading (and caching) files from S3. As noted in that commit, nginx implements its own non-blocking DNS resolver, since the base syscall is blocking, so requires an explicit nameserver configuration. That commit used 127.0.0.53, which is provided by systemd-resolved, as the resolver. However, that service may not always be enabled and running, and may in fact not even be installed (e.g. on Docker). Switch to parsing `/etc/resolv.conf` and using the first-provided nameserver. In many deployments, this will still be `127.0.0.53`, but for others it will provide a working DNS server which is external to the host. In the event that a server is misconfigured and has no resolvers in `/etc/resolv.conf`, it will error out: ```console Error: Evaluation Error: Error while evaluating a Function Call, No nameservers found in /etc/resolv.conf! Configure one by setting application_server.nameserver in /etc/zulip/zulip.conf (file: /home/zulip/deployments/current/puppet/zulip/manifests/app_frontend_base.pp, line: 76, column: 70) on node example.zulipdev.org ``` (cherry picked from commitbd217ad31b
)