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) { func (d *DNSServer) preparedQueryLookup(network, datacenter, query string, req, resp *dns.Msg) {
// Execute the prepared query. // Execute the prepared query.
args := structs.PreparedQueryExecuteRequest{ args := structs.PreparedQueryExecuteRequest{
Origin: d.agent.config.NodeName,
Datacenter: datacenter, Datacenter: datacenter,
QueryIDOrName: query, QueryIDOrName: query,
QueryOptions: structs.QueryOptions{ QueryOptions: structs.QueryOptions{

View File

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