rpk: Add guardrails for Tiered Storage properties#25470
Merged
Lazin merged 3 commits intoredpanda-data:devfrom Apr 3, 2025
Merged
rpk: Add guardrails for Tiered Storage properties#25470Lazin merged 3 commits intoredpanda-data:devfrom
Lazin merged 3 commits intoredpanda-data:devfrom
Conversation
Collaborator
Retry command for Build#63439please wait until all jobs are finished before running the slash command |
Collaborator
CI test resultstest results on build#63439
test results on build#63977
|
r-vasquez
reviewed
Mar 21, 2025
| out.Die("invalid arguments: %v, please use one of 'rpk cluster config set <key> <value>' or 'rpk cluster config set <key>=<value>'", args) | ||
| } | ||
| // Disabling Tiered Storage requires a confirmation from the user because it may lead to data loss. | ||
| if key == "cloud_storage_enable_remote_write" && value == "false" { |
Contributor
There was a problem hiding this comment.
LGTM, however, we should provide a way to avoid these confirmation prompts in the CLI. Similar to what we do in other commands with confirmation prompts.
Example: https://github.com/redpanda-data/redpanda/blob/dev/src/go/rpk/pkg/cli/security/role/delete.go#L71
we use this flag name across rpk
The same comment applies to topic config.
|
@Lazin Not sure what to do with the pause/resume doc PR, as this has not yet been merged. Need some guidance on whether this will be added before GA. thx |
Prompt if the user is trying to set 'cloud_storage_enable_remote_write' to 'false'. This operation is potentialy unsafe because the data loss might occur. The prompt can be avoided by passing '--no-confirm'. This flag is supposed to be used in tests and automation scripts. Signed-off-by: Evgeny Lazin <4lazin@gmail.com>
in case if the user is disabling 'redpanda.remote.write'. This is a potentially dangerous operation that can lead to data loss. The prompt suggest an alternaive for that (safe pause). The '--no-confirm' flag that allows the user to bypass the prompt is added. The flag is supposed to be used in scripts and CI. Signed-off-by: Evgeny Lazin <4lazin@gmail.com>
In order to disable TS the rpk user must provide positive confirmation now. This breaks some tests. In order to avoid this the '--no-confirm' flag is passed to the rpk. Signed-off-by: Evgeny Lazin <4lazin@gmail.com>
2a55c7f to
f47a5a1
Compare
r-vasquez
approved these changes
Apr 1, 2025
Contributor
Author
|
@Feediver1 I'm going to merge this and backport to v25.1.x but it's not part of the RC |
Collaborator
|
/backport v25.1.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prompt the user for confirmation if they are trying to set
cloud_storage_enable_remote_writecluster config to 'false'. Do the same if they're trying to set topic propertyredpanda.remote.writeto 'false'. This operation is potentially unsafe because the data loss might occur if the Tiered Storage was active. In both cases the message saysWarning: disabling Tiered Storage may lead to data loss. If you only want to pause Tiered Storage temporarily, use the 'cloud_storage_enable_segment_uploads' option. Abort?and the default choice isYes. So the warning suggests a safe alternative and in order to use non-safe option the user have to chose it explicitly.This is a part of the safe pause/resume feature - redpanda-data/docs#1017 (docs PR).
Backports Required
Release Notes