From 865c264b9c3b2b8f0693c12aded2b03a7e5f1b3f Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Mon, 20 Jun 2016 14:07:36 -0700 Subject: [PATCH] agent: set origin during PQ execution --- command/agent/dns.go | 1 + command/agent/prepared_query_endpoint.go | 1 + 2 files changed, 2 insertions(+) diff --git a/command/agent/dns.go b/command/agent/dns.go index 2a8d8dd5c3..ea23d088d8 100644 --- a/command/agent/dns.go +++ b/command/agent/dns.go @@ -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{ diff --git a/command/agent/prepared_query_endpoint.go b/command/agent/prepared_query_endpoint.go index bf643f7c26..ad27933957 100644 --- a/command/agent/prepared_query_endpoint.go +++ b/command/agent/prepared_query_endpoint.go @@ -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)