Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Jul 31, 2025

Most "enabled" configurations are booleans that toggle on or off a feature. But we have a few that are named "enabled" but actually take an enumeration of values to control behavior. This is confusing terminology. This patch keeps support for the enabled configuration as currently named, adds a new "mode" configuration for these, and deprecates the old "enabled" config in the docs.

proxy.config.ssl.session_cache.enabled was somewhat complicated: with the 10.0.0 release, we implemented it as "value" to try to address the issue of this patch just for that parameter, but kept the "enabled" config description in the docs. So the docs were out of sync with the code. This adds support for "enabled" and immediately deprecates that, since users may have tried to use that, silently keeps support for "value" in case that was used, and adds the now desired "mode" configuration.

If a user passes both the deprecated "enabled" config as well as the new "mode" config, then they must be the same value, otherwise an Emergency message is logged because it is impossible for ATS to discern which value should be used.

Aside from this Emergency log on mismatch just mentioned, this patch should be backwards compatible without introducing any changes in behavior for current configs.

Fixes: #11901

@bneradt bneradt added this to the 10.2.0 milestone Jul 31, 2025
@bneradt bneradt self-assigned this Jul 31, 2025
@bneradt bneradt requested review from brbzull0, ezelkow1 and maskit July 31, 2025 21:15
@bneradt bneradt force-pushed the fix_enable_value_issues branch 2 times, most recently from acd70c4 to cc8a02d Compare July 31, 2025 21:37
Copy link
Member

@maskit maskit left a comment

Choose a reason for hiding this comment

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

The description makes sense. Just one possible error in the change.

@bneradt bneradt force-pushed the fix_enable_value_issues branch 4 times, most recently from e78cef8 to dad9c30 Compare July 31, 2025 22:18
Most "enabled" configurations are booleans that toggle on or off a
feature. But we have a few that are named "enabled" but actually take an
enumeration of values to control behavior. This is confusing
terminology. This patch keeps support for the enabled configuration as
currently named, adds a new "mode" configuration for these, and
deprecates the old "enabled" config in the docs.

proxy.config.ssl.session_cache.enabled was somewhat complicated: with
the 10.0.0 release, we implemented it as "value" to try to address the
issue of this patch just for that parameter, but kept the "enabled"
config description in the docs. So the docs were out of sync with the
code. This adds support for "enabled" and immediately deprecates that,
since users may have tried to use that, silently keeps support for
"value" in case that was used, and adds the now desired "mode"
configuration.

If a user passes both the deprecated "enabled" config as well as the new
"mode" config, then they must be the same value, otherwise an Emergency
message is logged because it is impossible for ATS to discern which
value should be used.

Aside from this Emergency log on mismatch just mentioned, this patch
should be backwards compatible without introducing any changes in
behavior for current configs.

Fixes: apache#11901
@bneradt bneradt force-pushed the fix_enable_value_issues branch from dad9c30 to 5e3b082 Compare August 1, 2025 01:23
@brbzull0
Copy link
Contributor

brbzull0 commented Aug 1, 2025

It seems some of the autest got caught up into the new Emergency mismatch.

Linking this as it had some discussion related to this.

@brbzull0
Copy link
Contributor

brbzull0 commented Aug 1, 2025

100% onboard with this change.
Now I think some may still do things like this, and using the debug.enabled as example as it's probably the most manually record set.

traffic_ctl config set proxy.config.diags.debug.enabled 1

The output would be:

[9] Error during execution
- [2000] Record not found. [2000]

I think would be a good idea, having some mapping for this so if you hit one of the variables in that mapping you could get an error, like:

$ traffic_ctl config set proxy.config.diags.debug.enabled 1
Warning: proxy.config.diags.debug.enabled is deprecated, use proxy.config.diags.debug.mode instead.

We could even have this inside ATS, but not sure how far we wanna go.

@bneradt
Copy link
Contributor Author

bneradt commented Aug 1, 2025

After crawling in the weeds for a while, I think this will be better for the user as a simple rename in 11.x, rather than trying to support both in 10.x:
#12412

@bneradt bneradt closed this Aug 1, 2025
@maskit maskit removed this from ATS v10.1.x Aug 1, 2025
@maskit maskit removed this from the 10.2.0 milestone Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ssl.session_cache.enabled unknown

3 participants