Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v24.2.x] admin: add cloud_storage_cache_size check to config_multi_property_validation() #23357

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #23337

To encapsulate the logic for validating a `cluster` level configuration
for the properties `cloud_storage_cache_size` and `cloud_storage_cache_size_percent`.

The following configurations are determined to be invalid:
   1. `cloud_storage_cache_size` and `cloud_storage_cache_size_percent`
      cannot both be 0
   2. `cloud_storage_cache_size` cannot be 0 while
      `cloud_storage_cache_size_percent` is nil (`std::nullopt`)

(cherry picked from commit ff73a96)
To prevent the invalid configuration of `cloud_storage_cache_size`
and `cloud_storage_cache_size_percent` both equal to 0, add a new check
to the `admin` server validation post `patch_cluster_config_handler()` call.

Validation is performed at the admin endpoint level to prevent users from
configuring the cluster settings to one of these invalid states, which would
result in the cloud cache calculating its max size as 0.

(cherry picked from commit d4674d6)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Sep 18, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Sep 18, 2024
@WillemKauf WillemKauf merged commit df69dc5 into redpanda-data:v24.2.x Sep 18, 2024
20 checks passed
@BenPope BenPope modified the milestones: v24.2.x-next, v24.2.5 Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants