Bug 921215
Summary: | Cannot create volumes with a . in the name | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Alex Wheeler <wheelear> |
Component: | cli | Assignee: | Gaurav Kumar Garg <ggarg> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | pre-release | CC: | bugs, dalemu, ggarg, gluster-bugs, smohan, vbellur, wheelear |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.6.0beta1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-11-11 08:23:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Alex Wheeler
2013-03-13 17:55:02 UTC
Attempted to submit the patch via rfc.sh, and got: ! [remote rejected] HEAD -> refs/for/master/bug-921215 (not Signed-off-by author/committer/uploader) error: failed to push some refs to 'ssh://awheeler.org/glusterfs.git' (In reply to comment #1) > Attempted to submit the patch via rfc.sh, and got: > > ! [remote rejected] HEAD -> refs/for/master/bug-921215 (not Signed-off-by > author/committer/uploader) > error: failed to push some refs to > 'ssh://awheeler.org/glusterfs.git' Please use git commit --amend -s and then submit the patch via rfc.sh. Looks like my patch missed a few things, and while create works, start does not. Continuing to look, but this might be outside of my ability to fix. Here is the output from the brick log: [2013-03-13 22:59:57.518518] E [glusterfsd-mgmt.c:1559:mgmt_getspec_cbk] 0-glusterfs: failed to get the 'volume file' from server [2013-03-13 22:59:57.518612] E [glusterfsd-mgmt.c:1627:mgmt_getspec_cbk] 0-mgmt: failed to fetch volume file (key:5.fobo.r3master.dyn.vpc31.opt-export-5fobo) Suggesting a patch:- The CLI, currently (on branch rhs-2.1), verifies the volume name is made up of alpha numeric characters, underscore or hyphen in cli-cmd-parser.c. If not the CLI exits without printing an error message. i.e. 215 for (i = 0; i < strlen (volname); i++) 216 if (!isalnum (volname[i]) && (volname[i] != '_') && (volname[i] != '- ')) 217 goto out; With the following patch the CLI informs the user a volume name may not contain an unsupported character. diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 2741f7b..02b63a0 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -213,8 +213,11 @@ cli_cmd_volume_create_parse (const char **words, int wordcount, dict_t **opti goto out; for (i = 0; i < strlen (volname); i++) - if (!isalnum (volname[i]) && (volname[i] != '_') && (volname[i] != '-')) + if (!isalnum (volname[i]) && (volname[i] != '_') && (volname[i] != '-')) + cli_err ("Volume name may not contain a \"%c\"", + volname[i]); goto out; + } } if (wordcount < 4) { Example output: # /usr/local/sbin/gluster volume create vol.abc transport tcp axum:/home/dalemu/play/brick7 Volume name may not contain a "." Usage: volume create <NEW-VOLNAME> [stripe <COUNT>] [replica <COUNT>] [transport <tcp|rdma|tcp,rdma>] <NEW-BRICK> ... [force] REVIEW: http://review.gluster.org/7364 (solved bug 921215 "can not create volume with a . in the name" by editing line no 210 and 531 in cli/src/cli-cmd-parser.c file) posted (#1) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (BZ 921215 - "can not create volume with a . in the name") posted (#2) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7363 ( i have change cli file for bug id 921215) posted (#2) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (BZ 921215 - "can not create volume with a . in the name") posted (#3) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (BZ 921215 - "can not create volume with a . in the name") posted (#4) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (cli: this patch will show error message when volume name contain "." in volume name) posted (#5) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (cli: Error out when character "." is available in volume name) posted (#6) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (cli: Error out when character "." is available in volume name) posted (#7) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (cli: Error out when character "." is available in volume name) posted (#8) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (cli: Error out when character "." is available in volume name) posted (#9) for review on master by Gaurav Kumar Garg (ggarg) REVIEW: http://review.gluster.org/7364 (cli: Error out when character "." is available in volume name) posted (#10) for review on master by Gaurav Kumar Garg (ggarg) COMMIT: http://review.gluster.org/7364 committed in master by Vijay Bellur (vbellur) ------ commit a3c12fdabea5ee77ab95bc65962e56083b7d0fa6 Author: ggarg <ggarg> Date: Fri Mar 28 12:23:17 2014 +0530 cli: Error out when character "." is available in volume name previously it was failed without showing any information why it is failed. Now with this fix, when "." or any non alphanumeric character present in volume name, it will give error messages Change-Id: I17e8e69c08345c4d760f3ba333fe841e754bc9c8 BUG: 921215 Signed-off-by: ggarg <ggarg> Reviewed-on: http://review.gluster.org/7364 Reviewed-by: Humble Devassy Chirammal <humble.devassy> Reviewed-by: Atin Mukherjee <amukherj> Reviewed-by: Vijay Bellur <vbellur> Tested-by: Gluster Build System <jenkins.com> REVIEW: http://review.gluster.org/7831 (Added a space in the error message, while creating volume with its name containing a period (.)) posted (#1) for review on master by Satheesaran Sundaramoorthi (satheesaran) A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED. Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution. [1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html [2] http://supercolony.gluster.org/pipermail/gluster-users/ This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.6.1, please reopen this bug report. glusterfs-3.6.1 has been announced [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html [2] http://supercolony.gluster.org/mailman/listinfo/gluster-users REVIEW: http://review.gluster.org/7831 (cli: format the error message for better reading.) posted (#2) for review on master by Humble Devassy Chirammal (humble.devassy) REVIEW: http://review.gluster.org/7831 (cli: format the error message for better reading.) posted (#3) for review on master by Humble Devassy Chirammal (humble.devassy) REVIEW: http://review.gluster.org/7831 (cli: format the error message for better reading.) posted (#4) for review on master by Humble Devassy Chirammal (humble.devassy) |