Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/root/version_history/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Bug Fixes
* config: validate that upgrade configs have a non-empty :ref:`upgrade_type <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.upgrade_type>`, fixing a bug where an errant "-" could result in unexpected behavior.
* dns: fix a bug where custom resolvers provided in configuration were not preserved after network issues.
* dns_filter: correctly associate DNS response IDs when multiple queries are received.
* grpc mux: fix sending node again after stream is reset when ::ref:`set_node_on_first_message_only <envoy_api_field_core.ApiConfigSource.set_node_on_first_message_only>` is set.
* http: fixed URL parsing for HTTP/1.1 fully qualified URLs and connect requests containing IPv6 addresses.
* http: reject requests with missing required headers after filter chain processing.
* http: sending CONNECT_ERROR for HTTP/2 where appropriate during CONNECT requests.
Expand Down
9 changes: 7 additions & 2 deletions source/common/config/grpc_mux_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ void GrpcMuxImpl::sendDiscoveryRequest(const std::string& type_url) {
}
}

if (skip_subsequent_node_ && !first_stream_request_) {
request.clear_node();
if (skip_subsequent_node_) {
if (first_stream_request_) {
// Node may have been cleared during a previous request.
request.mutable_node()->MergeFrom(local_info_.node());
} else {
request.clear_node();
}
}
VersionConverter::prepareMessageForGrpcWire(request, transport_api_version_);
ENVOY_LOG(trace, "Sending DiscoveryRequest for {}: {}", type_url, request.DebugString());
Expand Down
9 changes: 7 additions & 2 deletions test/common/config/grpc_mux_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,23 @@ TEST_F(GrpcMuxImplTest, ResetStream) {
expectSendMessage("baz", {"z"}, "");
grpc_mux_->start();

// Send another message for foo so that the node is cleared in the cached request.
expectSendMessage("foo", {"z", "x", "y"}, "");
Comment thread
tbarrella marked this conversation as resolved.
auto foo_z_sub = grpc_mux_->addWatch("foo", {"z"}, callbacks_, resource_decoder_);

EXPECT_CALL(callbacks_,
onConfigUpdateFailed(Envoy::Config::ConfigUpdateFailureReason::ConnectionFailure, _))
.Times(3);
.Times(4);
EXPECT_CALL(random_, random());
EXPECT_CALL(*timer, enableTimer(_, _));
grpc_mux_->grpcStreamForTest().onRemoteClose(Grpc::Status::WellKnownGrpcStatus::Canceled, "");
EXPECT_EQ(0, control_plane_connected_state_.value());
EXPECT_EQ(0, control_plane_pending_requests_.value());
EXPECT_CALL(*async_client_, startRaw(_, _, _, _)).WillOnce(Return(&async_stream_));
expectSendMessage("foo", {"x", "y"}, "", true);
expectSendMessage("foo", {"z", "x", "y"}, "", true);
Comment thread
lambdai marked this conversation as resolved.
expectSendMessage("bar", {}, "");
expectSendMessage("baz", {"z"}, "");
expectSendMessage("foo", {"x", "y"}, "");
timer->invokeCallback();

expectSendMessage("baz", {}, "");
Expand Down