-
Notifications
You must be signed in to change notification settings - Fork 6k
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
rbd: when Ceph cluster is full, return -ENOSPC for creating image command. #14167
Conversation
@dillaman Please help take a look, thanks! |
Just curious, how can we decide a action should set_osdmap_full_try() or not? So far, I think remove and snap remove looks reasonable to me. But why create? If create should not be blocked, what about other actions? resize? list? What's the policy for this? |
list, resize, won't be blocked at this moment, because they are not in "write" path. |
wait a minute, resize will not be blocked? how can I request a larger size when the cluster is full? |
rbd image is thin-provisioned, "resize" will only change the value of metadata, won't really change the size. |
But it's a "write" on header object, refer to this: and I got a block in my testing.
|
cool, good catch. I want to fix create at this moment, and fix other write related commands together later. |
I am just wondering, what the kind of the actions should be blocked, just data writing? I don't think it's a good idea to set_osdmap_full_try() on actions one by one. |
@yangdongsheng While I also agree that this continued effort has the potential to get beyond ridiculous real fast when the simple solution is don't run with clusters at 100% capacity, we cannot just set the flag on |
@liupan1111 That first commit against the osdc should be a separate PR for the core team to review. What exactly is the bug you are fixing? |
One thing just want to clarify is: not 100% capacity, just full, which is controlled by mon_osd_full_ratio(default 95%). |
@liupan1111 Understood -- but it's one thing to support freeing up space from your cluster when you are full and it's another to try to work around every possible way to touch images when full. |
@dillaman Agree, so how about I just leave the second commit in this pr, and move the first one into a new PR? |
@liupan1111 Perfect, thanks |
…mand. Signed-off-by: Pan Liu <liupan1111@gmail.com>
@dillaman done, thanks. |
@dillaman ping |
@liupan1111 I agree w/ @yangdongsheng in that we don't want to keep adding these things one-by-one for each CLI action. It was one thing when it was just to help remove RBD images when the cluster is full, but it's going to be another thing to support any arbitrary RBD action. I think the only way to solve this would be to have a new |
@dillaman , I agree. I also talked with dongsheng offline, and I will think about it. |
As we talked in #14116, I improved "create" path, and return -ENOSPC when cluster is full.