agent: set origin during PQ execution

This commit is contained in:
Ryan Uber 2016-06-20 14:07:36 -07:00
parent 3797e6544c
commit 865c264b9c
2 changed files with 2 additions and 0 deletions

View File

@ -592,6 +592,7 @@ RPC:
func (d *DNSServer) preparedQueryLookup(network, datacenter, query string, req, resp *dns.Msg) {
// Execute the prepared query.
args := structs.PreparedQueryExecuteRequest{
Origin: d.agent.config.NodeName,
Datacenter: datacenter,
QueryIDOrName: query,
QueryOptions: structs.QueryOptions{

View File

@ -95,6 +95,7 @@ func parseLimit(req *http.Request, limit *int) error {
// preparedQueryExecute executes a prepared query.
func (s *HTTPServer) preparedQueryExecute(id string, resp http.ResponseWriter, req *http.Request) (interface{}, error) {
args := structs.PreparedQueryExecuteRequest{
Origin: s.agent.config.NodeName,
QueryIDOrName: id,
}
s.parseSource(req, &args.Source)