Bug 1447684
| Summary: | gluster-swift cannot use volume names having underscore | |||
|---|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Sergi Jimenez Romero <sjr> | |
| Component: | gluster-swift | Assignee: | Venkata R Edara <redara> | |
| Status: | CLOSED ERRATA | QA Contact: | Vivek Das <vdas> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | rhgs-3.1 | CC: | amukherj, pmulay, ppai, redara, rhinduja, rhs-bugs, sasundar, storage-qa-internal, vdas | |
| Target Milestone: | --- | |||
| Target Release: | RHGS 3.3.0 | |||
| Hardware: | Unspecified | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | swiftonfile-2.10.1-1.el7rhgs | Doc Type: | Bug Fix | |
| Doc Text: |
Previously, volume names with underscore symbol [ _ ] could not be used, as swift-gen-builders syntax recognized underscore symbol as a delimiter for device and metadata. With this update, you can now use a verbose syntax with swift-gen-builders and volume names can now contain underscores.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1451998 1502984 (view as bug list) | Environment: | ||
| Last Closed: | 2017-09-21 04:53:18 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1417151, 1451998 | |||
|
Description
Sergi Jimenez Romero
2017-05-03 13:25:43 UTC
RCA
====================
gluster-swift-gen-builders uses swift-ring-builder add, which seperates the devicename and meta with underscore according to following syntax.
swift-ring-builder <builder_file> add
[r<region>]z<zone>-<ip>:<port>[R<r_ip>:<r_port>]/<device_name>_<meta>
<weight>
[[r<region>]z<zone>-<ip>:<port>[R<r_ip>:<r_port>]/<device_name>_<meta>
<weight>] ...
so the swift is thinking the 1st underscore is delimiter and takes device name as "ram" in ram_1234 and treats postfix "1234_
" as meta info. The actual problem is not in gluster-swift , it is in swift syntax itself, which unpickles the device name which is prefix part of "_" .
we can exclusively specify device name using following syntax in gluster-swift-gen-builders. This fixes the problem.
swift-ring-builder <builder_file> add --region <region> --zone <zone> --ip <ip or hostname> --port <port>
[--replication-ip <r_ip or r_hostname>] [--replication-port <r_port>]
--device <device_name> --weight <weight>
[--meta <meta>]
Before Fixing the problem: volume name is "ram_1234"
===============================================
root@localhost swift]# /usr/bin/gluster-swift-gen-builders -v ram_1234
WARNING: No region specified for z1-127.0.0.1:6012/ram_1234_. Defaulting to region 1.
Device d0r1z1-127.0.0.1:6012R127.0.0.1:6012/ram_"1234_" with 100.0 weight got id 0
Reassigned 2 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
account.builder, build version 2
2 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1 (0:59:59 remaining)
The overload factor is 0.00% (0.000000)
Ring file account.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta
0 1 1 127.0.0.1:6012 127.0.0.1:6012 ram 100.00 2 0.00 1234_
After changing gluster-swift-gen-builders with following syntax in add function
swift-ring-builder $1 add --region 1 --zone $2 --ip 127.0.0.1 --port $3 --device $4 --meta "_" --weight 100.0
After Fixing gluster-swift-gen-builders:
==========================================
[root@localhost swift]# /usr/bin/gluster-swift-gen-builders -v ram_1234
Device d0r1z1-127.0.0.1:6012R127.0.0.1:6012/ram_1234_"_" with 100.0 weight got id 0
Reassigned 2 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
account.builder, build version 2
2 partitions, 1.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1 (0:59:59 remaining)
The overload factor is 0.00% (0.000000)
Ring file account.ring.gz is up-to-date
Devices: id region zone ip address:port replication ip:port name weight partitions balance flags meta
0 1 1 127.0.0.1:6012 127.0.0.1:6012 ram_1234 100.00 2 0.00 _
Now the device_name is ram_1234, for which we can create buckets/objects.
using swift3
After fixing the problem , creating bucket is successful. root@localhost s3-curl]# ./s3curl.pl --id 'ram_1234' --key 'blah' --put /dev/null -- -k -v -s http://localhost:8080/bucket Will sleep and continue despite this problem. Please set up /root/.s3curl for future requests. * Trying ::1... * connect to ::1 port 8080 failed: Connection refused * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) > PUT /bucket HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/7.47.1 > Accept: */* > Transfer-Encoding: chunked > Date: Fri, 05 May 2017 08:27:54 +0000 > Authorization: AWS ram_1234:+VyXRN8SJ+hfNhJqn4be/lR0VpI= > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 200 OK < x-amz-id-2: txe9850a52e6024c07abae2-00590c378a < Content-Length: 0 < x-amz-request-id: txe9850a52e6024c07abae2-00590c378a < Content-Type: text/html; charset=UTF-8 < Location: /bucket < X-Trans-Id: txe9850a52e6024c07abae2-00590c378a < Date: Fri, 05 May 2017 08:27:54 GMT < Code Review link : https://review.gluster.org/#/c/17236/ Generated build , please grab swiftonfile-2.10.1-1.el7rhgs and test it on Openstack Newton 2.10.1 release Doctext looks good. Minor changes in Doc Text based on Peer review. 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. https://access.redhat.com/errata/RHBA-2017:2784 |