Skip to content

Commit

Permalink
Better derive token logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Feb 15, 2017
1 parent 639afa9 commit 22b64a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/vaultclient/vaultclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,13 @@ func (c *vaultClient) DeriveToken(alloc *structs.Allocation, taskNames []string)
// Use the token supplied to interact with vault
c.client.SetToken("")

return c.tokenDeriver(alloc, taskNames, c.client)
tokens, err := c.tokenDeriver(alloc, taskNames, c.client)
if err != nil {
c.logger.Printf("[ERR] client.vault: failed to derive token for allocation %q and tasks %v: %v", alloc.ID, taskNames, err)
return nil, err
}

return tokens, nil
}

// GetConsulACL creates a vault API client and reads from vault a consul ACL
Expand Down

0 comments on commit 22b64a5

Please sign in to comment.