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

api: add radosNamespace field to CephFsConfigSpec #165

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

iPraveenParihar
Copy link
Contributor

Describe what this PR does

Ceph-CSI now supports storing CephFS OMAP data in a
specified namespace defined in CephFS.radosNamespace
field in ceph-csi-config ConfigMap.
ref: ceph/ceph-csi#4661.

This commit introduces the same by adding the radosNamespace field
to the ClientProfile.ClientProfileSpec.CephFsConfigSpec API.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@iPraveenParihar iPraveenParihar force-pushed the api/cephfs-radosnamespace branch from 3826f7a to 0cc6218 Compare November 4, 2024 08:29
@iPraveenParihar iPraveenParihar marked this pull request as ready for review November 4, 2024 09:07
@iPraveenParihar iPraveenParihar force-pushed the api/cephfs-radosnamespace branch from 0cc6218 to 4933281 Compare November 5, 2024 12:20
Ceph-CSI now supports storing CephFS OMAP data in a
specified namespace defined in CephFS.radosNamespace
field in ceph-csi-config ConfigMap.
ref: ceph/ceph-csi#4661.

This commit introduces the same by adding the radosNamespace field
to the ClientProfile.ClientProfileSpec.CephFsConfigSpec API.

Signed-off-by: Praveen M <[email protected]>
@iPraveenParihar iPraveenParihar force-pushed the api/cephfs-radosnamespace branch from 4933281 to 0154232 Compare November 5, 2024 12:32

//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="radosNamespace is immutable"
//+kubebuilder:validation:Optional
RadosNamespace string `json:"radosNamespace,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

The usage of a Rados namespace for CephFs is sepcificly for OMAP data. The current proposed name for this field does not reflects that. I would suggest the following instead:

Suggested change
RadosNamespace string `json:"radosNamespace,omitempty"`
OmapNamespace string `json:"OmapNamespace,omitempty"`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OMAP are RADOS objects so the term radosNamespace would be more appropriate?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@iPraveenParihar
I am not sure I agree with the lack of distinction. You want the user to specify a rados namespace for the location of the omap data for the cephfs usage. Not just a general rados namespace for general use.

What I am saying is that the name should capture that
Maybe we could agree on OmapRadosNamespace as an alternative?

Choose a reason for hiding this comment

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

It's radosNamespace in cephcsi, let's keep it the same.

Currently it may well be only used for omap usage but it might change in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

User-facing API design is essential for me, there is already past acknowledgment that the Ceph CSI project did not select good names for some of its front-facing configurations. Bringing them as an example does not make a good case.

Regarding the other part of the comment:

  1. we are talking about CephFS, not RBD. RDS is the internal mechanism we use to isolate the omap data. It does not capture the value/intent of using the feature/nob
  2. Using the same field name as we have inside the RBD config section is misleading because in each section the nob had completely different semantics and effects.
  3. Using RadosNamesapce as the nob name will collide with any future nobs that we might need to allow configuration of additional RDS for other metadata the cephcsi or chepfs will allow us to use. We want future proofing against such a case.

Given the above 3 points, we should go with something like OmapRadosNamaspece which captures both the intent of the nob and the entity type this nob is referring to

Choose a reason for hiding this comment

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

User-facing API design is essential for me, there is already past acknowledgment that the Ceph CSI project did not select good names for some of its front-facing configurations. Bringing them as an example does not make a good case.

I completely disagree with the statement Ceph CSI project did not select good names.
You can always open issues at cephcsi to suggest renaming them.

Changing such conventions in above layers only causes confusion.

Regarding the other part of the comment:

  1. we are talking about CephFS, not RBD. RDS is the internal mechanism we use to isolate the omap data. It does not capture the value/intent of using the feature/nob
  2. Using the same field name as we have inside the RBD config section is misleading because in each section the nob had completely different semantics and effects.
  3. Using RadosNamesapce as the nob name will collide with any future nobs that we might need to allow configuration of additional RDS for other metadata the cephcsi or chepfs will allow us to use. We want future proofing against such a case.

Given the above 3 points, we should go with something like OmapRadosNamaspece which captures both the intent of the nob and the entity type this nob is referring to

RadosNamespace is the key we are using for cephfs section in cephcsi, we should keep it the same in cephcsi Operator. It implies cephcsi will use this radosNS for operations, right now it maybe limited to just omap but might change in the future.

If you would like more specific naming, please open issue in cephcsi, we'll change it there, then in Operator. I would prefer this approach instead of introducing new names abruptly in above layers.

Future additional cases can use another specific key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Madhu-1, can you please provide your inputs here?

@@ -31,10 +31,15 @@ type CephFsConfigSpec struct {

//+kubebuilder:validation:Optional
FuseMountOptions map[string]string `json:"fuseMountOptions,omitempty"`

//+kubebuilder:validation:XValidation:rule="self == oldSelf",message="radosNamespace is immutable"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the immutability?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

github-actions bot commented Dec 7, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added stale and removed stale labels Dec 7, 2024
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.

5 participants