Skip to content

Commit

Permalink
add missing node secrets to client-sent RPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Aug 19, 2022
1 parent ef353eb commit 08c51d0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1812,8 +1812,11 @@ func (c *Client) submitNodeEvents(events []*structs.NodeEvent) error {
nodeID: events,
}
req := structs.EmitNodeEventsRequest{
NodeEvents: nodeEvents,
WriteRequest: structs.WriteRequest{Region: c.Region()},
NodeEvents: nodeEvents,
WriteRequest: structs.WriteRequest{
Region: c.Region(),
AuthToken: c.secretNodeID(),
},
}
var resp structs.EmitNodeEventsResponse
if err := c.RPC("Node.EmitEvents", &req, &resp); err != nil {
Expand Down Expand Up @@ -1927,7 +1930,7 @@ func (c *Client) updateNodeStatus() error {
req := structs.NodeUpdateStatusRequest{
NodeID: c.NodeID(),
Status: structs.NodeStatusReady,
WriteRequest: structs.WriteRequest{Region: c.Region()},
WriteRequest: structs.WriteRequest{Region: c.Region(), AuthToken: c.secretNodeID()},
}
var resp structs.NodeUpdateResponse
if err := c.RPC("Node.UpdateStatus", &req, &resp); err != nil {
Expand Down Expand Up @@ -2061,7 +2064,7 @@ func (c *Client) allocSync() {
// Send to server.
args := structs.AllocUpdateRequest{
Alloc: sync,
WriteRequest: structs.WriteRequest{Region: c.Region()},
WriteRequest: structs.WriteRequest{Region: c.Region(), AuthToken: c.secretNodeID()},
}

var resp structs.GenericResponse
Expand Down

0 comments on commit 08c51d0

Please sign in to comment.