admin: downgrade identical-license log from info to debug#30188
Conversation
When an operator re-applies the same enterprise license via PUT /v1/features/license, the handler detects the no-op and returns 200 without touching the feature manager. This is intentional idempotency, but the existing info-level log was surfacing as noise in customer environments — clusters that periodically reapply licenses (e.g. via automation) generate a steady stream of messages that look alarming despite nothing actually changing. Drop the log to debug so operators who care can enable it, while production logs stay clean by default. Adds a unit test covering the license-equality check that gates this path, and that a mutated license does not falsely match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The test was only exercising the compiler-generated equality operator for the license struct — overkill per reviewer feedback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Marking ready for review based on discussion in help-core. |
|
Ok not to backport as this is a behavior change. |
|
The historical reason for this log line being at
So if there was still a bug here, it would go un-reported/undetectable to the user based on the 200 response back from the server. Or, if the user was trying to load a new license but accidentally provided the wrong (previous) license. I don't have a strong enough feeling that this is a huge issue and we can't just merge this, but I do think that its a tricky situation to solve for all cases (even with say, a rate limited log line) and the potential user pitfall with silencing this log line is going to be present. |
Problem
When an operator re-applies the same enterprise license via
PUT /v1/features/license, the handler detects it is a no-op (the loaded license is identical to the one in the request) and returns200 OKwithout invoking the feature manager. This idempotency behaviour is intentional.However, the log emitted on this path was at
infolevel:Clusters that periodically re-apply their license (e.g. via an operator or automation script) generate this message on every application, filling customer logs with what looks like a warning even though nothing went wrong. Several customers have flagged this as noise.
Solution
Downgrade the log from
infotodebug. Operators who want visibility into the idempotency path can enable debug logging foradmin_api_server; production logs are clean by default.Related
This change supersedes the operator-side approach explored in redpanda-data/redpanda-operator#1408, which was closed after analysis concluded: it would save a bit on API calls potentially, while adding to storage and moving the hashing logic client-side. Since core already handles the update as a no-op, the less logic we put in the operator and the more we leverage it mainly for lifecycle orchestration, the better and less brittle it is. Fixing the log level here in core is the simpler, more appropriate fix.
Test plan
feature_table_identical_license_idempotencyin//src/v/features/tests:feature_table_testverifies the license-equality comparison that gates this path: same license matches, mutated license does notbazel test //src/v/features/tests:feature_table_testpassesbazel build //src/v/redpanda/admin:adminpassesRelease Notes
Improvements
Attempted to load identical license, doing nothingadmin API log frominfotodebugto reduce log noise when operators or automation re-apply the same enterprise license on a schedule.Generated with Claude Code