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

The organization of clustered/grouped SmbShares #341

Open
cmu-rgrempel opened this issue Jun 4, 2024 · 0 comments
Open

The organization of clustered/grouped SmbShares #341

cmu-rgrempel opened this issue Jun 4, 2024 · 0 comments

Comments

@cmu-rgrempel
Copy link

cmu-rgrempel commented Jun 4, 2024

I am a newbie checking out clustered and grouped shares with version 0.5. I thought I might jot down some first impressions as to how the CRDs are organized for this use case.

I note this passage from the documentation:

There are restrictions on what shares can be grouped together. The operator will perform a compatibility check for shares with explicit groupMode and the same group name. Most importantly, the Shares must share the same securityConfig, the same commonConfig, and same PVC name.

It occurs to me that, when clustered, it must also be the case that the scaling attribute of the grouped SmbShares would need to be identical. It would hardly make sense for one SmbShare in a group to have more nodes than another SmbShare in the same group, for instance.

This need to repeat configuration, and validate the repetition, in each grouped SmbShare strikes me as being a code smell. What it suggests is that there is really a higher-level entity actually being configured here, and that the SmbShare should (at least if grouped) simply refer to the higher-level entity.

Consider, for instance, the idea of an SmbGroup entity. This would basically correspond (ultimately) to a single StatefulSet. This statefulset would either have a single pod (in the simple case), or multiple pods (in the experimental clustered case). And, it would either have one SmbShare (in the simple case) or multiple (in the grouped case).

The settings in SmbCommonConfig and SmbSecurityConfig would then naturally either be settings of the SmbGroup itself, or the SmbGroup could refer to separate SmbConmonConfig and SmbSecurityConfig. In any event, the SmbShare would then indicate which SmbGroup it belongs to. And, of course the scaling properties would move to SmbGroup -- they are really properties of the group, not the individual share.

This would, I think, be clearer and reduce repeititon.

Now, perhaps it would make the very simplest case more complex. That is, in the non-clustered case where the statefulset will server just one share (so, non-clustered and non-grouped), instead of just having an SmbShare you'd also have to have an SmbGroup. However, perhaps the CRD could have a variant for that simple case? Or, it might actually be clearer anyway to explicitly create a group?

I do understand that you've put some thought into this, and that the focus on shares is deliberate. However, I think that it becomes quite conceptually awkward in the case of clustered, grouped shares -- it would be simpler to explicitly have a entity representing the group itself.

I will flesh out the idea better if I have time -- I thought it might be interesting to record a newbie's perspective in any event, for whatever it is worth.

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

No branches or pull requests

1 participant