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

When deleting bdev also delete any namespace using it from OMAP. #208

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

gbregman
Copy link
Contributor

@gbregman gbregman commented Aug 31, 2023

Fixes #145

The SPDK automatically delete any namespace using a bdev which is deleted. But there is no such mechanism for the OMAP file. So, we need the CLI to take care of that and whenever a bdev is deleted to also delete any namespace using it. The default behavior is to fail the delete_bdev command with EBUSY in case a namespace is still using it. The user should explicitly remove any such namespace. In case "--force" (or "-f") is used in the delete_bdev command line the namespaces would get deleted automatically.

@gbregman gbregman requested a review from baum August 31, 2023 13:27
@gbregman
Copy link
Contributor Author

@baum , @trociny sorry for the confusion. I managed to destroy PR 201 so recreated it here.

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think --no-namespaces option is not needed. Your point about "safe mechanism just in case" does not look convincing to me, especially when we are at so early stage of the project, otherwise we would need to add millions of "just in case" options like this.

Another thing I missed in my first review, I don't think it is right to do this in cli. It should be done on the server. One may use grpc instead of cli to configure the gateway.

@gbregman
Copy link
Contributor Author

@trociny , adding a mechanism to disable such features is something I learnt from experience. Not once we got stuck with such automatic actions in the field where something went wrong only to realize there was no way to disable them. So I always add such a disabling option. As this is optional the users can just ignore it.

I'll get back to you about the other issue of moving the code. I need to consult my teammates about that.

@gbregman gbregman removed the request for review from baum August 31, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

omap key value still has bdev entry in the namespace - after bdev is deleted from cli
4 participants