Skip to content

Instantly share code, notes, and snippets.

@notmyname
Created September 24, 2014 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmyname/d0d6c8fe510f1363dd33 to your computer and use it in GitHub Desktop.
Save notmyname/d0d6c8fe510f1363dd33 to your computer and use it in GitHub Desktop.
with patch:
swift@saio:~/bin$ ./remakerings.unbalanced
Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/d1_"" with 10.0 weight got id 0
Device d1r1z1-127.0.0.1:6020R127.0.0.1:6020/d2_"" with 10.0 weight got id 1
Device d2r1z1-127.0.0.1:6080R127.0.0.1:6080/d8_"" with 10.0 weight got id 2
Device d3r1z2-127.0.0.1:6030R127.0.0.1:6030/d3_"" with 10.0 weight got id 3
Device d4r1z2-127.0.0.1:6040R127.0.0.1:6040/d4_"" with 10.0 weight got id 4
Device d5r1z3-127.0.0.1:6070R127.0.0.1:6070/d7_"" with 30.0 weight got id 5
Reassigned 64 (100.00%) partitions. Balance is now 0.00.
Device d6r1z4-127.0.0.1:6090R127.0.0.1:6090/d9_"" with 15.0 weight got id 6
Reassigned 26 (40.62%) partitions. Balance is now 14.24.
-------------------------------------------------------------------------------
NOTE: Balance of 14.24 indicates you should push this
ring, wait at least 0 hours, and rebalance/repush.
-------------------------------------------------------------------------------
Device d7r1z4-127.0.0.1:6100R127.0.0.1:6100/d10_"" with 30.0 weight got id 7
master:
swift@saio:~/bin$ ./remakerings.unbalanced
Device d0r1z1-127.0.0.1:6010R127.0.0.1:6010/d1_"" with 10.0 weight got id 0
Device d1r1z1-127.0.0.1:6020R127.0.0.1:6020/d2_"" with 10.0 weight got id 1
Device d2r1z1-127.0.0.1:6080R127.0.0.1:6080/d8_"" with 10.0 weight got id 2
Device d3r1z2-127.0.0.1:6030R127.0.0.1:6030/d3_"" with 10.0 weight got id 3
Device d4r1z2-127.0.0.1:6040R127.0.0.1:6040/d4_"" with 10.0 weight got id 4
Device d5r1z3-127.0.0.1:6070R127.0.0.1:6070/d7_"" with 30.0 weight got id 5
Reassigned 64 (100.00%) partitions. Balance is now 0.00.
Device d6r1z4-127.0.0.1:6090R127.0.0.1:6090/d9_"" with 15.0 weight got id 6
Reassigned 25 (39.06%) partitions. Balance is now 14.24.
-------------------------------------------------------------------------------
NOTE: Balance of 14.24 indicates you should push this
ring, wait at least 0 hours, and rebalance/repush.
-------------------------------------------------------------------------------
Device d7r1z4-127.0.0.1:6100R127.0.0.1:6100/d10_"" with 30.0 weight got id 7
swift@saio:~/bin$ cat ./remakerings.unbalanced
#!/bin/bash
swift-ring-builder object.builder create 6 3 0
swift-ring-builder object.builder add r1z1-127.0.0.1:6010/d1 10
swift-ring-builder object.builder add r1z1-127.0.0.1:6020/d2 10
swift-ring-builder object.builder add r1z1-127.0.0.1:6080/d8 10
swift-ring-builder object.builder add r1z2-127.0.0.1:6030/d3 10
swift-ring-builder object.builder add r1z2-127.0.0.1:6040/d4 10
#swift-ring-builder object.builder add r1z2-127.0.0.1:6060/d6 10
swift-ring-builder object.builder add r1z3-127.0.0.1:6070/d7 30
swift-ring-builder object.builder rebalance
swift-ring-builder object.builder add r1z4-127.0.0.1:6090/d9 15
swift-ring-builder object.builder rebalance
swift-ring-builder object.builder add r1z4-127.0.0.1:6100/d10 30
swift-ring-builder object.builder write_ring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment