mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Small fixes
This commit is contained in:
@@ -1711,8 +1711,8 @@ func (c *Client) deriveToken(alloc *structs.Allocation, taskNames []string, vcli
|
||||
// Derive the tokens
|
||||
var resp structs.DeriveVaultTokenResponse
|
||||
if err := c.RPC("Node.DeriveVaultToken", &req, &resp); err != nil {
|
||||
c.logger.Printf("[ERR] client.vault: failed to derive vault tokens: %v", err)
|
||||
return nil, fmt.Errorf("failed to derive vault tokens: %v", err)
|
||||
c.logger.Printf("[ERR] client.vault: DeriveVaultToken RPC failed: %v", err)
|
||||
return nil, fmt.Errorf("DeriveVaultToken RPC failed: %v", err)
|
||||
}
|
||||
if resp.Error != nil {
|
||||
c.logger.Printf("[ERR] client.vault: failed to derive vault tokens: %v", resp.Error)
|
||||
|
||||
@@ -587,8 +587,7 @@ OUTER:
|
||||
}
|
||||
|
||||
// deriveVaultToken derives the Vault token using exponential backoffs. It
|
||||
// returns the Vault token and whether the token is valid. If it is not valid we
|
||||
// are shutting down
|
||||
// returns the Vault token and whether the manager should exit.
|
||||
func (r *TaskRunner) deriveVaultToken() (token string, exit bool) {
|
||||
attempts := 0
|
||||
for {
|
||||
|
||||
@@ -215,6 +215,7 @@ func (v *vaultClient) flush() {
|
||||
v.client = nil
|
||||
v.auth = nil
|
||||
v.connEstablished = false
|
||||
v.connEstablishedErr = nil
|
||||
v.token = ""
|
||||
v.tokenData = nil
|
||||
v.revoking = make(map[*structs.VaultAccessor]time.Time)
|
||||
@@ -357,6 +358,7 @@ OUTER:
|
||||
|
||||
v.l.Lock()
|
||||
v.connEstablished = true
|
||||
v.connEstablishedErr = nil
|
||||
v.l.Unlock()
|
||||
}
|
||||
|
||||
|
||||
8
vendor/vendor.json
vendored
8
vendor/vendor.json
vendored
@@ -270,14 +270,14 @@
|
||||
{
|
||||
"checksumSHA1": "tdhmIGUaoOMEDymMC23qTS7bt0g=",
|
||||
"path": "github.com/docker/docker/pkg/ioutils",
|
||||
"revision": "da39e9a4f920a15683dd0f23923c302d4db6eed5",
|
||||
"revisionTime": "2016-05-28T08:11:04Z"
|
||||
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||
"revisionTime": "2016-05-20T15:17:10Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "tdhmIGUaoOMEDymMC23qTS7bt0g=",
|
||||
"path": "github.com/docker/docker/pkg/ioutils",
|
||||
"revision": "52debcd58ac91bf68503ce60561536911b74ff05",
|
||||
"revisionTime": "2016-05-20T15:17:10Z"
|
||||
"revision": "da39e9a4f920a15683dd0f23923c302d4db6eed5",
|
||||
"revisionTime": "2016-05-28T08:11:04Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "ndnAFCfsGC3upNQ6jAEwzxcurww=",
|
||||
|
||||
Reference in New Issue
Block a user