diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc index ff936b9100f..cfd1aef0775 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc @@ -572,13 +572,6 @@ XdsClusterResolverLb::XdsClusterResolverLb(RefCountedPtr xds_client, } // EDS-only flow. if (!is_xds_uri_) { - // Setup channelz linkage. - channelz::ChannelNode* parent_channelz_node = - grpc_channel_args_find_pointer( - args.args, GRPC_ARG_CHANNELZ_CHANNEL_NODE); - if (parent_channelz_node != nullptr) { - xds_client_->AddChannelzLinkage(parent_channelz_node); - } // Couple polling. grpc_pollset_set_add_pollset_set(xds_client_->interested_parties(), interested_parties()); @@ -602,13 +595,6 @@ void XdsClusterResolverLb::ShutdownLocked() { MaybeDestroyChildPolicyLocked(); discovery_mechanisms_.clear(); if (!is_xds_uri_) { - // Remove channelz linkage. - channelz::ChannelNode* parent_channelz_node = - grpc_channel_args_find_pointer( - args_, GRPC_ARG_CHANNELZ_CHANNEL_NODE); - if (parent_channelz_node != nullptr) { - xds_client_->RemoveChannelzLinkage(parent_channelz_node); - } // Decouple polling. grpc_pollset_set_del_pollset_set(xds_client_->interested_parties(), interested_parties()); diff --git a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc index 0ffc02cf446..ce56a144112 100644 --- a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc @@ -766,12 +766,6 @@ void XdsResolver::StartLocked() { } grpc_pollset_set_add_pollset_set(xds_client_->interested_parties(), interested_parties_); - channelz::ChannelNode* parent_channelz_node = - grpc_channel_args_find_pointer( - args_, GRPC_ARG_CHANNELZ_CHANNEL_NODE); - if (parent_channelz_node != nullptr) { - xds_client_->AddChannelzLinkage(parent_channelz_node); - } auto watcher = absl::make_unique(Ref()); listener_watcher_ = watcher.get(); xds_client_->WatchListenerData(server_name_, std::move(watcher)); @@ -790,12 +784,6 @@ void XdsResolver::ShutdownLocked() { xds_client_->CancelRouteConfigDataWatch( server_name_, route_config_watcher_, /*delay_unsubscription=*/false); } - channelz::ChannelNode* parent_channelz_node = - grpc_channel_args_find_pointer( - args_, GRPC_ARG_CHANNELZ_CHANNEL_NODE); - if (parent_channelz_node != nullptr) { - xds_client_->RemoveChannelzLinkage(parent_channelz_node); - } grpc_pollset_set_del_pollset_set(xds_client_->interested_parties(), interested_parties_); xds_client_.reset(); diff --git a/src/core/ext/xds/xds_client.cc b/src/core/ext/xds/xds_client.cc index cee80c62aee..4c360bf1418 100644 --- a/src/core/ext/xds/xds_client.cc +++ b/src/core/ext/xds/xds_client.cc @@ -1878,12 +1878,10 @@ grpc_millis GetRequestTimeout(const grpc_channel_args* args) { } grpc_channel_args* ModifyChannelArgs(const grpc_channel_args* args) { - absl::InlinedVector args_to_add = { + absl::InlinedVector args_to_add = { grpc_channel_arg_integer_create( const_cast(GRPC_ARG_KEEPALIVE_TIME_MS), 5 * 60 * GPR_MS_PER_SEC), - grpc_channel_arg_integer_create( - const_cast(GRPC_ARG_CHANNELZ_IS_INTERNAL_CHANNEL), 1), }; return grpc_channel_args_copy_and_add(args, args_to_add.data(), args_to_add.size()); @@ -1920,26 +1918,6 @@ XdsClient::~XdsClient() { grpc_pollset_set_destroy(interested_parties_); } -void XdsClient::AddChannelzLinkage( - channelz::ChannelNode* parent_channelz_node) { - MutexLock lock(&mu_); - channelz::ChannelNode* xds_channelz_node = - grpc_channel_get_channelz_node(chand_->channel()); - if (xds_channelz_node != nullptr) { - parent_channelz_node->AddChildChannel(xds_channelz_node->uuid()); - } -} - -void XdsClient::RemoveChannelzLinkage( - channelz::ChannelNode* parent_channelz_node) { - MutexLock lock(&mu_); - channelz::ChannelNode* xds_channelz_node = - grpc_channel_get_channelz_node(chand_->channel()); - if (xds_channelz_node != nullptr) { - parent_channelz_node->RemoveChildChannel(xds_channelz_node->uuid()); - } -} - void XdsClient::Orphan() { if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { gpr_log(GPR_INFO, "[xds_client %p] shutting down xds client", this); diff --git a/src/core/ext/xds/xds_client.h b/src/core/ext/xds/xds_client.h index 27796f412aa..160034f720e 100644 --- a/src/core/ext/xds/xds_client.h +++ b/src/core/ext/xds/xds_client.h @@ -102,18 +102,6 @@ class XdsClient : public DualRefCounted { grpc_pollset_set* interested_parties() const { return interested_parties_; } - // TODO(roth): When we add federation, there will be multiple channels - // inside the XdsClient, and the set of channels may change over time, - // but not every channel may use every one of the child channels, so - // this API will need to change. At minumum, we will need to hold a - // ref to the parent channelz node so that we can update its list of - // children as the set of xDS channels changes. However, we may also - // want to make this a bit more selective such that only those - // channels on which a given parent channel is actually requesting - // resources will actually be marked as its children. - void AddChannelzLinkage(channelz::ChannelNode* parent_channelz_node); - void RemoveChannelzLinkage(channelz::ChannelNode* parent_channelz_node); - void Orphan() override; // Start and cancel listener data watch for a listener.