trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

traffic_ctl: Add config reset command

Open brbzull0 opened this issue 1 month ago • 1 comments

Adds traffic_ctl config reset to reset configuration records to their default values. Supports both record name format (proxy.config.) and YAML format (records.) for path matching.

There is no new ATS rpc handler needed, it just use the existing API and checks for differences between current value and default value. This can be used eventually to reset any config without changing the semantic, just use whatever config node you need(if able to) change.

This includes Autests.

Examples:

  traffic_ctl config reset records
  traffic_ctl config reset proxy.config.diags.debug.enabled
  traffic_ctl config reset records.diags

brbzull0 avatar Dec 11 '25 14:12 brbzull0

I like this idea but I wonder if it might be confusing that values return to default values as opposed to init values (what the user defined in files which got changed by traffic_ctl). When I think of reset, I think about returning values to the startup state, not the default state (as if I didn't configure anything). This might be a bit nitpicky, just wanted to share my thoughts.

serrislew avatar Dec 16 '25 17:12 serrislew