JetBrains / teamcity-hashicorp-vault-plugin

TeamCity plugin to support HashiCorp Vault
Apache License 2.0
28 stars 18 forks source link

Retry revoking token in case of network problems #23

Closed VladRassokhin closed 4 years ago

VladRassokhin commented 5 years ago

Observed next line in build log:

Cannot revoke HashiCorp Vault token: I/O error on POST request for "https://vault.consul:8200/v1/auth/token/revoke-self": Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out

org.jetbrains.teamcity.vault.support.LifecycleAwareSessionManager#revoke should retry several times

VladRassokhin commented 5 years ago

Meanwhile TC server will also try to revoke token once build finishes

VladRassokhin commented 4 years ago

Added retry with backoff