Skip to content

traffic_ctl - Implement server status command option. #12183

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

Merged
merged 2 commits into from
Apr 22, 2025

Conversation

brbzull0
Copy link
Contributor

With the removal of traffic_manager we lost this command option, so now this change makes ATS to respond the rpc call with some basic TSSystemState Information, like intimidation status, draining status, etc. The output is a simple json output.
Command option is read only, no change is done in the internal ATS state.

Example:

$ traffic_ctl server status | jq
{
    "initialized_done": "true",
    "is_ssl_handshaking_stopped": "false",
    "is_draining": "false",
    "is_event_system_shut_down": "false"
}

This also includes some autests to validate the output. Changes to existing traffic_ctl autest machinery is made to make it simpler to extend and add more tests.

A clean up on features that makes no more sense to handle using traffic_ctl(like restart, etc) is also done in this PR. This was implemented when we had traffic_manager.

With the removal of traffic_manager we lost this command option, so now
this change  makes ATS to respond the rpc call with some basic `TSSystemState`
Information, like intimidation status, draining status, etc.
The output is a simple json output.
Command option is read only, no change is done in the internal ATS state.

Example:

$ traffic_ctl server status | jq
{
    "initialized_done": "true",
    "is_ssl_handshaking_stopped": "false",
    "is_draining": "false",
    "is_event_system_shut_down": "false"
}

This also includes some autests to validate the output. Changes to
existing traffic_ctl autest machinery is made to make it simpler to
extend and add more tests.
@brbzull0 brbzull0 added the traffic_ctl traffic_ctl related work. label Apr 11, 2025
@brbzull0 brbzull0 added this to the 10.2.0 milestone Apr 11, 2025
@brbzull0 brbzull0 self-assigned this Apr 11, 2025
@bneradt bneradt requested a review from cmcfarlen April 14, 2025 22:08
Copy link
Contributor

@cmcfarlen cmcfarlen left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@brbzull0 brbzull0 merged commit 425939c into apache:master Apr 22, 2025
15 checks passed
@cmcfarlen cmcfarlen moved this to For v10.1.0 in ATS v10.1.x Jun 9, 2025
@cmcfarlen cmcfarlen moved this from For v10.1.0 to picked v10.1.0 in ATS v10.1.x Jun 9, 2025
@cmcfarlen cmcfarlen modified the milestones: 10.2.0, 10.1.0 Jun 9, 2025
@cmcfarlen
Copy link
Contributor

Cherry-picked to 10.1.x branch

cmcfarlen pushed a commit that referenced this pull request Jun 9, 2025
* traffic_ctl - Implement server status command option.

With the removal of traffic_manager we lost this command option, so now
this change  makes ATS to respond the rpc call with some basic `TSSystemState`
Information, like intimidation status, draining status, etc.
The output is a simple json output.
Command option is read only, no change is done in the internal ATS state.

Example:

$ traffic_ctl server status | jq
{
    "initialized_done": "true",
    "is_ssl_handshaking_stopped": "false",
    "is_draining": "false",
    "is_event_system_shut_down": "false"
}

This also includes some autests to validate the output. Changes to
existing traffic_ctl autest machinery is made to make it simpler to
extend and add more tests.

* Fix docs

(cherry picked from commit 425939c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
traffic_ctl traffic_ctl related work.
Projects
Status: picked v10.1.0
Development

Successfully merging this pull request may close these issues.

2 participants