Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. There is no man page for this very important step of having a RHS-object store setup.I think this should be fixed in the very next update of RHS2.1. [root@dhcp207-149 swift]# man gluster-swift-gen-builders No manual entry for gluster-swift-gen-builders 2. There is no validation check on gluster volumes passed with the command line. [root@dhcp207-149 swift]# gluster-swift-gen-builders notavol1 notavol2 cp: cannot stat `/etc/swift/*.ring.gz': No such file or directory WARNING: No region specified for z1-127.0.0.1:6012/notavol1_. Defaulting to region 1. Device r1z1-127.0.0.1:6012/notavol1_"" with 100.0 weight got id 0 WARNING: No region specified for z2-127.0.0.1:6012/notavol2_. Defaulting to region 1. Device r1z2-127.0.0.1:6012/notavol2_"" with 100.0 weight got id 1 Reassigned 2 (100.00%) partitions. Balance is now 0.00. account.builder, build version 2 2 partitions, 1.000000 replicas, 1 regions, 2 zones, 2 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port name weight partitions balance meta 0 1 1 127.0.0.1 6012 notavol1 100.00 1 0.00 1 1 2 127.0.0.1 6012 notavol2 100.00 1 0.00 mkdir: cannot create directory `/etc/swift/backup_rings': File exists WARNING: No region specified for z1-127.0.0.1:6011/notavol1_. Defaulting to region 1. Device r1z1-127.0.0.1:6011/notavol1_"" with 100.0 weight got id 0 WARNING: No region specified for z2-127.0.0.1:6011/notavol2_. Defaulting to region 1. Device r1z2-127.0.0.1:6011/notavol2_"" with 100.0 weight got id 1 Reassigned 2 (100.00%) partitions. Balance is now 0.00. container.builder, build version 2 2 partitions, 1.000000 replicas, 1 regions, 2 zones, 2 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port name weight partitions balance meta 0 1 1 127.0.0.1 6011 notavol1 100.00 1 0.00 1 1 2 127.0.0.1 6011 notavol2 100.00 1 0.00 mkdir: cannot create directory `/etc/swift/backup_rings': File exists WARNING: No region specified for z1-127.0.0.1:6010/notavol1_. Defaulting to region 1. Device r1z1-127.0.0.1:6010/notavol1_"" with 100.0 weight got id 0 WARNING: No region specified for z2-127.0.0.1:6010/notavol2_. Defaulting to region 1. Device r1z2-127.0.0.1:6010/notavol2_"" with 100.0 weight got id 1 Reassigned 2 (100.00%) partitions. Balance is now 0.00. object.builder, build version 2 2 partitions, 1.000000 replicas, 1 regions, 2 zones, 2 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port name weight partitions balance meta 0 1 1 127.0.0.1 6010 notavol1 100.00 1 0.00 1 1 2 127.0.0.1 6010 notavol2 100.00 1 0.00 [root@dhcp207-149 swift]# gluster volume info Volume Name: test2 Type: Distributed-Replicate Volume ID: 22ac011c-3c38-4093-ba77-a32065e5fd9a Status: Started Number of Bricks: 3 x 2 = 6 Transport-type: tcp Bricks: Brick1: ip1:/mnt/lv4/lv4 Brick2: ip2:/mnt/lv4/lv4 Brick3: ip1:/mnt/lv5/lv5 Brick4: ip2:/mnt/lv5/lv5 Brick5: ip1:/mnt/lv6/lv6 Brick6: ip2:/mnt/lv6/lv6 Volume Name: test Type: Distributed-Replicate Volume ID: 671ee4a2-d5db-44b2-abb7-238617ba17a3 Status: Started Number of Bricks: 3 x 2 = 6 Transport-type: tcp Bricks: Brick1: ip1:/mnt/lv1/lv1 Brick2: ip2/mnt/lv1/lv1 Brick3: ip1:/mnt/lv2/lv2 Brick4: ip2:/mnt/lv2/lv2 Brick5: ip1:/mnt/lv3/lv3 Brick6: ip2:/mnt/lv3/lv3 [root@dhcp207-149 swift]# gluster-swift-gen-builders Please specify the gluster volume name to use. [root@dhcp207-149 swift]# mount /dev/mapper/vg_dhcp207149-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/vda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) 3. There is no check whether the volumes has been mounted under the default directory /mnt/gluster-object(or the one mentioned in the config file) However it has been mentioned as a pre-requisite in the doc. "Here VOLUME is a Red Hat Storage volume which has been mounted locally under the directory mentioned in the configuration files (default value is /mnt/gluster-object)" [root@dhcp207-149 swift]# mount /dev/mapper/vg_dhcp207149-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/vda1 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) [root@dhcp207-149 swift]# gluster-swift-gen-builders test mkdir: cannot create directory `/etc/swift/backup_rings': File exists WARNING: No region specified for z1-127.0.0.1:6012/test_. Defaulting to region 1. Device r1z1-127.0.0.1:6012/test_"" with 100.0 weight got id 0 Reassigned 2 (100.00%) partitions. Balance is now 0.00. account.builder, build version 1 2 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port name weight partitions balance meta 0 1 1 127.0.0.1 6012 test 100.00 2 0.00 mkdir: cannot create directory `/etc/swift/backup_rings': File exists WARNING: No region specified for z1-127.0.0.1:6011/test_. Defaulting to region 1. Device r1z1-127.0.0.1:6011/test_"" with 100.0 weight got id 0 Reassigned 2 (100.00%) partitions. Balance is now 0.00. container.builder, build version 1 2 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port name weight partitions balance meta 0 1 1 127.0.0.1 6011 test 100.00 2 0.00 mkdir: cannot create directory `/etc/swift/backup_rings': File exists WARNING: No region specified for z1-127.0.0.1:6010/test_. Defaulting to region 1. Device r1z1-127.0.0.1:6010/test_"" with 100.0 weight got id 0 Reassigned 2 (100.00%) partitions. Balance is now 0.00. object.builder, build version 1 2 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port name weight partitions balance meta 0 1 1 127.0.0.1 6010 test 100.00 2 0.00 #################### 4.These kind of messages are misleading and should not be there: - "mkdir: cannot create directory `/etc/swift/backup_rings': File exists" 5. This warning message is misleading as it suggest a region should be specified for gluster-swift volume "WARNING: No region specified for z1-127.0.0.1:6012/test_. Defaulting to region 1." 6. IMHO the whole output given with the issue of the command is unnecessary and misleading, there should only be message suggesting the addition of the volume to the ring is successful or not.(like :- vol1, vol2 gluster volumes has been added to the ring successfully and ready to be used as RHS-object-store) Actual results: Expected results: Additional info:
Retargeting for 2.1.z U2 (Corbett) release.
Is this still an issue?
Hi Pushpesh, #1 : Man page for gluster-swift-gen-builder. --Need to discuss with Luis. #2 Validation on the gluster volume names provided. --What kind of validation is expected ? This gluster-swift-gen-builder is a wrapper script over Openstack Swift's ring builder. So is gluster-swift-gen-builder is restricted by swift's validations. ---- I think the gluster-swift-gen-builder's whole point is t provide names to ring to be prepared and has nothing to do with gluster-volume's characteristics. --- #3 Mount check for those gluster volumes is required. It is not expected to have volume mounted prior starting the swift services. Swift services would mount the volumes provided via ring files. Hence I think we can skip this. #4 Misleading messages like : "mkdir: cannot create directory `/etc/swift/backup_rings': File exists" is fixed in master branch (HAVANA) and in the release branch 1.8. And hence should go to grizzly ? http://review.gluster.org/#/c/5658/ http://review.gluster.org/#/c/5667/ #5 Out come of the script is too verbose. -- Yes this can be done. Output cane be directed to NULL device and gluster-swift-gen-builder would only point to the location of the ring files as expected else would throw errors on console. Please update the bug accordingly.
1. Man page is urgent need, as this has been raised in one of the customer issue as well. 2. "mkdir: cannot create directory `/etc/swift/backup_rings': File exists" part has already been fixed, and does not require further attention. 3. In the description for point 2-3 , I still feel either the doc or the behaviour of builder should be changed. The better words for doc would be "The builder unconditionally creates the ring files, for the arguments provided in the command,however it is expected that the same argument names should be used to mount the gluster volumes under the /mnt/gluster-object/ location (or the configured one)." 4. "Yes this can be done. Output cane be directed to NULL device and gluster-swift-gen-builder would only point to the location of the ring files as expected else would throw errors on console." +1 from me.
Code changes have been posted for review. http://review.gluster.org/#/c/6121/
http://review.gluster.org/#/c/6121/ (bug fix) http://review.gluster.org/#/c/6294/ (man page) Additional change for Man page for the utility.
http://review.gluster.org/#/c/6121/ (bug fix master) http://review.gluster.org/#/c/6294/ (man page master) http://review.gluster.org/#/c/6310/ (bug fix havana) http://review.gluster.org/#/c/6352/ (man page havana) are merged. Marking this as Modified.
Looks good to me, marking as verfied. [root@mater ~]# rpm -qa|grep swift gluster-swift-object-1.10.0-2.el6rhs.noarch python-swiftclient-1.4.0-2.el6ost.noarch gluster-swift-1.10.0-2.el6rhs.noarch gluster-swift-proxy-1.10.0-2.el6rhs.noarch gluster-swift-account-1.10.0-2.el6rhs.noarch gluster-swift-plugin-1.10.0-3.el6rhs.noarch gluster-swift-container-1.10.0-2.el6rhs.noarch [root@mater ~]# gluster-swift-gen-builders -h NAME gluster-swift-gen-builders - Registers GlusterFS volumes to be accessed by object storage. SYNOPSIS gluster-swift-gen-builders [-v] [-h] volumes... DESCRIPTION Register GlusterFS volumes to be accessed over OpenStack Swift object storage. OPTIONS -v or --verbose Verbose -h or --help Prints help screen EXAMPLES gluster-swift-gen-builders myvol1 myvol2 -Creates new ring files with myvol1 and myvol2 gluster-swift-gen-builders myvol2 -Creates new ring files by removing myvol1 [root@mater ~]# gluster-swift-gen-builders test test2 Ring files are prepared in /etc/swift. Please restart object store services [root@mater ~]# gluster-swift-gen-builders -v test test2 WARNING: No region specified for z1-127.0.0.1:6012/test_. Defaulting to region 1. Device d0r1z1-127.0.0.1:6012R127.0.0.1:6012/test_"" with 100.0 weight got id 0 WARNING: No region specified for z2-127.0.0.1:6012/test2_. Defaulting to region 1. Device d1r1z2-127.0.0.1:6012R127.0.0.1:6012/test2_"" with 100.0 weight got id 1 Reassigned 2 (100.00%) partitions. Balance is now 0.00. account.builder, build version 2 2 partitions, 1.000000 replicas, 1 regions, 2 zones, 2 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port replication ip replication port name weight partitions balance meta 0 1 1 127.0.0.1 6012 127.0.0.1 6012 test 100.00 1 0.00 1 1 2 127.0.0.1 6012 127.0.0.1 6012 test2 100.00 1 0.00 WARNING: No region specified for z1-127.0.0.1:6011/test_. Defaulting to region 1. Device d0r1z1-127.0.0.1:6011R127.0.0.1:6011/test_"" with 100.0 weight got id 0 WARNING: No region specified for z2-127.0.0.1:6011/test2_. Defaulting to region 1. Device d1r1z2-127.0.0.1:6011R127.0.0.1:6011/test2_"" with 100.0 weight got id 1 Reassigned 2 (100.00%) partitions. Balance is now 0.00. container.builder, build version 2 2 partitions, 1.000000 replicas, 1 regions, 2 zones, 2 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port replication ip replication port name weight partitions balance meta 0 1 1 127.0.0.1 6011 127.0.0.1 6011 test 100.00 1 0.00 1 1 2 127.0.0.1 6011 127.0.0.1 6011 test2 100.00 1 0.00 WARNING: No region specified for z1-127.0.0.1:6010/test_. Defaulting to region 1. Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/test_"" with 100.0 weight got id 0 WARNING: No region specified for z2-127.0.0.1:6010/test2_. Defaulting to region 1. Device d1r1z2-127.0.0.1:6010R127.0.0.1:6010/test2_"" with 100.0 weight got id 1 Reassigned 2 (100.00%) partitions. Balance is now 0.00. object.builder, build version 2 2 partitions, 1.000000 replicas, 1 regions, 2 zones, 2 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 1 Devices: id region zone ip address port replication ip replication port name weight partitions balance meta 0 1 1 127.0.0.1 6010 127.0.0.1 6010 test 100.00 1 0.00 1 1 2 127.0.0.1 6010 127.0.0.1 6010 test2 100.00 1 0.00 Ring files are prepared in /etc/swift. Please restart object store services [root@mater ~]# gluster-swift-gen-builders(8) Red Hat Inc. gluster-swift-gen-builders(8) NAME gluster-swift-gen-builders - Registers GlusterFS volumes to be accessed by OpenStack Swift. SYNOPSIS gluster-swift-gen-builders [-v] [-h] volumes... DESCRIPTION Register GlusterFS volumes to be accessed over OpenStack Swift. OPTIONS -v or --verbose Verbose -h or --help Prints help screen EXAMPLES gluster-swift-gen-builders vol1 vol2 Creates new ring files with vol1 and vol2 gluster-swift-gen-builders vol2 Creates new ring files by removing vol1 gluster-swift-gen-builders -v vol1 Create new ring files with vol1, (Verbose). : gluster-swift-gen-builders -h Displays help screen COPYRIGHT Copyright(c) 2013 RedHat, Inc. <http://www.redhat.com> 18 November 2013 gluster-swift helper utigluster-swift-gen-builders(8) (END)
Doc text : Cause: The enhancement bug for gluster-swift-gen-builders utility. Consequence: Fix: The gluster-swift-gen-builder utility has a man page and more options to work with verbose and non verbose mode. Result:
Pushpesh, The doc text reads like an enhancement and not a bug fix. I had a discussion with Chetan Risbud and he confirmed that this is an enhancement. Can you please confirm? If it is an enhancement, can you please change the "Doc Type" field to "Enhancement"?
I changed the doc type to enhancement.
The doc type change was not getting reflected. So I tried to change it again. Chetan, Is this doc text technically correct? I edited it a bit.
Good to Go.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0208.html