diff --git a/docs/root/version_history/current.rst b/docs/root/version_history/current.rst index 5a2ca3d70877..3f38173481c4 100644 --- a/docs/root/version_history/current.rst +++ b/docs/root/version_history/current.rst @@ -25,6 +25,7 @@ Removed Config or Runtime ------------------------- *Normally occurs at the end of the* :ref:`deprecation period ` +* http: removed `envoy.reloadable_features.overload_manager_disable_keepalive_drain_http2`; Envoy will now always send GOAWAY to HTTP2 downstreams when the :ref:`disable_keepalive ` overload action is active. * tls: removed `envoy.reloadable_features.tls_use_io_handle_bio` runtime guard and legacy code path. New Features diff --git a/source/common/http/conn_manager_impl.cc b/source/common/http/conn_manager_impl.cc index 62dc98ffa864..7a13c37bfa25 100644 --- a/source/common/http/conn_manager_impl.cc +++ b/source/common/http/conn_manager_impl.cc @@ -1362,11 +1362,7 @@ void ConnectionManagerImpl::ActiveStream::encodeHeaders(ResponseHeaderMap& heade connection_manager_.random_generator_.bernoulli( connection_manager_.overload_disable_keepalive_ref_.value())) { ENVOY_STREAM_LOG(debug, "disabling keepalive due to envoy overload", *this); - if (connection_manager_.codec_->protocol() < Protocol::Http2 || - Runtime::runtimeFeatureEnabled( - "envoy.reloadable_features.overload_manager_disable_keepalive_drain_http2")) { - drain_connection_due_to_overload = true; - } + drain_connection_due_to_overload = true; connection_manager_.stats_.named_.downstream_cx_overload_disable_keepalive_.inc(); } diff --git a/source/common/runtime/runtime_features.cc b/source/common/runtime/runtime_features.cc index 220c36aab04c..2f444057c2b3 100644 --- a/source/common/runtime/runtime_features.cc +++ b/source/common/runtime/runtime_features.cc @@ -80,7 +80,6 @@ constexpr const char* runtime_features[] = { "envoy.reloadable_features.http2_skip_encoding_empty_trailers", "envoy.reloadable_features.improved_stream_limit_handling", "envoy.reloadable_features.internal_redirects_with_body", - "envoy.reloadable_features.overload_manager_disable_keepalive_drain_http2", "envoy.reloadable_features.prefer_quic_kernel_bpf_packet_routing", "envoy.reloadable_features.preserve_downstream_scheme", "envoy.reloadable_features.remove_forked_chromium_url", diff --git a/test/common/http/conn_manager_impl_test_2.cc b/test/common/http/conn_manager_impl_test_2.cc index fea68bdfc9c5..83bda9907062 100644 --- a/test/common/http/conn_manager_impl_test_2.cc +++ b/test/common/http/conn_manager_impl_test_2.cc @@ -2187,21 +2187,9 @@ TEST_F(HttpConnectionManagerImplTest, DisableHttp1KeepAliveWhenOverloaded) { EXPECT_EQ(1U, stats_.named_.downstream_cx_overload_disable_keepalive_.value()); } -class DrainH2HttpConnectionManagerImplTest : public HttpConnectionManagerImplTest, - public testing::WithParamInterface { -public: - DrainH2HttpConnectionManagerImplTest() { - Runtime::LoaderSingleton::getExisting()->mergeValues( - {{"envoy.reloadable_features.overload_manager_disable_keepalive_drain_http2", "true"}}); - } - -private: - TestScopedRuntime runtime_; -}; - -// Verify that, if the runtime option is enabled, HTTP2 connections will receive -// a GOAWAY message when the overload action is triggered. -TEST_P(DrainH2HttpConnectionManagerImplTest, DisableHttp2KeepAliveWhenOverloaded) { +// Verify that HTTP2 connections will receive a GOAWAY message when the overload action is +// triggered. +TEST_F(HttpConnectionManagerImplTest, DisableHttp2KeepAliveWhenOverloaded) { Server::OverloadActionState disable_http_keep_alive = Server::OverloadActionState::saturated(); ON_CALL(overload_manager_.overload_state_, getState(Server::OverloadActionNames::get().DisableHttpKeepAlive)) @@ -2209,9 +2197,7 @@ TEST_P(DrainH2HttpConnectionManagerImplTest, DisableHttp2KeepAliveWhenOverloaded codec_->protocol_ = Protocol::Http2; setup(false, ""); - if (GetParam()) { - EXPECT_CALL(*codec_, shutdownNotice); - } + EXPECT_CALL(*codec_, shutdownNotice); std::shared_ptr filter(new NiceMock()); EXPECT_CALL(filter_factory_, createFilterChain(_)) @@ -2244,9 +2230,6 @@ TEST_P(DrainH2HttpConnectionManagerImplTest, DisableHttp2KeepAliveWhenOverloaded EXPECT_EQ(1, stats_.named_.downstream_cx_overload_disable_keepalive_.value()); } -INSTANTIATE_TEST_SUITE_P(WithRuntimeOverride, DrainH2HttpConnectionManagerImplTest, - testing::Bool()); - TEST_F(HttpConnectionManagerImplTest, TestStopAllIterationAndBufferOnDecodingPathFirstFilter) { setup(false, "envoy-custom-server", false); setUpEncoderAndDecoder(true, true);