-
Notifications
You must be signed in to change notification settings - Fork 547
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
feat: Add rados namespace support to rbd plugin #1035
Conversation
d415b8a
to
402b201
Compare
having |
Mutating a global object frequently strikes me as a "code smell" that should be avoided in general. That's one of the reasons I removed it. I quickly looked at your PR here and see a very common pattern, and since I'm also attempting to refactor how the journal code works, many call sites I've become familiar with over the last few days. In these cases you're calling SetNamespace right before a call to something like volJournal.CheckReservation. Without digging deeper into your changes, I'd suggest altering the journal function arguments and adding namespace there rather than repeatedly mutating the state of the volJournal/etc. FWIW, I'm also trying to break up the functionality such that the operational functions in voljournal.go rely more on local state via a new type rather than the global volJournal/snapJournal values. This means I too will be changing the arguments of the same functions. So this is just a heads up that we're likely to make merge conflicts with each other. I'm not trying to worry or discourage you... just making you aware of it. :-) |
@phlogistonjohn I'll change the journal functions to receive namespace as an argument as you suggested. Thanks! About the refactoring work you mentioned, wouldn't it be better if you do it after this PR? :D |
71ba97a
to
bb1df07
Compare
This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏 |
cb526de
to
8b81a62
Compare
Make sure to operate within the namespace if any given when dealing with rbd images and snapshots and their journals. Signed-off-by: Mehdy Khoshnoody <[email protected]>
A minimal documentation on how to use a rados namespace with rbd. Signed-off-by: Mehdy Khoshnoody <[email protected]>
These test cases are will be executed against a rados namespace. - Create a PVC and bind it to an app. - Resize block PVC and check device size. - Create a PVC clone and bind it to an app. Signed-off-by: Mehdy Khoshnoody <[email protected]>
@Madhu-1 Resolved the conflicts and ready to merged. |
@@ -12,6 +12,12 @@ kind: ConfigMap | |||
# each such cluster in use. | |||
# To add more clusters or edit MON addresses in an existing configmap, use | |||
# the `kubectl replace` command. | |||
# The <rados-namespace> is optional and represents a radosNamespace in the pool. | |||
# If any given all the of the rbd images, snapshots and other metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to me, it feels like we need to reword this and below line @mehdy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! How about this?
"To use a specific rados namespace for your rbd images and snapshots, provide the name of the desired rados namespace".
If you have something else in mind, I'd be glad to use the help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mehdy it looks good to me ! 👍
@mehdy have we opened an issue for this or is it already resolved ?
|
This was an issue with my dev environment. |
@humblec do you have any final comments on this feature? Can we take this in for v3.1.0? |
@mehdy can you removing it from the PR description then? |
@humblec Done 👍 |
@humblec I would suggest testing the backward compatibility before taking it in. |
Merging this manually as discussed in the Slack as the auto merge is blocked for long time. |
merging of ceph#1035 broken the cephcsi building. This commits fixes the build issue. Signed-off-by: Madhu Rajanna <[email protected]>
merging of #1035 broken the cephcsi building. This commits fixes the build issue. Signed-off-by: Madhu Rajanna <[email protected]>
Describe what this PR does
Make sure to operate within the namespace if any given when dealing
with rbd images and snapshots and volume and snapshot journals.
Add some basic e2e tests using a namespace.
Is there anything that requires special attention
Do you have any questions?
No.
Is the change backward compatible?
Yes.
Are there concerns around backward compatibility?
No.
Provide any external context for the change, if any.
Related issues
Mention any github issues relevant to this PR. Adding below line
will help to auto close the issue once the PR is merged.
Fixes: #798
Future concerns
List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.