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): postpone vault reference resolving on init_worker #12554

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

bungle
Copy link
Member

@bungle bungle commented Feb 12, 2024

Summary

It was reported on KAG-2907 that existing LMDB database with secrets can lead to an error when resolving secrets on init worker:

resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'

This fixes the issue by postponing the resolving to a timer.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

https://konghq.atlassian.net/browse/KAG-2907

@bungle bungle changed the title fix(vault): post-pone vault reference resolving on init_worker fix(vault): postpone vault reference resolving on init_worker Feb 12, 2024
@bungle bungle force-pushed the fix/vault-init-worker branch 4 times, most recently from eae2925 to 8f36975 Compare February 13, 2024 08:58
@bungle bungle force-pushed the fix/vault-init-worker branch from 8f36975 to ab1f7f1 Compare February 13, 2024 15:50
@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 13, 2024
@bungle bungle force-pushed the fix/vault-init-worker branch 2 times, most recently from f25f212 to dcea9f5 Compare February 13, 2024 15:54
@bungle bungle marked this pull request as ready for review February 13, 2024 15:54
@bungle bungle force-pushed the fix/vault-init-worker branch 2 times, most recently from 80d802d to 020818d Compare February 13, 2024 20:09
@bungle bungle added backport release/3.5.x cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Feb 13, 2024
@bungle bungle force-pushed the fix/vault-init-worker branch from 020818d to 62c6eb3 Compare February 14, 2024 08:27
@samugi samugi force-pushed the fix/vault-init-worker branch from 62c6eb3 to 80d059e Compare February 14, 2024 16:10
@bungle bungle force-pushed the fix/vault-init-worker branch 2 times, most recently from 5dd048a to e8a4df4 Compare February 14, 2024 21:05
@bungle bungle force-pushed the fix/vault-init-worker branch 2 times, most recently from f4f02d2 to fe44553 Compare February 15, 2024 09:04
@bungle bungle requested a review from jschmid1 February 16, 2024 09:41
### Summary

It was reported on KAG-2907 that existing LMDB database with secrets
can lead to an error when resolving secrets on init worker:

```
resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'
```

This fixes the issue.

Signed-off-by: Aapo Talvensaari <[email protected]>
@bungle bungle force-pushed the fix/vault-init-worker branch from fe44553 to 83232f5 Compare February 16, 2024 12:07
@team-eng-enablement team-eng-enablement added author/community PRs from the open-source community (not Kong Inc) and removed author/community PRs from the open-source community (not Kong Inc) labels Feb 19, 2024
@bungle bungle merged commit 9a7498c into master Feb 20, 2024
34 checks passed
@bungle bungle deleted the fix/vault-init-worker branch February 20, 2024 09:31
github-actions bot pushed a commit that referenced this pull request Feb 20, 2024
### Summary

It was reported on KAG-2907 that existing LMDB database with secrets
can lead to an error when resolving secrets on init worker:

```
resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'
```

This fixes the issue.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit 9a7498c)
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12554-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12554-to-master-to-upstream
git checkout -b cherry-pick-12554-to-master-to-upstream
ancref=$(git merge-base 84cb1be01d8e9a241e8a2b3afd6d55bb184e605b 83232f50cb65a687f139c7767ef387c3ce10e853)
git cherry-pick -x $ancref..83232f50cb65a687f139c7767ef387c3ce10e853

@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.5.x:

github-actions bot pushed a commit that referenced this pull request Feb 20, 2024
### Summary

It was reported on KAG-2907 that existing LMDB database with secrets
can lead to an error when resolving secrets on init worker:

```
resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'
```

This fixes the issue.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit 9a7498c)
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.6.x:

windmgc pushed a commit that referenced this pull request Mar 5, 2024
### Summary

It was reported on KAG-2907 that existing LMDB database with secrets
can lead to an error when resolving secrets on init worker:

```
resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'
```

This fixes the issue.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit 9a7498c)
windmgc pushed a commit that referenced this pull request Mar 5, 2024
### Summary

It was reported on KAG-2907 that existing LMDB database with secrets
can lead to an error when resolving secrets on init worker:

```
resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'
```

This fixes the issue.

Signed-off-by: Aapo Talvensaari <[email protected]>
(cherry picked from commit 9a7498c)
tysoekong pushed a commit that referenced this pull request Apr 26, 2024
It was reported on KAG-2907 that existing LMDB database with secrets
can lead to an error when resolving secrets on init worker:

```
resty/http.lua:74: API disabled in the context of init_worker_by_lua*
stack traceback:
	[C]: in function 'co_create'
```

This fixes the issue.

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

Successfully merging this pull request may close these issues.

6 participants