If defined, the local consul agent is used to read list of services.
Otherwise, a random agent is picked, but only from the cache of agents
already syncing registrations.
This change prevents situations, where contacting a random agent in the
cluster fails, because it has no ACL-DC configured.
Coverage increased (+0.2%) to 90.575% when pulling 004fd465ebc0be568c4387c7f78fe73d2f2b564b on 276-local-agent-reads into 3fb8781714a0c60cde389ebe7da998a76de56ab1 on master.
If defined, the local consul agent is used to read list of services. Otherwise, a random agent is picked, but only from the cache of agents already syncing registrations. This change prevents situations, where contacting a random agent in the cluster fails, because it has no ACL-DC configured.