Skip to content
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

admin: Support /drain_listeners?graceful #11639

Merged
merged 12 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/root/intro/arch_overview/operations/draining.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ various events. Draining occurs at the following times:
* The server is being :ref:`hot restarted <arch_overview_hot_restart>`.
* Individual listeners are being modified or removed via :ref:`LDS
<arch_overview_dynamic_config_lds>`.
* The server begins shutdown sequence via the :ref:`drain_listeners?graceful
Copy link
Member

Choose a reason for hiding this comment

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

Line 39 below needs updating. Please take a general pass through this page. You have as good an understanding of this as any, and we expect contributors to care for the docs and improve them as they make changes. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, I'm kind of rushing for a deadline and writing docs in markdown was a little confusing. Reorganized a lot of this doc and added more detail.

<operations_admin_interface_drain>` admin endpoint.

Each :ref:`configured listener <arch_overview_listeners>` has a :ref:`drain_type
<envoy_v3_api_enum_config.listener.v3.Listener.DrainType>` setting which controls when draining takes place. The currently
Expand Down
6 changes: 6 additions & 0 deletions docs/root/operations/admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,12 @@ modify different aspects of the server:
:ref:`Listener <envoy_v3_api_msg_config.listener.v3.Listener>` is used to determine whether a listener
is inbound or outbound.

.. http:post:: /drain_listeners?graceful

When draining listeners, enter a graceful drain period prior to closing listeners.
This behaviour and duration is determined by server options for the drain manager, and
Copy link
Member

Choose a reason for hiding this comment

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

Please ref link to the relevant config and CLI options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't figure out how to ref link to the server options, not sure if the ServerInfo proto is what you mean, but I linked the CLI options.

includes sending H1 connection-close, H2 GOAWAYs, and terminating connections on request complete.

.. attention::

This operation directly stops the matched listeners on workers. Once listeners in a given
Expand Down