Prepared query is a great mechanism.
It will be very likely that the DC list will follow the precedence of which DC to query.
Right now the local DC you execute the query from has an higher priority than the DC list inside the prepared query.
The suggestion is to add "skip the local datacenter" attribute with a true/false value to prepared query (json format).
https://www.consul.io/api/query.html#sample-payload
This request discussed also in consul google group, @slackpad suggested to create a feature request.
https://groups.google.com/forum/#!topic/consul-tool/O-JWve5uN0E
+1
I'd rather have a global query that I can execute everywhere, but which defines the best datacenter order in itself, not based on the local dc used.
Hello @hagay3, is this still something you are interested in adding? Just stumbled over your PR.
Still can be helpful @i0rek
I got confused for a second and also answered on the PR. Would you or @blop be willing to provide a PR (or rebase the exsting one)?
I am still thinking about @pierresouchay's https://github.com/hashicorp/consul/pull/4092#issuecomment-414933273. Right now I am leaning towards 2 states: true and false just because it is the simpler feature. The 3rd state fallback could be added later if it turns out to be needed.
Lets continue the discussion here.
Thanks!
Hey there,
This issue has been automatically closed because there hasn't been any activity for at least _20_ days.
If you are still experiencing problems, or still have questions, feel free to open a new one :+1:.
Most helpful comment
+1
I'd rather have a global query that I can execute everywhere, but which defines the best datacenter order in itself, not based on the local dc used.