Skip to content

admin: add /routes endpoint#1450

Closed
junr03 wants to merge 1 commit intosingleton-manager-route-configfrom
routes-admin-endpoint
Closed

admin: add /routes endpoint#1450
junr03 wants to merge 1 commit intosingleton-manager-route-configfrom
routes-admin-endpoint

Conversation

@junr03
Copy link
Copy Markdown
Member

@junr03 junr03 commented Aug 11, 2017

WIP - add a /routes endpoint to print out loaded dynamic route tables

TODO:

  • add params (route_config_name, cluster) to only print selected route tables.
  • save the json rds response in order to print.
  • actually print in the http handler.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

This will be useful... quick question.


if (route_config_provider_manager == nullptr) {
response.add("There are no dynamic route tables currently loaded.");
return Http::Code::OK;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we also dump the static routes? Or is the idea that by dumping config that we already have that?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep, exactly. Dumping the config gives you the static routes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK. BTW, I would strongly recommend saving the proto as seen by rds_api_impl.cc after #1441 instead of the JSON. This will make this forward compatible with the v2 work and it's super easy to print protos to a human readable format (some_proto.DebugString()).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, agreed, let's switch everything to proto saving and dumping. This change should get rebased on that change as well as the singleton change.

@junr03
Copy link
Copy Markdown
Member Author

junr03 commented Aug 15, 2017

closing until #1449 lands.

@junr03 junr03 closed this Aug 15, 2017
@junr03 junr03 deleted the routes-admin-endpoint branch August 24, 2017 21:03
nezdolik pushed a commit to nezdolik/envoy that referenced this pull request May 4, 2024
This removes somewhat controversial intermediate step of sorting heap
profile buckets and fixes issue where heap profiles could get
truncated sometimes. See github issue envoyproxy#1450.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants