swift-get-nodes ValueError on non-legacy rings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Cheng Li |
Bug Description
Using the -P option the `objects-1` dir is correct:
ubuntu@saio:~$ swift-get-nodes -P ec -p 673
Account None
Container None
Object None
Partition 673
Hash None
</snip>
Use your own device location of servers:
such as "export DEVICE=/srv/node"
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
If specified policy by ring, it's wrong:
ubuntu@saio:~$ swift-get-nodes /etc/swift/
Account None
Container None
Object None
Partition 673
Hash None
<snip>
Use your own device location of servers:
such as "export DEVICE=/srv/node"
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
ssh 127.0.0.1 "ls -lah ${DEVICE:
Oh, it also blows up:
ubuntu@saio:~$ swift-get-nodes /etc/swift/
Traceback (most recent call last):
File "/usr/local/
exec(
File "/vagrant/
print_
File "/vagrant/
policy_index = int(ring_
ValueError: invalid literal for int() with base 10: ''
tags: | added: low-hanging-fruit |
Changed in swift: | |
status: | New → Confirmed |
Changed in swift: | |
assignee: | nobody → Cheng Li (shcli) |
change swift-get-nodes ring_name = basename( ring_path) [:len(' ring.gz' )] to ring_name = basename( ring_path) [:-len( '.ring. gz')] will resolve this problem.