brbzull0 commented on PR #12752:
URL: https://github.com/apache/trafficserver/pull/12752#issuecomment-3666994376

   > 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.
   
   
   
   Let me add a bit of context:
   
   ```
   $ traffic_ctl config diff --records
   records:
     diags:
       debug:
         enabled: 1  # default: 0
         tags: rpc|http|ssl|config$|filem # default: http|dns
       show_location: 2  # default: 1
     exec_thread:
       autoconfig:
         enabled: 0  # default: 1
       limit: 1  # default: 2
     http:
       connect:
         down:
           policy: 0  # default: 2
   
   ```
   
   note the `# default X` beside each value. This values are what is 
[set](https://github.com/apache/trafficserver/blob/fcd0827045dd3da6a2342715bb7e94d5c8322955/src/records/RecordsConfig.cc#L40)
 at compile time and used as default if nothing set in the record.yaml. 
   So you have the running value(if changed) and the default value, the reset 
basically means, let's set what's changed in the records.yaml to it's default 
value.
   This only affect `records` for now.
   
   
   How this is useful? This actually came from a need I had when testing some 
cve bugs, a simple flow would be.
   
   1 - I have a working ATS running,  with my own config.
   2 - A patch/use case/bug needs to be tested. More likely without all our 
local changes in the records.yaml. 
   3 (new)- Run `traffic_ctl config reset` and it will *only* change the values 
a runtime,  once you restart ats, it will still use records.yaml.
   
   Without this feature, you would need to copy/save/edit your records.yaml  
just to do the test, instead of just run reset.
   
   Thanks.
   
   
   ``NOTE``: `traffic_ctl config diff --records` the `--records` option is 
misleading in this case as in this case it refers to the format of the 
output(legacy, backguard compatibility)... honestly should be `--yaml` or 
something else.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to