[Openstack] swift-get-nodes lies to me?

Pete Zaitcev zaitcev at redhat.com
Sat Mar 10 02:03:26 UTC 2012


Dear All:

A strange thing seems to happen. It looks like this:

- I upload a key named "testdata"

[zaitcev at simbelmyne tests]$ /q/zaitcev/hail/swift-tip/bin/swift -A http://kvm-rei:5000/v1.0 -U zaitcev -K pass list test-1235163301
testdata
[zaitcev at simbelmyne tests]$ 

  I have a script that also finds size (104857600) and MD5
  (49289935f687585f5e95e94c7c1ec29d).

- Then, I run swift-get-node, on the node where proxy resides:

[root at kvm-rei zaitcev]# swift-get-nodes /etc/swift/object.ring.gz zaitcev test-1235163301 testdata

Account         zaitcev 
Container       test-1235163301
Object          testdata


Partition       147444  
Hash            8ffd13698cf92ef170db5db21f5efd9f

Server:Port Device      192.168.129.20:6010 vdb
Server:Port Device      192.168.129.18:6020 vdc
Server:Port Device      192.168.129.18:6010 vdb
Server:Port Device      192.168.129.20:6020 vdc  [Handoff]


curl -I -XHEAD "http://192.168.129.20:6010/vdb/147444/zaitcev/test-1235163301/testdata"
curl -I -XHEAD "http://192.168.129.18:6020/vdc/147444/zaitcev/test-1235163301/testdata"
curl -I -XHEAD "http://192.168.129.18:6010/vdb/147444/zaitcev/test-1235163301/testdata"
curl -I -XHEAD "http://192.168.129.20:6020/vdc/147444/zaitcev/test-1235163301/testdata" # [Handoff]


ssh 192.168.129.20 "ls -lah /srv/node/vdb/objects/147444/d9f/8ffd13698cf92ef170db5db21f5efd9f/"
ssh 192.168.129.18 "ls -lah /srv/node/vdc/objects/147444/d9f/8ffd13698cf92ef170db5db21f5efd9f/"
ssh 192.168.129.18 "ls -lah /srv/node/vdb/objects/147444/d9f/8ffd13698cf92ef170db5db21f5efd9f/"
ssh 192.168.129.20 "ls -lah /srv/node/vdc/objects/147444/d9f/8ffd13698cf92ef170db5db21f5efd9f/" # [Handoff]
[root at kvm-rei zaitcev]# 

- Finally, I actually find the file and verify it:

[root at kvm-rei zaitcev]# find /srv/node/vdc -type f -a -size 104857600c
/srv/node/vdc/objects/221984/51c/d8c8047f0c10449d1a264371874f851c/1331343894.44919.data
[root at kvm-rei zaitcev]# md5sum /srv/node/vdc/objects/221984/51c/d8c8047f0c10449d1a264371874f851c/1331343894.44919.data
49289935f687585f5e95e94c7c1ec29d  /srv/node/vdc/objects/221984/51c/d8c8047f0c10449d1a264371874f851c/1331343894.44919.data
[root at kvm-rei zaitcev]# 

The question is, why the discrepancy? Before I dive into the construction
of the ring, is this a known issue? Or do I do something obviously wrong
with arguments of swift-get-nodes?

Curious,
-- Pete




More information about the Openstack mailing list