From 8b7b57f3ec38c9b5049775de42a8e65f0e41c619 Mon Sep 17 00:00:00 2001 From: Viljo Viitanen Date: Tue, 15 Feb 2022 17:35:44 +0200 Subject: [PATCH] change cassandra db plugin timeout to 5s as in docs (#12443) * fix cassandra db plugin timeout to 5s as in docs Documentation says timeout is 5s, but code uses 0s, which is too short any any real world usage, causing issues. https://www.vaultproject.io/api/secret/databases/cassandra#connect_timeout issues: https://github.com/hashicorp/vault/issues/8527 https://github.com/hashicorp/vault/issues/9400 * Create 12443.txt changelog entry --- changelog/12443.txt | 3 +++ plugins/database/cassandra/connection_producer.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog/12443.txt diff --git a/changelog/12443.txt b/changelog/12443.txt new file mode 100644 index 000000000..601414053 --- /dev/null +++ b/changelog/12443.txt @@ -0,0 +1,3 @@ +```release-note:bug +secrets/database/cassandra: change connect_timeout to 5s as documentation says +``` diff --git a/plugins/database/cassandra/connection_producer.go b/plugins/database/cassandra/connection_producer.go index db8ea4f64..72f7bb878 100644 --- a/plugins/database/cassandra/connection_producer.go +++ b/plugins/database/cassandra/connection_producer.go @@ -60,7 +60,7 @@ func (c *cassandraConnectionProducer) Initialize(ctx context.Context, req dbplug } if c.ConnectTimeoutRaw == nil { - c.ConnectTimeoutRaw = "0s" + c.ConnectTimeoutRaw = "5s" } c.connectTimeout, err = parseutil.ParseDurationSecond(c.ConnectTimeoutRaw) if err != nil {