Skip to content

Fixes MAISTRA-2550: Port of https://github.com/envoyproxy/envoy/pull/…#102

Merged
maistra-bot merged 1 commit intomaistra:maistra-2.1from
dmitri-d:fix-crash-in-bootstrap-ext
Aug 3, 2021
Merged

Fixes MAISTRA-2550: Port of https://github.com/envoyproxy/envoy/pull/…#102
maistra-bot merged 1 commit intomaistra:maistra-2.1from
dmitri-d:fix-crash-in-bootstrap-ext

Conversation

@dmitri-d
Copy link
Copy Markdown
Contributor

…14478. Currently when the ServerFactoryContext is passed to bootstrap extensions, it is only partially initialized. Specifically, attempting to access the cluster manager will cause a nullptr access (and hence a crash)

This PR splits the creation and initialized to 2 seperate fucntions. Early creation is required to not break the default_socket_interface feature. Once created, the extension will receive the ServerFactoryContext in a different callback (the newly added serverInitialized), once they are fully initialized.

Commit Message:
Fix a crash that happens when bootstrap extensions perform http calls.

Additional Description:
Risk Level: Low (small bug-fix)
Testing: Unit tests updated; tested manually with the changes as well.
Docs Changes: N/A
Release Notes: N/A

Fixes envoyproxy/envoy#14420

Signed-off-by: Yuval Kohavi yuval.kohavi@gmail.com

Signed-off-by: Dmitri Dolguikh ddolguik@redhat.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

…e ServerFactoryContext is passed to bootstrap extensions, it is only partially initialized. Specifically, attempting to access the cluster manager will cause a nullptr access (and hence a crash)

This PR splits the creation and initialized to 2 seperate fucntions. Early creation is required to not break the `default_socket_interface` feature. Once created, the extension will receive the ServerFactoryContext in a different callback (the newly added `serverInitialized`), once they are fully initialized.

Commit Message:
Fix a crash that happens when bootstrap extensions perform http calls.

Additional Description:
Risk Level: Low (small bug-fix)
Testing: Unit tests updated; tested manually with the changes as well.
Docs Changes: N/A
Release Notes: N/A

Fixes envoyproxy/envoy#14420

Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>

Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
@dmitri-d
Copy link
Copy Markdown
Contributor Author

This is an almost cherry-pick -- no changes from the original were required.

Copy link
Copy Markdown
Member

@jwendell jwendell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Only the commit title is weird. Try to keep it short. Details could go after the break line.

Copy link
Copy Markdown
Contributor

@oschaaf oschaaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with John on his remark about the commit title, but other then that LGTM

@jwendell
Copy link
Copy Markdown
Member

jwendell commented Aug 2, 2021

/retest

1 similar comment
@jwendell
Copy link
Copy Markdown
Member

jwendell commented Aug 2, 2021

/retest

@maistra-bot maistra-bot merged commit 8440654 into maistra:maistra-2.1 Aug 3, 2021
@dmitri-d
Copy link
Copy Markdown
Contributor Author

dmitri-d commented Aug 3, 2021

Agree re: commit message; wanted to keep it the same as upstream to minimise any possible confusion. Thanks for reviews!

@dmitri-d dmitri-d deleted the fix-crash-in-bootstrap-ext branch August 3, 2021 16:20
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.

NPE when wasm bootstrap extension makes http calls.

4 participants