Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdsclient: use dataplane authority for virtualhost lookup #6997

Merged
merged 14 commits into from
Feb 28, 2024

Conversation

arvindbr8
Copy link
Member

@arvindbr8 arvindbr8 commented Feb 22, 2024

Fixes #6996

A new field Authority is added to resolver.BuildOptions to pass the effective authority of clientconn for which the resolver was built.

Testing:

I have verified that this diff works with the bootstrap generator @ GoogleCloudPlatform/traffic-director-grpc-bootstrap#57.

Test logs
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel created
2024/02/22 00:39:20 INFO: [core] [Channel #1] original dial target is: "xds:///helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [core] [Channel #1] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"xds", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/helloworld-gke:8000", RawPath:"", OmitHost:false, ForceQuery:false, RawQuery:"", Fragment:"", RawFragment:""}}
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel authority set to "helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] Creating resolver for target: xds:///helloworld-gke:8000
2024/02/22 00:39:20 INFO: [xds] [xds-bootstrap] Using bootstrap file with name "/tmp/grpc-xds/td-grpc-bootstrap.json"
2024/02/22 00:39:20 INFO: [xds] [xds-bootstrap] Bootstrap config for creating xds-client: {
  "XDSServer": {
    "server_uri": "trafficdirector.googleapis.com:443",
    "channel_creds": [
      {
        "type": "google_default"
      }
    ],
    "server_features": [
      "xds_v3"
    ]
  },
  "CertProviderConfigs": {
    "google_cloud_private_spiffe": {}
  },
  "ServerListenerResourceNameTemplate": "grpc/server?xds.resource.listening_address=%s",
  "ClientDefaultListenerResourceNameTemplate": "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/%s",
  "Authorities": {
    "traffic-director-c2p.xds.googleapis.com": {
      "ClientListenerResourceNameTemplate": "xdstp://traffic-director-c2p.xds.googleapis.com/envoy.config.listener.v3.Listener/%s",
      "XDSServer": {
        "server_uri": "dns:///directpath-pa.googleapis.com",
        "channel_creds": [
          {
            "type": "google_default"
          }
        ],
        "server_features": [
          "xds_v3",
          "ignore_resource_deletion"
        ]
      }
    },
    "traffic-director-global.xds.googleapis.com": {
      "ClientListenerResourceNameTemplate": "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/%s",
      "XDSServer": null
    }
  },
  "NodeProto": {
    "id": "projects/439293274322/networks/default/nodes/c51c7df5-68d2-40c2-bc7b-513817204bad",
    "cluster": "cluster",
    "metadata": {
      "INSTANCE_IP": "10.116.2.7",
      "TRAFFICDIRECTOR_GRPC_BOOTSTRAP_GENERATOR_SHA": "3149e0342ac92c92d89feaacc96d9d2f511f5b97"
    },
    "locality": {
      "zone": "us-west2-a"
    },
    "user_agent_name": "gRPC Go",
    "UserAgentVersionType": {
      "UserAgentVersion": "1.63.0-dev"
    },
    "client_features": [
      "envoy.lb.does_not_support_overprovisioning",
      "xds.config.resource-in-sotw"
    ]
  }
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] Created client to xDS management server: trafficdirector.googleapis.com:443-google_default-xds_v3
2024/02/22 00:39:20 INFO: [xds] xDS node ID: projects/439293274322/networks/default/nodes/c51c7df5-68d2-40c2-bc7b-513817204bad
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel created
2024/02/22 00:39:20 INFO: [core] [Channel #2] original dial target is: "trafficdirector.googleapis.com:443"
2024/02/22 00:39:20 INFO: [core] [Channel #2] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"trafficdirector.googleapis.com", Opaque:"443", User:(*url.Userinfo)(nil), Host:"", Path:"", RawPath:"", OmitHost:false, ForceQuery:false, RawQuery:"", Fragment:"", RawFragment:""}}
2024/02/22 00:39:20 INFO: [core] [Channel #2] fallback to scheme "passthrough"
2024/02/22 00:39:20 INFO: [core] [Channel #2] parsed dial target is: passthrough:///trafficdirector.googleapis.com:443
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel authority set to "trafficdirector.googleapis.com:443"
2024/02/22 00:39:20 INFO: [core] [Channel #2] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "trafficdirector.googleapis.com:443",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "trafficdirector.googleapis.com:443",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel switches to new LB policy "pick_first"
2024/02/22 00:39:20 INFO: [core] [pick-first-lb 0xc00039ccc0] Received new config {
  "shuffleAddressList": false
}, resolver state {
  "Addresses": [
    {
      "Addr": "trafficdirector.googleapis.com:443",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "trafficdirector.googleapis.com:443",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
}
2024/02/22 00:39:20 INFO: [core] [Channel #2 SubChannel #3] Subchannel created
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel Connectivity change to CONNECTING
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel exiting idle mode
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Created transport to server "trafficdirector.googleapis.com:443"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] New watch for type "ListenerResource", resource name "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] First watch for type "ListenerResource", resource name "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel exiting idle mode
2024/02/22 00:39:20 INFO: [core] [Channel #2 SubChannel #3] Subchannel Connectivity change to CONNECTING
2024/02/22 00:39:20 INFO: [core] [Channel #2 SubChannel #3] Subchannel picks a new address "trafficdirector.googleapis.com:443" to connect
2024/02/22 00:39:20 INFO: [core] [pick-first-lb 0xc00039ccc0] Received SubConn state update: 0xc00039ce40, {ConnectivityState:CONNECTING ConnectionError:<nil>}
2024/02/22 00:39:20 INFO: [core] [Channel #2 SubChannel #3] Subchannel Connectivity change to READY
2024/02/22 00:39:20 INFO: [core] [pick-first-lb 0xc00039ccc0] Received SubConn state update: 0xc00039ce40, {ConnectivityState:READY ConnectionError:<nil>}
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel Connectivity change to READY
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS stream created
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "node":  {
    "id":  "projects/439293274322/networks/default/nodes/c51c7df5-68d2-40c2-bc7b-513817204bad",
    "cluster":  "cluster",
    "metadata":  {
      "INSTANCE_IP":  "10.116.2.7",
      "TRAFFICDIRECTOR_GRPC_BOOTSTRAP_GENERATOR_SHA":  "3149e0342ac92c92d89feaacc96d9d2f511f5b97"
    },
    "locality":  {
      "zone":  "us-west2-a"
    },
    "userAgentName":  "gRPC Go",
    "userAgentVersion":  "1.63.0-dev",
    "clientFeatures":  [
      "envoy.lb.does_not_support_overprovisioning",
      "xds.config.resource-in-sotw"
    ]
  },
  "resourceNames":  [
    "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.listener.v3.Listener"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS response received: {
  "versionInfo":  "1708544016622413917",
  "resources":  [
    {
      "@type":  "type.googleapis.com/envoy.config.listener.v3.Listener",
      "name":  "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000",
      "apiListener":  {
        "apiListener":  {
          "@type":  "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
          "statPrefix":  "trafficdirector",
          "rds":  {
            "configSource":  {
              "ads":  {},
              "resourceApiVersion":  "V3"
            },
            "routeConfigName":  "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
          },
          "httpFilters":  [
            {
              "name":  "envoy.filters.http.fault",
              "typedConfig":  {
                "@type":  "type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault"
              }
            },
            {
              "name":  "envoy.filters.http.router",
              "typedConfig":  {
                "@type":  "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router",
                "suppressEnvoyHeaders":  true
              }
            }
          ],
          "normalizePath":  true,
          "mergeSlashes":  true
        }
      }
    }
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.listener.v3.Listener",
  "nonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Resource type "ListenerResource" with name "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000" added to cache
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Sending ACK for resource type: "type.googleapis.com/envoy.config.listener.v3.Listener", version: "1708544016622413917", nonce: "1"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "versionInfo":  "1708544016622413917",
  "resourceNames":  [
    "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.listener.v3.Listener",
  "responseNonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] Received update for Listener resource "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000": {
  "RouteConfigName": "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000",
  "InlineRouteConfig": null,
  "MaxStreamDuration": 0,
  "HTTPFilters": [
    {
      "Name": "envoy.filters.http.fault",
      "Filter": {},
      "Config": {
        "FilterConfig": null
      }
    },
    {
      "Name": "envoy.filters.http.router",
      "Filter": {},
      "Config": {
        "FilterConfig": null
      }
    }
  ],
  "InboundListenerCfg": null,
  "Raw": {
    "type_url": "type.googleapis.com/envoy.config.listener.v3.Listener",
    "value": "Cn14ZHN0cDovL3RyYWZmaWMtZGlyZWN0b3ItZ2xvYmFsLnhkcy5nb29nbGVhcGlzLmNvbS9lbnZveS5jb25maWcubGlzdGVuZXIudjMuTGlzdGVuZXIvNDM5MjkzMjc0MzIyL2RlZmF1bHQvaGVsbG93b3JsZC1na2U6ODAwMJoBlgMKkwMKZXR5cGUuZ29vZ2xlYXBpcy5jb20vZW52b3kuZXh0ZW5zaW9ucy5maWx0ZXJzLm5ldHdvcmsuaHR0cF9jb25uZWN0aW9uX21hbmFnZXIudjMuSHR0cENvbm5lY3Rpb25NYW5hZ2VyEqkCEg90cmFmZmljZGlyZWN0b3IaQwoEGgAwAhI7VVJMX01BUC80MzkyOTMyNzQzMjJfZ3JwYy1na2UtdXJsLW1hcF8wX2hlbGxvd29ybGQtZ2tlOjgwMDAqYgoYZW52b3kuZmlsdGVycy5odHRwLmZhdWx0IkYKRHR5cGUuZ29vZ2xlYXBpcy5jb20vZW52b3kuZXh0ZW5zaW9ucy5maWx0ZXJzLmh0dHAuZmF1bHQudjMuSFRUUEZhdWx0KmUKGWVudm95LmZpbHRlcnMuaHR0cC5yb3V0ZXIiSApCdHlwZS5nb29nbGVhcGlzLmNvbS9lbnZveS5leHRlbnNpb25zLmZpbHRlcnMuaHR0cC5yb3V0ZXIudjMuUm91dGVyEgIgAfIBAggBiAIB"
  }
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] New watch for type "RouteConfigResource", resource name "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] First watch for type "RouteConfigResource", resource name "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "resourceNames":  [
    "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS response received: {
  "versionInfo":  "1708544016622413917",
  "resources":  [
    {
      "@type":  "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
      "name":  "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000",
      "virtualHosts":  [
        {
          "domains":  [
            "helloworld-gke:8000"
          ],
          "routes":  [
            {
              "name":  "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000-route-0",
              "match":  {
                "prefix":  ""
              },
              "route":  {
                "cluster":  "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
                "timeout":  "30s",
                "retryPolicy":  {
                  "retryOn":  "gateway-error",
                  "numRetries":  1,
                  "perTryTimeout":  "30s"
                }
              }
            }
          ]
        }
      ]
    }
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
  "nonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Resource type "RouteConfigResource" with name "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000" added to cache
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Sending ACK for resource type: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", version: "1708544016622413917", nonce: "1"
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] Received update for RouteConfiguration resource "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000": {
  "VirtualHosts": [
    {
      "Domains": [
        "helloworld-gke:8000"
      ],
      "Routes": [
        {
          "Path": null,
          "Prefix": "",
          "Regex": null,
          "CaseInsensitive": false,
          "Headers": null,
          "Fraction": null,
          "HashPolicies": null,
          "MaxStreamDuration": null,
          "HTTPFilterConfigOverride": null,
          "RetryConfig": {
            "RetryOn": null,
            "NumRetries": 0,
            "RetryBackoff": {
              "BaseInterval": 0,
              "MaxInterval": 0
            }
          },
          "ActionType": 1,
          "WeightedClusters": {
            "cloud-internal-istio:cloud_mp_439293274322_77023378241484717": {
              "Weight": 1,
              "HTTPFilterConfigOverride": null
            }
          },
          "ClusterSpecifierPlugin": ""
        }
      ],
      "HTTPFilterConfigOverride": null,
      "RetryConfig": null
    }
  ],
  "ClusterSpecifierPlugins": {},
  "Raw": {
    "type_url": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
    "value": "CjtVUkxfTUFQLzQzOTI5MzI3NDMyMl9ncnBjLWdrZS11cmwtbWFwXzBfaGVsbG93b3JsZC1na2U6ODAwMBK+ARITaGVsbG93b3JsZC1na2U6ODAwMBqmAQoCCgASWwo8Y2xvdWQtaW50ZXJuYWwtaXN0aW86Y2xvdWRfbXBfNDM5MjkzMjc0MzIyXzc3MDIzMzc4MjQxNDg0NzE3QgIIHkoXCg1nYXRld2F5LWVycm9yEgIIARoCCB5yQ1VSTF9NQVAvNDM5MjkzMjc0MzIyX2dycGMtZ2tlLXVybC1tYXBfMF9oZWxsb3dvcmxkLWdrZTo4MDAwLXJvdXRlLTA="
  }
}
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] For Listener resource "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000" and RouteConfiguration resource "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000", generated service config: {
  "loadBalancingConfig": [
    {
      "xds_cluster_manager_experimental": {
        "children": {
          "cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717": {
            "childPolicy": [
              {
                "cds_experimental": {
                  "cluster": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
                }
              }
            ]
          }
        }
      }
    }
  ]
}
2024/02/22 00:39:20 INFO: [core] [Channel #1] Resolver state updated: {
  "Addresses": null,
  "Endpoints": [],
  "ServiceConfig": {
    "Config": {
      "Config": null,
      "LB": null,
      "Methods": {}
    },
    "Err": null
  },
  "Attributes": {
    "\u003c%!p(resolver.csKeyType=grpc.internal.resolver.configSelector)\u003e": "\u003c0xc0000aa4b0\u003e",
    "\u003c%!p(xdsclient.clientKeyType=grpc.xds.internal.client.Client)\u003e": "\u003c0xc0003598a0\u003e"
  }
} (service config updated)
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel switches to new LB policy "xds_cluster_manager_experimental"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "versionInfo":  "1708544016622413917",
  "resourceNames":  [
    "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
  "responseNonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Created
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] update with config {
  "LoadBalancingConfig": null,
  "Children": {
    "cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717": {
      "ChildPolicy": [
        {
          "cds_experimental": {
            "LoadBalancingConfig": null,
            "Cluster": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
          }
        }
      ]
    }
  }
}, resolver state {Addresses:[] Endpoints:[] ServiceConfig:0xc00007b240 Attributes:{"<%!p(resolver.csKeyType=grpc.internal.resolver.configSelector)>": "<0xc0000aa4b0>" , "<%!p(xdsclient.clientKeyType=grpc.xds.internal.client.Client)>": "<0xc0003598a0>" }}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Adding child policy of type "cds_experimental" for locality "cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Creating child policy of type "cds_experimental" for locality "cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [cds-lb 0xc0004aa180] Created
2024/02/22 00:39:20 INFO: [xds] [cds-lb 0xc0004aa180] xDS credentials in use: false
2024/02/22 00:39:20 INFO: [xds] [cds-lb 0xc0004aa180] Received balancer config update: {
  "LoadBalancingConfig": null,
  "Cluster": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] New watch for type "ClusterResource", resource name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] First watch for type "ClusterResource", resource name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "resourceNames":  [
    "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.cluster.v3.Cluster"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS response received: {
  "versionInfo":  "1708544016622413917",
  "resources":  [
    {
      "@type":  "type.googleapis.com/envoy.config.cluster.v3.Cluster",
      "name":  "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
      "altStatName":  "/projects/439293274322/global/backendServices/grpc-gke-helloworld-service",
      "type":  "EDS",
      "edsClusterConfig":  {
        "edsConfig":  {
          "ads":  {},
          "initialFetchTimeout":  "15s",
          "resourceApiVersion":  "V3"
        }
      },
      "connectTimeout":  "30s",
      "circuitBreakers":  {
        "thresholds":  [
          {
            "maxConnections":  2147483647,
            "maxPendingRequests":  2147483647,
            "maxRequests":  2147483647,
            "maxRetries":  2147483647
          }
        ]
      },
      "http2ProtocolOptions":  {
        "maxConcurrentStreams":  100
      },
      "commonLbConfig":  {
        "healthyPanicThreshold":  {
          "value":  1
        },
        "localityWeightedLbConfig":  {}
      },
      "metadata":  {
        "filterMetadata":  {
          "com.google.trafficdirector":  {
            "backend_service_name":  "grpc-gke-helloworld-service",
            "backend_service_project_number":  439293274322
          }
        }
      },
      "lrsServer":  {
        "self":  {}
      }
    }
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.cluster.v3.Cluster",
  "nonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Resource type "ClusterResource" with name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717" added to cache
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Sending ACK for resource type: "type.googleapis.com/envoy.config.cluster.v3.Cluster", version: "1708544016622413917", nonce: "1"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "versionInfo":  "1708544016622413917",
  "resourceNames":  [
    "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.cluster.v3.Cluster",
  "responseNonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [cds-lb 0xc0004aa180] Received Cluster resource: {
  "ClusterType": 0,
  "ClusterName": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
  "EDSServiceName": "",
  "LRSServerConfig": 1,
  "SecurityCfg": null,
  "MaxRequests": 2147483647,
  "DNSHostName": "",
  "PrioritizedClusterNames": null,
  "LBPolicy": [
    {
      "xds_wrr_locality_experimental": {
        "childPolicy": [
          {
            "round_robin": {}
          }
        ]
      }
    }
  ],
  "OutlierDetection": null,
  "Raw": {
    "type_url": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
    "value": "CjxjbG91ZC1pbnRlcm5hbC1pc3RpbzpjbG91ZF9tcF80MzkyOTMyNzQzMjJfNzcwMjMzNzgyNDE0ODQ3MTcQAxoKCggaACICCA8wAiICCB5SIgogEgYI/////wcaBgj/////ByIGCP////8HKgYI/////wdyBBICCGTKAYUBCoIBChpjb20uZ29vZ2xlLnRyYWZmaWNkaXJlY3RvchJkCisKHmJhY2tlbmRfc2VydmljZV9wcm9qZWN0X251bWJlchIJEQCANNr6kVlCCjUKFGJhY2tlbmRfc2VydmljZV9uYW1lEh0aG2dycGMtZ2tlLWhlbGxvd29ybGQtc2VydmljZdoBDQoJCQAAAAAAAPA/GgDiAUkvcHJvamVjdHMvNDM5MjkzMjc0MzIyL2dsb2JhbC9iYWNrZW5kU2VydmljZXMvZ3JwYy1na2UtaGVsbG93b3JsZC1zZXJ2aWNl0gICKgA="
  }
}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-resolver-lb 0xc00039b380] Created
2024/02/22 00:39:20 INFO: [xds] [cds-lb 0xc0004aa180] Created child policy 0xc00039b380 of type cluster_resolver_experimental
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-resolver-lb 0xc00039b380] Received new balancer config: {
  "discoveryMechanisms": [
    {
      "cluster": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
      "lrsLoadReportingServer": {
        "server_uri": "trafficdirector.googleapis.com:443",
        "channel_creds": [
          {
            "type": "google_default"
          }
        ],
        "server_features": [
          "xds_v3"
        ]
      },
      "maxConcurrentRequests": 2147483647,
      "outlierDetection": {}
    }
  ],
  "xdsLbPolicy": [
    {
      "xds_wrr_locality_experimental": {
        "childPolicy": [
          {
            "round_robin": {}
          }
        ]
      }
    }
  ]
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] New watch for type "EndpointsResource", resource name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] First watch for type "EndpointsResource", resource name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "resourceNames":  [
    "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS response received: {
  "versionInfo":  "1",
  "resources":  [
    {
      "@type":  "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment",
      "clusterName":  "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
      "endpoints":  [
        {
          "locality":  {
            "subZone":  "hg:us-west2-a_5349090172098836088_neg"
          },
          "lbEndpoints":  [
            {
              "endpoint":  {
                "address":  {
                  "socketAddress":  {
                    "address":  "10.116.1.8",
                    "portValue":  50051
                  }
                }
              },
              "healthStatus":  "HEALTHY"
            },
            {
              "endpoint":  {
                "address":  {
                  "socketAddress":  {
                    "address":  "10.116.2.6",
                    "portValue":  50051
                  }
                }
              },
              "healthStatus":  "HEALTHY"
            }
          ],
          "loadBalancingWeight":  1000000
        }
      ]
    }
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment",
  "nonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Resource type "EndpointsResource" with name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717" added to cache
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Sending ACK for resource type: "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", version: "1", nonce: "1"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "versionInfo":  "1",
  "resourceNames":  [
    "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
  ],
  "typeUrl":  "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment",
  "responseNonce":  "1"
}

                    ],
                    "server_features": [
                      "xds_v3"
                    ]
                  },
                  "maxConcurrentRequests": 2147483647,
                  "childPolicy": [
                    {
                      "xds_wrr_locality_experimental": {
                        "childPolicy": [
                          {
                            "round_robin": {}
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ],
      "ignoreReresolutionRequests": true
    }
  },
  "priorities": [
    "priority-0-0"
  ]
}
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Received an update with balancer config: {
  "children": {
    "priority-0-0": {
      "config": [
        {
          "outlier_detection_experimental": {
            "interval": "10s",
            "baseEjectionTime": "30s",
            "maxEjectionTime": "300s",
            "maxEjectionPercent": 10,
            "childPolicy": [
              {
                "xds_cluster_impl_experimental": {
                  "cluster": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
                  "lrsLoadReportingServer": {
                    "server_uri": "trafficdirector.googleapis.com:443",
                    "channel_creds": [
                      {
                        "type": "google_default"
                      }
                    ],
                    "server_features": [
                      "xds_v3"
                    ]
                  },
                  "maxConcurrentRequests": 2147483647,
                  "childPolicy": [
                    {
                      "xds_wrr_locality_experimental": {
                        "childPolicy": [
                          {
                            "round_robin": {}
                          }
                        ]
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ],
      "ignoreReresolutionRequests": true
    }
  },
  "priorities": [
    "priority-0-0"
  ]
}
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] childInUse, childUpdating: "", "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Balancer state update from locality cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717, new state: {ConnectivityState:CONNECTING Picker:0xc0003c0ce0}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Child pickers: map[cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717:picker:0xc0003c0ce0,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel Connectivity change to CONNECTING
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Switching to ("priority-0-0", 0) in syncPriority
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Adding child policy of type "outlier_detection_experimental" for locality "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Creating child policy of type "outlier_detection_experimental" for locality "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [outlier-detection-lb 0xc00052a180] Created
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-impl-lb 0xc00033b200] Created
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-impl-lb 0xc00033b200] Received update from resolver, balancer config: {
  "cluster": "cloud-internal-istio:cloud_mp_439293274322_77023378241484717",
  "lrsLoadReportingServer": {
    "server_uri": "trafficdirector.googleapis.com:443",
    "channel_creds": [
      {
        "type": "google_default"
      }
    ],
    "server_features": [
      "xds_v3"
    ]
  },
  "maxConcurrentRequests": 2147483647,
  "childPolicy": [
    {
      "xds_wrr_locality_experimental": {
        "childPolicy": [
          {
            "round_robin": {}
          }
        ]
      }
    }
  ]
}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Created
2024/02/22 00:39:20 INFO: [xds] [wrrlocality-lb 0xc000475f20] Created
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Created LRS stream to server "trafficdirector.googleapis.com:443"
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Received update from resolver, balancer config: {
  "targets": {
    "{\"subZone\":\"hg:us-west2-a_5349090172098836088_neg\"}": {
      "weight": 1000000,
      "childPolicy": [
        {
          "round_robin": {}
        }
      ]
    }
  }
}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Adding child policy of type "round_robin" for locality "{\"subZone\":\"hg:us-west2-a_5349090172098836088_neg\"}"
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Creating child policy of type "round_robin" for locality "{\"subZone\":\"hg:us-west2-a_5349090172098836088_neg\"}"
2024/02/22 00:39:20 INFO: [balancer] base.baseBalancer: got new ClientConn state:  {{[{Addr: "10.116.1.8:50051", ServerName: "", BalancerAttributes: {"<%!p(wrrlocality.attributeKey={})>": "Locality Weight: 1000000" , "<%!p(hierarchy.pathKeyType=grpc.internal.address.hierarchical_path)>": "<0xc00007be70>" , "<%!p(internal.localityKeyType=grpc.xds.internal.address.locality)>": "<%!p(internal.LocalityID={  hg:us-west2-a_5349090172098836088_neg})>" , "<%!p(weightedroundrobin.attributeKey={})>": "Weight: 1000000" }} {Addr: "10.116.2.6:50051", ServerName: "", BalancerAttributes: {"<%!p(wrrlocality.attributeKey={})>": "Locality Weight: 1000000" , "<%!p(weightedroundrobin.attributeKey={})>": "Weight: 1000000" , "<%!p(hierarchy.pathKeyType=grpc.internal.address.hierarchical_path)>": "<0xc00007beb0>" , "<%!p(internal.localityKeyType=grpc.xds.internal.address.locality)>": "<%!p(internal.LocalityID={  hg:us-west2-a_5349090172098836088_neg})>" }}] [] <nil> {"<%!p(xdsclient.clientKeyType=grpc.xds.internal.client.Client)>": "<0xc0003598a0>" }} <nil>}
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #5] Subchannel created
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #6] Subchannel created
2024/02/22 00:39:20 INFO: [roundrobin] roundrobinPicker: Build called with info: {map[]}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Balancer state update from locality {"subZone":"hg:us-west2-a_5349090172098836088_neg"}, new state: {ConnectivityState:CONNECTING Picker:0xc0003a4980}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Child pickers with config: map[{"subZone":"hg:us-west2-a_5349090172098836088_neg"}:weight:1000000,picker:0xc0003a4980,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #5] Subchannel Connectivity change to CONNECTING
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #5] Subchannel picks a new address "10.116.1.8:50051" to connect
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #6] Subchannel Connectivity change to CONNECTING
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #6] Subchannel picks a new address "10.116.2.6:50051" to connect
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Sending initial LoadStatsRequest: {
  "node":  {
    "id":  "projects/439293274322/networks/default/nodes/c51c7df5-68d2-40c2-bc7b-513817204bad",
    "cluster":  "cluster",
    "metadata":  {
      "INSTANCE_IP":  "10.116.2.7",
      "TRAFFICDIRECTOR_GRPC_BOOTSTRAP_GENERATOR_SHA":  "3149e0342ac92c92d89feaacc96d9d2f511f5b97"
    },
    "locality":  {
      "zone":  "us-west2-a"
    },
    "userAgentName":  "gRPC Go",
    "userAgentVersion":  "1.63.0-dev",
    "clientFeatures":  [
      "envoy.lb.does_not_support_overprovisioning",
      "xds.config.resource-in-sotw",
      "envoy.lrs.supports_send_all_clusters"
    ]
  }
}
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Balancer state update from locality priority-0-0, new state: {ConnectivityState:CONNECTING Picker:0xc0000c5818}
2024/02/22 00:39:20 INFO: [balancer] base.baseBalancer: handle SubConn state change: 0xc0002dab00, CONNECTING
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Balancer state update from locality {"subZone":"hg:us-west2-a_5349090172098836088_neg"}, new state: {ConnectivityState:CONNECTING Picker:0xc0003a4980}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Child pickers with config: map[{"subZone":"hg:us-west2-a_5349090172098836088_neg"}:weight:1000000,picker:0xc0003a4980,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [balancer] base.baseBalancer: handle SubConn state change: 0xc0002dad20, CONNECTING
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] childInUse, childUpdating: "priority-0-0", "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Balancer state update from locality cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717, new state: {ConnectivityState:CONNECTING Picker:0xc0000c5818}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Child pickers: map[cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717:picker:0xc0000c5818,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Switching to ("priority-0-0", 0) in syncPriority
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Balancer state update from locality {"subZone":"hg:us-west2-a_5349090172098836088_neg"}, new state: {ConnectivityState:CONNECTING Picker:0xc0003a4980}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Child pickers with config: map[{"subZone":"hg:us-west2-a_5349090172098836088_neg"}:weight:1000000,picker:0xc0003a4980,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Balancer state update from locality priority-0-0, new state: {ConnectivityState:CONNECTING Picker:0xc0005ed668}
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Balancer state update from locality priority-0-0, new state: {ConnectivityState:CONNECTING Picker:0xc0005ed698}
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] childInUse, childUpdating: "priority-0-0", "priority-0-0"
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #5] Subchannel Connectivity change to READY
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Balancer state update from locality cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717, new state: {ConnectivityState:CONNECTING Picker:0xc0005ed668}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Child pickers: map[cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717:picker:0xc0005ed668,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Switching to ("priority-0-0", 0) in syncPriority
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] childInUse, childUpdating: "priority-0-0", "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Balancer state update from locality cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717, new state: {ConnectivityState:CONNECTING Picker:0xc0005ed698}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Child pickers: map[cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717:picker:0xc0005ed698,state:CONNECTING,stateToAggregate:CONNECTING]
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Switching to ("priority-0-0", 0) in syncPriority
2024/02/22 00:39:20 INFO: [balancer] base.baseBalancer: handle SubConn state change: 0xc0002dab00, READY
2024/02/22 00:39:20 INFO: [roundrobin] roundrobinPicker: Build called with info: {map[0xc0002dab00:{{Addr: "10.116.1.8:50051", ServerName: "", BalancerAttributes: {"<%!p(wrrlocality.attributeKey={})>": "Locality Weight: 1000000" , "<%!p(hierarchy.pathKeyType=grpc.internal.address.hierarchical_path)>": "<0xc00007be70>" , "<%!p(internal.localityKeyType=grpc.xds.internal.address.locality)>": "<%!p(internal.LocalityID={  hg:us-west2-a_5349090172098836088_neg})>" , "<%!p(weightedroundrobin.attributeKey={})>": "Weight: 1000000" }}}]}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Balancer state update from locality {"subZone":"hg:us-west2-a_5349090172098836088_neg"}, new state: {ConnectivityState:READY Picker:0xc0002db0c0}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Child pickers with config: map[{"subZone":"hg:us-west2-a_5349090172098836088_neg"}:weight:1000000,picker:0xc0002db0c0,state:READY,stateToAggregate:READY]
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Balancer state update from locality priority-0-0, new state: {ConnectivityState:READY Picker:0xc000516000}
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] childInUse, childUpdating: "priority-0-0", "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Balancer state update from locality cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717, new state: {ConnectivityState:READY Picker:0xc000516000}
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Child pickers: map[cluster:cloud-internal-istio:cloud_mp_439293274322_77023378241484717:picker:0xc000516000,state:READY,stateToAggregate:READY]
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel Connectivity change to READY
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Switching to ("priority-0-0", 0) in syncPriority
2024/02/22 00:39:20 Greeting: Hello world, from app1-75956dfb7c-z7brj
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #6] Subchannel Connectivity change to READY
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel Connectivity change to SHUTDOWN
2024/02/22 00:39:20 INFO: [core] [Channel #1] Closing the name resolver
2024/02/22 00:39:20 INFO: [core] [Channel #1] ccBalancerWrapper: closing
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Removing last watch for type "ClusterResource", resource name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Removing last watch for type "EndpointsResource", resource name "cloud-internal-istio:cloud_mp_439293274322_77023378241484717"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Removing last watch for type "ListenerResource", resource name "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] Canceling watch on Listener resource "xdstp://traffic-director-global.xds.googleapis.com/envoy.config.listener.v3.Listener/439293274322/default/helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Removing last watch for type "RouteConfigResource", resource name "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] Canceling watch on RouteConfiguration resource "URL_MAP/439293274322_grpc-gke-url-map_0_helloworld-gke:8000"
2024/02/22 00:39:20 INFO: [balancer] base.baseBalancer: handle SubConn state change: 0xc0002dad20, READY
2024/02/22 00:39:20 INFO: [roundrobin] roundrobinPicker: Build called with info: {map[0xc0002dab00:{{Addr: "10.116.1.8:50051", ServerName: "", BalancerAttributes: {"<%!p(internal.localityKeyType=grpc.xds.internal.address.locality)>": "<%!p(internal.LocalityID={  hg:us-west2-a_5349090172098836088_neg})>" , "<%!p(weightedroundrobin.attributeKey={})>": "Weight: 1000000" , "<%!p(wrrlocality.attributeKey={})>": "Locality Weight: 1000000" , "<%!p(hierarchy.pathKeyType=grpc.internal.address.hierarchical_path)>": "<0xc00007be70>" }}} 0xc0002dad20:{{Addr: "10.116.2.6:50051", ServerName: "", BalancerAttributes: {"<%!p(wrrlocality.attributeKey={})>": "Locality Weight: 1000000" , "<%!p(weightedroundrobin.attributeKey={})>": "Weight: 1000000" , "<%!p(hierarchy.pathKeyType=grpc.internal.address.hierarchical_path)>": "<0xc00007beb0>" , "<%!p(internal.localityKeyType=grpc.xds.internal.address.locality)>": "<%!p(internal.LocalityID={  hg:us-west2-a_5349090172098836088_neg})>" }}}]}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Balancer state update from locality {"subZone":"hg:us-west2-a_5349090172098836088_neg"}, new state: {ConnectivityState:READY Picker:0xc00051dae0}
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS request sent: {
  "versionInfo":  "1708544016622413917",
  "typeUrl":  "type.googleapis.com/envoy.config.cluster.v3.Cluster",
  "responseNonce":  "1"
}
2024/02/22 00:39:20 INFO: [xds] [weighted-target-lb 0xc0002da4e0] Child pickers with config: map[{"subZone":"hg:us-west2-a_5349090172098836088_neg"}:weight:1000000,picker:0xc00051dae0,state:READY,stateToAggregate:READY]
2024/02/22 00:39:20 WARNING: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Watchers not notified since ADS stream failed after having received at least one response: rpc error: code = Canceled desc = context canceled
2024/02/22 00:39:20 WARNING: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] ADS stream closed: rpc error: code = Canceled desc = context canceled
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-impl-lb 0xc00033b200] Shutdown
2024/02/22 00:39:20 INFO: [xds] [priority-lb 0xc000294770] Removing child policy for locality "priority-0-0"
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-resolver-lb 0xc00039b380] Shutdown
2024/02/22 00:39:20 INFO: [xds] [cds-lb 0xc0004aa180] Shutdown
2024/02/22 00:39:20 INFO: [xds] [xds-cluster-manager-lb 0xc00007b2e0] Shutdown
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel Connectivity change to SHUTDOWN
2024/02/22 00:39:20 INFO: [core] [Channel #2] Closing the name resolver
2024/02/22 00:39:20 INFO: [core] [Channel #2] ccBalancerWrapper: closing
2024/02/22 00:39:20 INFO: [core] [Channel #2 SubChannel #3] Subchannel Connectivity change to SHUTDOWN
2024/02/22 00:39:20 INFO: [core] [Channel #2 SubChannel #3] Subchannel deleted
2024/02/22 00:39:20 INFO: [transport] [client-transport 0xc0000e0248] Closing: rpc error: code = Canceled desc = grpc: the client connection is closing
2024/02/22 00:39:20 INFO: [transport] [client-transport 0xc0000e0248] loopyWriter exiting with error: transport closed by client
2024/02/22 00:39:20 INFO: [core] [Channel #2] Channel deleted
2024/02/22 00:39:20 INFO: [xds] [xds-client 0xc00034adc0] Shutdown
2024/02/22 00:39:20 INFO: [xds] [xds-resolver 0xc0002fc5a0] Shutdown
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #5] Subchannel Connectivity change to SHUTDOWN
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #5] Subchannel deleted
2024/02/22 00:39:20 INFO: [transport] [client-transport 0xc000140b48] Closing: rpc error: code = Canceled desc = grpc: the client connection is closing
2024/02/22 00:39:20 WARNING: [xds] [xds-client 0xc00034adc0] [trafficdirector.googleapis.com:443] Reading from LRS stream failed: failed to receive first LoadStatsResponse: rpc error: code = Canceled desc = grpc: the client connection is closing
2024/02/22 00:39:20 INFO: [transport] [client-transport 0xc000140b48] loopyWriter exiting with error: transport closed by client
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #6] Subchannel Connectivity change to SHUTDOWN
2024/02/22 00:39:20 INFO: [core] [Channel #1 SubChannel #6] Subchannel deleted
2024/02/22 00:39:20 INFO: [transport] [client-transport 0xc000140d88] Closing: rpc error: code = Canceled desc = grpc: the client connection is closing
2024/02/22 00:39:20 INFO: [transport] [client-transport 0xc000140d88] loopyWriter exiting with error: transport closed by client
2024/02/22 00:39:20 INFO: [core] [Channel #1] Channel deleted

RELEASE NOTES: none

@arvindbr8
Copy link
Member Author

@ejona86 -- please take a pass at the behavior change. I will get someone from the team to also take a look.

@arvindbr8 arvindbr8 added this to the 1.63 Release milestone Feb 22, 2024
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Merging #6997 (6265227) into master (76a23bf) will increase coverage by 0.02%.
Report is 4 commits behind head on master.
The diff coverage is 80.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6997      +/-   ##
==========================================
+ Coverage   82.46%   82.48%   +0.02%     
==========================================
  Files         296      296              
  Lines       31465    31461       -4     
==========================================
+ Hits        25947    25952       +5     
+ Misses       4463     4452      -11     
- Partials     1055     1057       +2     
Files Coverage Δ
clientconn.go 92.63% <ø> (-0.60%) ⬇️
resolver/resolver.go 94.44% <ø> (ø)
resolver_wrapper.go 85.18% <100.00%> (+0.13%) ⬆️
xds/internal/resolver/xds_resolver.go 79.61% <75.00%> (+0.68%) ⬆️

... and 20 files with indirect coverage changes

@@ -119,6 +119,7 @@ func (b *xdsResolverBuilder) Build(target resolver.Target, cc resolver.ClientCon
endpoint = target.URL.Opaque
}
endpoint = strings.TrimPrefix(endpoint, "/")
r.dataplaneAuthority = endpoint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the "last path component". If you have xds:///foo/bar then the string here is "foo/bar".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for bringing this up. Just by intuition I assumed that the dataplane authority (or the virtual host domain name to lookup for) should be the endpoint from the dial target.

I brought this up with the gRPC xDS group and Mark has a patchset to the A47 gRFC to clarify this.

Given that I think this is the expected behavior.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree they should be the same, but the docs you copied said it was different than you were using. (And the docs did say they were the same.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) yes, comment needs updating.. I'll fix the comment once there is an LGTM on the doc update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated excerpt used in the docstring. PTAL :) @ejona86

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see "any remaining '/' characters will be percent-encoded" implemented here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some investigation and it seems like we are percentage encoding everything in the URI path except for /s intentionally (see here). I have opened #7002 to track the investigation.

I've updated the PR to only change the virtualhost lookup logic and will track the % encoding question as a followup.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to track #7002 and close it. Basically xDS URI targets use the default way to determine channel authority which is to %encoding the path component.

And yes I verified that we %encoding /s after fc0aa46 was merged

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, there is an open question about whether or not to use the %-encoded authority to match the virtual host domain.

per @markdroth -
C-core currently uses the %-encoded authority to match the virtual host domain.

@ejona86 , @dfawley -- Do you have a strong preference or shall we be guided by the existing implementation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @ejona86 --
We will send the percent-encoded form on the wire, so it seems appropriate to match against the same here. That's what the server would match against.

In general, the fewer different representations of authority, the fewer chances for subtle bugs.

@arvindbr8 arvindbr8 assigned arvindbr8 and ejona86 and unassigned ejona86 and arvindbr8 Feb 22, 2024
@arvindbr8 arvindbr8 requested a review from ejona86 February 22, 2024 18:18
@arvindbr8 arvindbr8 assigned arvindbr8 and unassigned ejona86 Feb 22, 2024
@arvindbr8 arvindbr8 assigned ejona86 and unassigned arvindbr8 Feb 23, 2024
@arvindbr8
Copy link
Member Author

I've fixed the behavior as per the discussions in chat. Please take a look @ejona86

server := stubserver.StartTestService(t, nil)
defer server.Stop()

const serviceName = "my-service-client-side-xds"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This string looks like it would have worked before your changes. Does this test fail without your changes to xds_resolver.go?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Now the serviceName has 2 special chars - , and /.

Comment on lines 171 to 172
// Authority is the effective authority of the connection for which the
// resolver is built for.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

client or ClientConn instead of connection.

And: for which the resolver is built.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

server := stubserver.StartTestService(t, nil)
defer server.Stop()

serviceName := "my-service-client-side-xds/2nd component"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: please use const anywhere that it's possible to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

test/xds/xds_client_federation_test.go Outdated Show resolved Hide resolved
@arvindbr8 arvindbr8 merged commit 90fc697 into grpc:master Feb 28, 2024
14 checks passed
@arvindbr8 arvindbr8 deleted the 6996 branch February 28, 2024 19:08
arvindbr8 added a commit to arvindbr8/grpc-go that referenced this pull request Mar 4, 2024
… authority for virtualhost lookup (grpc#6997)

cherry-pick grpc#6997 to 1.62.x release branch
howardjohn added a commit to howardjohn/istio that referenced this pull request Mar 27, 2024
Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke
istio-testing pushed a commit to istio/istio that referenced this pull request Mar 28, 2024
Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke
wulianglongrd pushed a commit to wulianglongrd/istio that referenced this pull request Mar 29, 2024
Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke
jmcshane pushed a commit to superorbital/istio that referenced this pull request Apr 3, 2024
Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke
bleggett pushed a commit to bleggett/istio that referenced this pull request Apr 4, 2024
Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke

(cherry picked from commit 48a1921)
bleggett pushed a commit to bleggett/istio that referenced this pull request Apr 4, 2024
Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke

(cherry picked from commit 48a1921)
istio-testing pushed a commit to istio/istio that referenced this pull request Apr 4, 2024
* Bump grpc-go and x/net (#50236)

(cherry picked from commit e872055)

* Bump gRPC deps (#50129)

Resolve breaking change in
grpc/grpc-go#6997.

This is a low leverl interface so I don't think its a huge concern it
broke

(cherry picked from commit 48a1921)

* Bump go-control-plane (#48841)

* Bump go-control-plane

* Bump and turn off by default

* fix gen

* bump

(cherry picked from commit faf5bdd)

---------

Co-authored-by: John Howard <howardjohn@google.com>
}
endpoint = strings.TrimPrefix(endpoint, "/")
r.ldsResourceName = bootstrap.PopulateResourceTemplate(template, endpoint)
r.dataplaneAuthority = opts.Authority

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest:

Suggested change
r.dataplaneAuthority = opts.Authority
r.dataplaneAuthority = target.Endpoint()

... in order to honor rewritten URLs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give me more details about what you mean by "rewritten URLs"?

Copy link

@rdesgroppes rdesgroppes May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure: we've been using a custom resolver which translates custom-scheme://host URIs to xds:///host.some-domain ones ("rewrite-uri" of some sort) and then delegates to the original xDS resolver. This was working fine up to gRPC-Go 1.62.0 but, since gRPC-Go 1.62.1, we started facing:

WARNING: [core] [Channel #1] ccResolverWrapper: reporting error to cc: no matching virtual host found for ""

The above "" happens to come from the empty opts.Authority. Using target.Endpoint() instead makes sure the virtual host lookup is performed against the resolved target.

Both gRPC (C++) 1.62.2 and gRPC-Java 1.62.2 seem to honor "rewritten" target URIs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xdsresolver uses ldsResourceName instead of using data plane authority
4 participants