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

tier: Add force flag to remove a tier #301

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

vadmeste
Copy link
Member

Sometimes, the tier is down or its address change and we could have
many reasons why it is not possible to reach the tier server during removal
of a tier. For that, we need to add a force flag.

@harshavardhana
Copy link
Member

what are the consequences of doing this wrong?

@vadmeste
Copy link
Member Author

what are the consequences of doing this wrong?

for now, it is not possible to re-add the tier again. Currently if the tier contains some data, then the removal will not work until the user removes the data manually from the tier. However, there are some other corner cases, like the tier is down (like a user decided to kill the tiering itself). You can never remove this tier configuration in MinIO side in that case.

@harshavardhana
Copy link
Member

for now, it is not possible to re-add the tier again. Currently if the tier contains some data, then the removal will not work until the user removes the data manually from the tier. However, there are some other corner cases, like the tier is down (like a user decided to kill the tiering itself). You can never remove this tier configuration in MinIO side in that case.

yes but this is disastrous, all the data that exists on the hot-tier will become stale and dangling.

I don't think we need this feature at all.

@vadmeste
Copy link
Member Author

vadmeste commented Sep 2, 2024

I don't think we need this feature at all.

Well, it is a force flag, we can require --dangerous in addition to --force in mc.

mc ilm tier remove <ALIAS> AZTIER --force --dangerous

I said there are some scenarios where you cannot remove the existing tier anymore, like a user who shutdowns the tier before removing the tier config in MinIO, the tier configuration will be stuck in MinIO forever.

@harshavardhana
Copy link
Member

I don't think we need this feature at all.

Well, it is a force flag, we can require --dangerous in addition to --force in mc.

mc ilm tier remove <ALIAS> AZTIER --force --dangerous

I said there are some scenarios where you cannot remove the existing tier anymore, like a user who shutdowns the tier before removing the tier config in MinIO, the tier configuration will be stuck in MinIO forever.

Then we can make this a hidden feature in mc, there is no good reason user should do that.

It's a data loss scenario and it's not a daily use behavior.

tier.go Outdated Show resolved Hide resolved
tier.go Outdated Show resolved Hide resolved
Sometimes, the tier is down or its address change and we could have many
reasons why it is not possible to reach the tier server during removal
of a tier. For that, we need to RemoveTier API with a force flag.
@harshavardhana harshavardhana merged commit 793e1bf into minio:main Sep 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants