mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Better derive token logging
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user