envoyproxy / java-control-plane

Java implementation of an Envoy gRPC control plane

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Envoy version switch broken call of DiscoveryServerCallbacks.onStreamRequest

mabukhovsky opened this issue · comments

@jyotimahapatra I've switched Envoy from 1.11.1 to 1.14.1 and discovered that control plane's DiscoveryServerCallbacks.onStreamRequest is no longer triggered on Envoy app start. It used to workin in Envoy 1.11.1 and was triggered every time Envoy started. I've checked Envoy config_dump and found that data class & data structure has changed (see below). Is it there a way to fix it? I'm using most recent control plane 0.1.23

Envoy 1.11.1 config dump

"configs": [
    {
      "@type": "type.googleapis.com/envoy.admin.v2alpha.BootstrapConfigDump",
      "bootstrap": {
        "node": {
          "id": "0c993f87e006",
          "cluster": "aaa-envoy",
          "metadata": {
            "host": "0c993f87e006",
            "admin_port": 10000,
            "port": 11000,
            "instance": "0c993f87e006aaa-envoy"
          },
          "build_version": "7a12f379e47a9f7cf7211c727fe8fc70b6a0a9ab/1.11.2/Clean/RELEASE/BoringSSL"
        }...

Envoy 1.14.1 config dump

"configs": [
    {
      "@type": "type.googleapis.com/envoy.admin.v3.BootstrapConfigDump",
      "bootstrap": {
        "node": {
          "id": "f108b1f075bd",
          "cluster": "aaa-envoy",
          "metadata": {
            "instance": "f108b1f075bdaaa-envoy",
            "port": 10000,
            "admin_port": 11000,
            "host": "f108b1f075bd"
          },
          "hidden_envoy_deprecated_build_version": "3504d40f752eb5c20bc2883053547717bcb92fd8/1.14.1/Clean/RELEASE/BoringSSL",
          "user_agent_name": "envoy",
          "user_agent_build_version": {
            "version": {
              "major_number": 1,
              "minor_number": 14,
              "patch": 1
            },
            "metadata": {
              "build.type": "RELEASE",
              "ssl.version": "BoringSSL",
              "revision.status": "Clean",
              "revision.sha": "3504d40f752eb5c20bc2883053547717bcb92fd8"
            }
          },

Listener

@Component
class ServiceDiscoveryCallback(
...
) : DiscoveryServerCallbacks {


    override fun onStreamRequest(streamId: Long, request: DiscoveryRequest) {
        logger.info("streamId: $streamId")
...
        }
    }

I see here that v3.BoostrapConfigDump is included only in comment, so not sure you have implemented support for it yet.

@mabukhovsky I have made some changes in go-control-plane to support v3 apis.
I believe there's work needed in java-control-plane to enable v3 apis.
However, just switching the envoy version should not cause any issues. Did you also update the java-control-plane ?

@jyotimahapatra Thank you for update. Due to changed requirements of my project, I no longer need control plane and the issue is resolved.