mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-11-28 08:49:44 +02:00
add some logging to Vault login
This commit is contained in:
parent
7b08d47bcb
commit
d1738c124d
@ -90,9 +90,13 @@ func (c *Client) startTokenLifecycleManager(initialLoginDone chan struct{}) {
|
||||
|
||||
initialLoginSucceed := false
|
||||
for i := 0; i < c.vaultApiClient.MaxRetries(); i++ {
|
||||
if i != 0 {
|
||||
log.Entry().Infof("Retrying Vault login. Attempt %d of %d", i, c.vaultApiClient.MaxRetries())
|
||||
}
|
||||
|
||||
vaultLoginResp, err := c.login()
|
||||
if err != nil {
|
||||
log.Entry().Errorf("unable to authenticate to Vault: %v", err)
|
||||
log.Entry().Warnf("unable to authenticate to Vault: %v", err)
|
||||
continue
|
||||
}
|
||||
if !initialLoginSucceed {
|
||||
@ -103,7 +107,7 @@ func (c *Client) startTokenLifecycleManager(initialLoginDone chan struct{}) {
|
||||
|
||||
tokenErr := c.manageTokenLifecycle(vaultLoginResp)
|
||||
if tokenErr != nil {
|
||||
log.Entry().Errorf("unable to start managing token lifecycle: %v", err)
|
||||
log.Entry().Warnf("unable to start managing token lifecycle: %v", err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user