From 153824a21c2f9cc2f9d16d86af5e539cc49fae84 Mon Sep 17 00:00:00 2001 From: Yousuk Seung Date: Wed, 27 Sep 2023 10:22:28 -0700 Subject: [PATCH] [grpclb] set resolution note for empty list from balancer (#34487) --- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index c256d2c87f6..22352903b6e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -1767,6 +1767,9 @@ void GrpcLb::CreateOrUpdateChildPolicyLocked() { update_args.addresses = serverlist_->GetServerAddressList( lb_calld_ == nullptr ? nullptr : lb_calld_->client_stats()); is_backend_from_grpclb_load_balancer = true; + if (update_args.addresses.ok() && update_args.addresses->empty()) { + update_args.resolution_note = "empty serverlist from grpclb balancer"; + } } update_args.args = CreateChildPolicyArgsLocked(is_backend_from_grpclb_load_balancer);