Title: WASM: wasm plugin will always create failed if base wasm is failed due to previous threadlocal wasm on_configure failed
Description:
envoyproxy/envoy#43751
If the on_configure method of a thread-local WASM handle fails during a previous configuration push, subsequent push of the WASM plugin configuration will be permanently rejected, because here if on_configure failed in thread-local WASM handle, it will set the state of base wasm handle to failed.
|
base_handle->wasm()->fail(FailState::ConfigureFailed, |
but the base wasm handle has been cached, so if the same wasm plugin push again, it will hit the base wasm handle, and finally result create wasm plugin failed always.
|
auto it = base_wasms->find(vm_key); |
https://github.com/envoyproxy/envoy/blob/4dc08b16cd8027df07e1f18ecc288acf0941076b/source/extensions/common/wasm/wasm.cc#L395
Title: WASM: wasm plugin will always create failed if base wasm is failed due to previous threadlocal wasm on_configure failed
Description:
envoyproxy/envoy#43751
If the
on_configuremethod of a thread-local WASM handle fails during a previous configuration push, subsequent push of the WASM plugin configuration will be permanently rejected, because here ifon_configurefailed in thread-local WASM handle, it will set the state of base wasm handle to failed.proxy-wasm-cpp-host/src/wasm.cc
Line 654 in e55d150
but the base wasm handle has been cached, so if the same wasm plugin push again, it will hit the base wasm handle, and finally result create wasm plugin failed always.
proxy-wasm-cpp-host/src/wasm.cc
Line 545 in e55d150
https://github.com/envoyproxy/envoy/blob/4dc08b16cd8027df07e1f18ecc288acf0941076b/source/extensions/common/wasm/wasm.cc#L395