Skip to content

admin: downgrade identical-license log from info to debug#30188

Merged
david-yu merged 4 commits into
devfrom
dyu/admin-identical-license-debug-log
Apr 17, 2026
Merged

admin: downgrade identical-license log from info to debug#30188
david-yu merged 4 commits into
devfrom
dyu/admin-identical-license-debug-log

Conversation

@david-yu
Copy link
Copy Markdown
Contributor

@david-yu david-yu commented Apr 16, 2026

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 returns 200 OK without invoking the feature manager. This idempotency behaviour is intentional.

However, the log emitted on this path was at info level:

admin_api_server - server.cc:2631 - Attempted to load identical license, doing nothing: [Version: 0, Organization: Deloitte, Type: enterprise, Expiry(epoch): 1807834065]

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 info to debug. Operators who want visibility into the idempotency path can enable debug logging for admin_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

  • New unit test feature_table_identical_license_idempotency in //src/v/features/tests:feature_table_test verifies the license-equality comparison that gates this path: same license matches, mutated license does not
  • bazel test //src/v/features/tests:feature_table_test passes
  • bazel build //src/v/redpanda/admin:admin passes

Release Notes

Improvements

  • Downgrade the Attempted to load identical license, doing nothing admin API log from info to debug to reduce log noise when operators or automation re-apply the same enterprise license on a schedule.

Generated with Claude Code

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>
Comment thread src/v/features/tests/feature_table_test.cc Outdated
david-yu and others added 2 commits April 15, 2026 22:54
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>
@david-yu david-yu marked this pull request as ready for review April 16, 2026 15:54
@david-yu
Copy link
Copy Markdown
Contributor Author

Marking ready for review based on discussion in help-core.

@david-yu
Copy link
Copy Markdown
Contributor Author

Ok not to backport as this is a behavior change.

@WillemKauf
Copy link
Copy Markdown
Contributor

The historical reason for this log line being at INFO is documented in #8195:

Fix for an issue that manifested to a customer in newer versions of redpanda, where licenses could not be re-uploaded. The cause occurres when comparing two security::licenses via operator==.

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.

@WillemKauf WillemKauf requested a review from dotnwat April 16, 2026 18:37
@david-yu david-yu enabled auto-merge April 17, 2026 02:37
@david-yu david-yu merged commit 3402cf3 into dev Apr 17, 2026
19 checks passed
@david-yu david-yu deleted the dyu/admin-identical-license-debug-log branch April 17, 2026 03:54
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.

4 participants