trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

11.x: Rename some enabled configs to mode

Open bneradt opened this issue 5 months ago • 1 comments

Per the discussion here: https://github.com/apache/trafficserver/pull/11902

It would be clearer for end users if the configs that are named enabled were booleans. Currently that is the case for many of them, but the following take an enumeration of values that control behavior:

proxy.config.output.logfile.rolling_enabled
proxy.config.mlock_enabled
proxy.config.http.response_server_enabled
proxy.config.log.logging_enabled
proxy.config.log.rolling_enabled
proxy.config.diags.debug.enabled
proxy.config.diags.logfile.rolling_enabled
proxy.config.ssl.session_cache.enabled

Each of these would be better off being renamed to .mode configs.

I briefly attempted to add support for both the .mode versions as well as the enabled versions (see #12409), but this becomes very tricky. What if both are in the config and have different values? Emit an emergency, I thought, because how can ATS decide between them? OK, but be sure to handle the case where one is the implicit default. Oh, and be sure to handle plugin overrides. And be careful with those that are overridable configs. Etc. In the end I thought the rules for supporting both would be more confusing for the user and hard to not implement without bugs.

bneradt avatar Aug 01 '25 16:08 bneradt

To avoid conflicts, I suggest delaying doing this until we are closer to release. The patch is pretty straightforward to just rename them, but will make patches not align when we do. (Don't forget to update our variable names when the configs are updated.)

bneradt avatar Aug 01 '25 16:08 bneradt