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.1.x] admin: add cloud_storage_cache_size check to config_multi_property_validation() (manual backport) #23362

Merged

Conversation

WillemKauf
Copy link
Contributor

Manual backport of #23337.
Merge conflict due to unrelated changes in cluster_config_test.py.

Closes #23356

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.2.x
  • v24.1.x
  • v23.3.x

Release Notes

  • none

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)
@WillemKauf WillemKauf merged commit 878aa3a into redpanda-data:v24.1.x Sep 18, 2024
19 checks passed
@r-vasquez r-vasquez modified the milestone: v24.1.x-next Sep 18, 2024
@BenPope BenPope added this to the v24.1.17 milestone Oct 9, 2024
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