Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vault): properly warmups the cache on init #11793

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

bungle
Copy link
Member

@bungle bungle commented Oct 19, 2023

Summary

Fixes issue where this was logged to logs:

2023/10/18 13:53:33 [warn] 8714#0: [kong] vault.lua:861 error updating secret reference {vault://env/PG_USER}: could not find cached value

That happened for example when starting Kong with this command:

KONG_LOG_LEVEL=warn PG_USER=kong KONG_PG_USER={vault://env/PG_USER} ./bin/kong start

It auto-corrected itself, which was good in this case. This commit makes it more robust, and does not warn anymore as caches are properly warmed.

@bungle bungle force-pushed the fix/vault-init-cache branch from e20432c to e3b2506 Compare October 19, 2023 13:17
@bungle bungle marked this pull request as ready for review October 19, 2023 13:18
@bungle bungle added this to the 3.5.0 milestone Oct 19, 2023
@flrgh flrgh force-pushed the fix/vault-init-cache branch from e3b2506 to ae27f5b Compare October 19, 2023 18:02
kong/pdk/vault.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the fix/vault-init-cache branch 4 times, most recently from 5a3adf6 to 677a64c Compare October 24, 2023 10:26
### Summary

Fixes issue where this was logged to logs:
```
2023/10/18 13:53:33 [warn] 8714#0: [kong] vault.lua:861 error updating secret reference {vault://env/PG_USER}: could not find cached value
```

That happened for example when starting Kong with this command:
```
KONG_LOG_LEVEL=warn PG_USER=kong KONG_PG_USER={vault://env/PG_USER} ./bin/kong start
```

It auto-corrected itself, which was good in this case.
This commit makes it more robust, and does not warn anymore
as caches are properly warmed.

Signed-off-by: Aapo Talvensaari <[email protected]>
@bungle bungle force-pushed the fix/vault-init-cache branch from 677a64c to 762316b Compare October 24, 2023 10:28
@bungle bungle merged commit d8bd50d into master Oct 24, 2023
23 checks passed
@bungle bungle deleted the fix/vault-init-cache branch October 24, 2023 11:29
team-gateway-bot pushed a commit that referenced this pull request Oct 24, 2023
### Summary

Fixes issue where this was logged to logs:
```
2023/10/18 13:53:33 [warn] 8714#0: [kong] vault.lua:861 error updating secret reference {vault://env/PG_USER}: could not find cached value
```

That happened for example when starting Kong with this command:
```
KONG_LOG_LEVEL=warn PG_USER=kong KONG_PG_USER={vault://env/PG_USER} ./bin/kong start
```

It auto-corrected itself, which was good in this case.
This commit makes it more robust, and does not warn anymore
as caches are properly warmed.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit d8bd50d)
bungle added a commit that referenced this pull request Oct 24, 2023
### Summary

Fixes issue where this was logged to logs:
```
2023/10/18 13:53:33 [warn] 8714#0: [kong] vault.lua:861 error updating secret reference {vault://env/PG_USER}: could not find cached value
```

That happened for example when starting Kong with this command:
```
KONG_LOG_LEVEL=warn PG_USER=kong KONG_PG_USER={vault://env/PG_USER} ./bin/kong start
```

It auto-corrected itself, which was good in this case.
This commit makes it more robust, and does not warn anymore
as caches are properly warmed.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit d8bd50d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants