-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
server: add handler for dumping out eds #11577
Conversation
Signed-off-by: Yutong Li <[email protected]>
Should we add additional parameter like |
Signed-off-by: Yutong Li <[email protected]>
For now, just like other xDS, it is implemented as automatically dumping out. |
Signed-off-by: Yutong Li <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
This reverts commit 2d434b0. Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
/retest |
🐴 hold your horses - no failures detected, yet. |
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
@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
|
google.protobuf.Timestamp last_updated = 2; | ||
} | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not implemented, probably the second sentence can be removed?
param, rename shouldIncludeEdsInDump() Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo remaining nits.
Signed-off-by: Yutong Li <[email protected]>
Signed-off-by: Yutong Li <[email protected]>
/retest |
🐴 hold your horses - no failures detected, yet. |
Signed-off-by: Yutong Li <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
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 <[email protected]>
/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 <[email protected]>
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 <[email protected]> Signed-off-by: yashwant121 <[email protected]>
/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 <[email protected]> Signed-off-by: yashwant121 <[email protected]>
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 <[email protected]>
Commit Message:
/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 handlerhandlerConfigDump()
This will dump out
envoy::admin::v3::EndpointsConfigDump
by generatingenvoy::config::endpoint::v3::ClusterLoadAssignment
based 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 [email protected]