server: add handler for dumping out eds#11577
Conversation
Signed-off-by: Yutong Li <yutongli@google.com>
|
Should we add additional parameter like |
Signed-off-by: Yutong Li <yutongli@google.com>
For now, just like other xDS, it is implemented as automatically dumping out. |
Signed-off-by: Yutong Li <yutongli@google.com>
source/server/admin/admin.cc
Outdated
| for (const auto& key_callback_pair : config_tracker_.getCallbacksMap()) { | ||
| Envoy::Server::ConfigTracker::CbsMap callbacks_map = std::move(config_tracker_.getCallbacksMap()); | ||
| if (!server_.clusterManager().clusters().empty()) { | ||
| callbacks_map.emplace("endpoint", [this] { return dumpEndpointConfigs(); }); |
There was a problem hiding this comment.
since dumpEndpontConfigs is not fully completed, should we defer this and changes in addResourceToDump to the next PR? Otherwise, anyone doing config dump will get incomplete EDS. @htuch WDYT?
There was a problem hiding this comment.
Yeah, that's fair enough. Or you could use a runtime feature flag to control this behavior. https://github.com/envoyproxy/envoy/blob/master/CONTRIBUTING.md#runtime-guarding. Might be overkill.
htuch
left a comment
There was a problem hiding this comment.
It might be worth just doing the full EDS dump support in a single PR. In general, small PRs are good, but it's hard to see how this is going to be tested etc. until we have the more complete implementation.
source/server/admin/admin.cc
Outdated
| for (const auto& key_callback_pair : config_tracker_.getCallbacksMap()) { | ||
| Envoy::Server::ConfigTracker::CbsMap callbacks_map = std::move(config_tracker_.getCallbacksMap()); | ||
| if (!server_.clusterManager().clusters().empty()) { | ||
| callbacks_map.emplace("endpoint", [this] { return dumpEndpointConfigs(); }); |
There was a problem hiding this comment.
Yeah, that's fair enough. Or you could use a runtime feature flag to control this behavior. https://github.com/envoyproxy/envoy/blob/master/CONTRIBUTING.md#runtime-guarding. Might be overkill.
|
@Rainton the suggestion from @ramaraochavali is reasonable, since this might dump a ton of data, so being able to make it opt-in is good. |
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
This reverts commit 2d434b0. Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
|
/retest |
|
🐴 hold your horses - no failures detected, yet. |
Signed-off-by: Yutong Li <yutongli@google.com>
|
@htuch I've updated a more complete version. For now, EDS config can be dumped completely except the missing fields with the parameter As mentioned in the description, these fields are missing in the
|
|
|
||
| message DynamicEndpointConfig { | ||
| // This is the per-resource version information. This version is currently taken from the | ||
| // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the |
There was a problem hiding this comment.
If this is not implemented, probably the second sentence can be removed?
param, rename shouldIncludeEdsInDump() Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: Yutong Li <yutongli@google.com>
|
/retest |
|
🐴 hold your horses - no failures detected, yet. |
EDS config has been added to config_dump in envoyproxy#11425 and implemented in envoyproxy#11577 . Risk Level: Low Testing: N/A Signed-off-by: Yutong Li <yutongli@google.com>
/config_dump API now supports dumping out EDS while using parameter ?include_eds
Add help method dumpEndpointConfigs() to dump out EDS in /config_dump by calling this method in the handler handlerConfigDump()
This will dump out envoy::admin::v3::EndpointsConfigDump by generating envoy::config::endpoint::v3::ClusterLoadAssignment based on data stored in server_.clusterManager().clusters()
Missing Field:
- ClusterLoadAssignment
- Policy
- endpoint_stale_after
- StaticEndpointConfig
- last_updated
- DynamicEndpointConfig
- version_info
- last_updated
Risk Level: Medium
Testing: add unit test, integration test
Docs Changes: operations_admin_interface
Release Notes: N/A
Part of fixing envoyproxy#3362
Signed-off-by: Yutong Li <yutongli@google.com>
EDS config has been added to config_dump in envoyproxy#11425 and implemented in envoyproxy#11577 . Risk Level: Low Testing: N/A Signed-off-by: Yutong Li <yutongli@google.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
/config_dump API now supports dumping out EDS while using parameter ?include_eds
Add help method dumpEndpointConfigs() to dump out EDS in /config_dump by calling this method in the handler handlerConfigDump()
This will dump out envoy::admin::v3::EndpointsConfigDump by generating envoy::config::endpoint::v3::ClusterLoadAssignment based on data stored in server_.clusterManager().clusters()
Missing Field:
- ClusterLoadAssignment
- Policy
- endpoint_stale_after
- StaticEndpointConfig
- last_updated
- DynamicEndpointConfig
- version_info
- last_updated
Risk Level: Medium
Testing: add unit test, integration test
Docs Changes: operations_admin_interface
Release Notes: N/A
Part of fixing envoyproxy#3362
Signed-off-by: Yutong Li <yutongli@google.com>
Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Added an node field to csds request to identify the CSDS client to the CSDS server, and removed the [#not-implemented-hide:] for the endpoint_config since it has been implemented in #11577 Risk Level: Low Testing: N/A Docs Changes: N/A Release Notes: N/A Signed-off-by: Yutong Li <yutongli@google.com>
Commit Message:
/config_dumpAPI now supports dumping out EDS while using parameter?include_edsAdd help method
dumpEndpointConfigs()to dump out EDS in /config_dump by calling this method in the handlerhandlerConfigDump()This will dump out
envoy::admin::v3::EndpointsConfigDumpby generatingenvoy::config::endpoint::v3::ClusterLoadAssignmentbased on data stored inserver_.clusterManager().clusters()Missing Field:
Additional Description:
Risk Level: Medium
Testing: add unit test, integration test
Docs Changes: operations_admin_interface
Release Notes: N/A
Part of fixing #3362
/cc @fuqianggao @alexburnos
Signed-off-by: Yutong Li yutongli@google.com