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
mgr/nfs: adjust export creation CLI args, and allow rgw user exports #43611
Conversation
0b4864c
to
6262367
Compare
|
do we need a tracker ticket for this PR to make it easier for pacific backport? |
|
@liewegas In the GUI we dropped the rgw user id selection because the rgw user was not customizable: the bucket was used as the path and the bucket owner as the user. Can you give more context here on what are the implications for the Dashboard? |
It turns out there are two kinds of NFS exports for RGW: bucket and user. The bucket ones are currently implemented (and you're right--we just use the bucket owner as the user in that case). What I missed was that you can also export an RGW user, in which case the top-level directory is a list of the buckets owned by that user, mkdir creates a bucket, etc. So this PR makes 2 changes:
I forgot about the dashboard implications, as per usual (sigh!). I suspect the UI probably should have a radio box to select the type of export? And make the user optional the bucket case? |
I understand that if both (user & bucket) are passed, it creates an export that:
Is this correct? |
Almost. If you pass both user and bucket, then
I don't think it will create the bucket for you (at least I have not heard of such a thing). If you pass bucket only, then we default to the bucket owner. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
4ed1e43
to
7cce068
Compare
df104aa
to
70b092a
Compare
Signed-off-by: Sage Weil <sage@newdream.net>
70b092a
to
6916abf
Compare
a1e6a78
to
900c6de
Compare
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Put fsname after cluster_id + pseudo_path so that it aligns with the change to the rgw command. Signed-off-by: Sage Weil <sage@newdream.net>
Put bucket name last so that it paves the way for an optional 'user' arg to go along with it. Signed-off-by: Sage Weil <sage@newdream.net>
900c6de
to
4be9b2f
Compare
|
jenkins test make check |
1 similar comment
|
jenkins test make check |
|
@sebastian-philipp @alfonsomthd This is passing tests now! |
4be9b2f
to
428a872
Compare
|
jenkins test api |
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.
one minor issue in the error path, but otherwise lgtm!
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.
Looks good!
- move the bucket / user position after the cluster_id and pseudo_path (since they are optional) - require bucket or user or both - if bucket, use the bucket owner - if bucket+user, use that user - if user only, then export at top-level (all users buckets) Fixes: https://tracker.ceph.com/issues/53134 Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
428a872
to
b6d85e3
Compare
nfs export create rgw, take either bucket or user or both. If we get only the user, do an export for the user that shows buckets at the top level. If bucket+user, then use that user instead of the bucket owner. If bucket only, behavior is as before (use bucket owner as the user).nfs export create cephfsto put the fsname as the last positional argument. This aligns the 2 export create commands so that cluster_id and pseudo_path both come first (which FWIW is more intutive anyway)Note that the change for the
nfs export create cephfscould be dropped, but I think it si worth the potential user breakage to end up with a better CLI.TODO
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox