mgr/volumes: validate subvolume create cmd args#50028
mgr/volumes: validate subvolume create cmd args#50028
Conversation
700c853 to
1cc6a1c
Compare
1cc6a1c to
e48c709
Compare
|
Update: |
|
@mchangir Do we know why the string (subvolume, group) isn't caught before even getting called into the volumes driver? |
AFAICT, its the volumes driver that enforces all the rules on the subvolume and group naming, which, I think, is the right place do such validations |
|
jenkins test make check |
rishabh-d-dave
left a comment
There was a problem hiding this comment.
Looks okay to me.
Right. However, in this case its a empty string that getting passed in. I expected this to be caught before calling into the volumes driver. |
There's a way to mention what are the acceptable characters for a parameter via the Is there a way to mention in the command parameter spec that the argument also needs to be non-empty string ? Where can I find the parameter spec attributes definitions ? |
Something along those lines. I think other mgr modules just might have the similar issues with empty strings. |
I looked up other
The e.g. |
2fae36a to
d189976
Compare
|
changes in https://jenkins.ceph.com/job/ceph-pull-requests/110979/consoleText |
7702dd0 to
0792920
Compare
|
@vshankar this is ready for review |
Please add a test for the fix. |
e41ef18 to
8cf591a
Compare
|
I'll take that back. @mchangir Please have a look at - https://pulpito.ceph.com/vshankar-2023-06-21_05:44:47-fs-wip-vshankar-testing-20230620.131636-testing-default-smithi/7309397/ Seems related to this change. |
e11d782 to
e6fe801
Compare
|
Fixed a bug introduced by commit bf83eaa. The commit had introduced a spurious empty string as a command-line argument to |
|
ping @ljflores |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Milind Changire <mchangir@redhat.com>
tag subvolumegroup and subvolume args with allowempty=false for validation Fixes: https://tracker.ceph.com/issues/58645 Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Milind Changire <mchangir@redhat.com>
e6fe801 to
d27b6ff
Compare
|
rebased |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
ropening... |
test subvolgroup and subvol names and declare empty/whitespace strings as bad names
Fixes: https://tracker.ceph.com/issues/58645
Signed-off-by: Milind Changire mchangir@redhat.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
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 toxjenkins test windows