Skip to content

Conversation

lidizheng
Copy link
Contributor

@lidizheng lidizheng commented Mar 31, 2021

This needs a backport. Found by @menghanl.

After the update, the timestamp is back to normal instead of "last_updated": "1970-01-21T22:53:48.202451705Z",.

{
 "config": [
  {
   "node": {
    "id": "xds_end2end_test",
    "cluster": "test",
    "metadata": {
     "foo": "bar"
    },
    "locality": {
     "region": "corp",
     "zone": "svl",
     "subZone": "mp3"
    },
    "userAgentName": "gRPC C-core linux",
    "userAgentVersion": "15.0.0",
    "clientFeatures": [
     "envoy.lb.does_not_support_overprovisioning"
    ]
   },
   "xdsConfig": [
    {
     "clusterConfig": {
      "versionInfo": "1",
      "dynamicActiveClusters": [
       {
        "versionInfo": "1",
        "cluster": {
         "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
         "name": "cluster_name",
         "type": "EDS",
         "edsClusterConfig": {
          "edsConfig": {
           "ads": {}
          },
          "serviceName": "eds_service_name"
         }
        },
        "lastUpdated": "2021-03-31T22:39:41.965670143Z",
        "clientStatus": "ACKED"
       }
      ]
     }
    },
    {
     "endpointConfig": {
      "dynamicEndpointConfigs": [
       {
        "versionInfo": "1",
        "endpointConfig": {
         "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment",
         "clusterName": "eds_service_name",
         "endpoints": [
          {
           "locality": {
            "region": "xds_default_locality_region",
            "zone": "xds_default_locality_zone",
            "subZone": "locality0"
           },
           "lbEndpoints": [
            {
             "endpoint": {
              "address": {
               "socketAddress": {
                "address": "127.0.0.1",
                "portValue": 19123
               }
              }
             }
            }
           ],
           "loadBalancingWeight": 3
          }
         ]
        },
        "lastUpdated": "2021-03-31T22:39:41.976670220Z",
        "clientStatus": "ACKED"
       }
      ]
     }
    },
    {
     "listenerConfig": {
      "versionInfo": "1",
      "dynamicListeners": [
       {
        "name": "server.example.com",
        "activeState": {
         "versionInfo": "1",
         "listener": {
          "@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
          "name": "server.example.com",
          "apiListener": {
           "apiListener": {
            "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
            "rds": {
             "configSource": {
              "ads": {}
             },
             "routeConfigName": "route_config_name"
            },
            "httpFilters": [
             {
              "name": "router",
              "typedConfig": {
               "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
              }
             }
            ]
           }
          }
         },
         "lastUpdated": "2021-03-31T22:39:41.943670219Z"
        },
        "clientStatus": "ACKED"
       }
      ]
     }
    },
    {
     "routeConfig": {
      "dynamicRouteConfigs": [
       {
        "versionInfo": "1",
        "routeConfig": {
         "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
         "name": "route_config_name",
         "virtualHosts": [
          {
           "domains": [
            "*"
           ],
           "routes": [
            {
             "match": {
              "prefix": ""
             },
             "route": {
              "cluster": "cluster_name"
             }
            }
           ]
          }
         ]
        },
        "lastUpdated": "2021-03-31T22:39:41.954670206Z",
        "clientStatus": "ACKED"
       }
      ]
     }
    }
   ]
  }
 ]
}

This change is Reviewable

@lidizheng lidizheng added lang/c++ release notes: no Indicates if PR should not be in release notes labels Mar 31, 2021
@lidizheng lidizheng requested a review from menghanl March 31, 2021 22:42
@lidizheng lidizheng requested a review from markdroth as a code owner March 31, 2021 22:42
@markdroth
Copy link
Member

I don't understand what this means:

After the update, the timestamp is back to normal instead of "last_updated": "1970-01-21T22:53:48.202451705Z",.

Can you please explain what the actual problem here is and how this PR fixes it? Thanks!

@sergiitk
Copy link
Member

sergiitk commented Apr 1, 2021

@markdroth 1970-01-21T22:53:48.202451705Z is incorrectly converted unix timestamp 0: 1970-01-01T00:00:00.000000000Z.

Copy link
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

Ah, okay -- so the problem is that it converts to the wrong time. Makes sense.

Thanks for the fix, Lidi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/c++ release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants