gluster-swift cannot use volume names having underscore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
swiftonfile |
New
|
Medium
|
Unassigned |
Bug Description
My Setup:
* Latest "master" branch of gluster-swift source with appropriate Swift
* No authentication filter in pipeline
* Two glusterfs volumes - test and a_b
Steps to reproduce:
[root@pp swift]# gluster volume create a_b pp:/export/eo/eo
volume create: a_b: success: please start the volume to access data
[root@pp swift]# gluster volume start a_b
volume start: a_b: success
[root@pp swift]# gluster-
Ring files are prepared in /etc/swift. Please restart object store services
[root@pp swift]# swift-init main start
Starting proxy-server.
Starting container-
Starting account-
Starting object-
[root@pp swift]# curl -v -X PUT http://
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> PUT /v1/test/c1 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 201 Created
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx248546510ca94
< Date: Fri, 31 Jan 2014 08:00:50 GMT
<
* Connection #0 to host 127.0.0.1 left intact
[root@pp swift]# curl -v -X PUT http://
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> PUT /v1/a_b/c1 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Length: 70
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx734ec22862684
< Date: Fri, 31 Jan 2014 08:00:57 GMT
<
* Connection #0 to host 127.0.0.1 left intact
<html><h1>Not Found</h1><p>The resource could not be found.</p></html>
[root@pp swift]# curl -v -X PUT http://
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> PUT /v1/AUTH_a_b/c1 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Length: 70
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx5030c113255d4
< Date: Fri, 31 Jan 2014 08:01:08 GMT
<
* Connection #0 to host 127.0.0.1 left intact
<html><h1>Not Found</h1><p>The resource could not be found.</p></html>
[root@pp swift]#
Logs:
Jan 31 13:30:50 pp container-server: 127.0.0.1 - - [31/Jan/
Jan 31 13:30:50 pp proxy-server: 127.0.0.1 127.0.0.1 31/Jan/
Jan 31 13:30:57 pp account-server: STDOUT: ERROR:root:No export found in ['gsmetadata', 'test', 'test2', 'a_b'] matching drive, volume_not_in_ring (txn: tx734ec22862684
Jan 31 13:30:57 pp account-server: 127.0.0.1 - - [31/Jan/
Jan 31 13:30:57 pp proxy-server: ERROR Insufficient Storage 127.0.0.
Jan 31 13:30:57 pp proxy-server: Account HEAD returning 503 for [507] (txn: tx734ec22862684
Jan 31 13:30:57 pp proxy-server: Container GET returning 503 for (503,) (txn: tx734ec22862684
Jan 31 13:30:57 pp proxy-server: Could not autocreate account '/a_b' (txn: tx734ec22862684
Jan 31 13:30:57 pp proxy-server: Account HEAD returning 503 for [] (txn: tx734ec22862684
Jan 31 13:30:57 pp proxy-server: 127.0.0.1 127.0.0.1 31/Jan/
Jan 31 13:31:08 pp proxy-server: Account HEAD returning 503 for [] (txn: tx5030c113255d4
Jan 31 13:31:08 pp proxy-server: Container GET returning 503 for (503,) (txn: tx5030c113255d4
Jan 31 13:31:08 pp proxy-server: Could not autocreate account '/AUTH_a_b' (txn: tx5030c113255d4
Jan 31 13:31:08 pp proxy-server: Account HEAD returning 503 for [] (txn: tx5030c113255d4
Jan 31 13:31:08 pp proxy-server: 127.0.0.1 127.0.0.1 31/Jan/
Couple of things noticed the way glluster- swift-gen- builder works with gluster volume names :
Normal account name : "test"
[root@cbox gluster]# gluster- swift-gen- builders -v test 0.0.1:6012/ test_. Defaulting to region 1. 127.0.0. 1:6012R127. 0.0.1:6012/ test_"" with 100.0 weight got id 0 0.0.1:6011/ test_. Defaulting to region 1. 127.0.0. 1:6011R127. 0.0.1:6011/ test_"" with 100.0 weight got id 0 0.0.1:6010/ test_. Defaulting to region 1. 127.0.0. 1:6010R127. 0.0.1:6010/ test_"" with 100.0 weight got id 0
WARNING: No region specified for z1-127.
Device d0r1z1-
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 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 2 0.00
WARNING: No region specified for z1-127.
Device d0r1z1-
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 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 2 0.00
WARNING: No region specified for z1-127.
Device d0r1z1-
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 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 2 0.00
Ring files are prepared in /etc/swift. Please restart object store services
But in a case of gluster volume having underscores in it :
volume name : a_b