Skip to content

Instantly share code, notes, and snippets.

@clayg
Created November 5, 2015 22:38
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 clayg/6b1ffbb0fec28344ff50 to your computer and use it in GitHub Desktop.
Save clayg/6b1ffbb0fec28344ff50 to your computer and use it in GitHub Desktop.
vagrant@saio:/tmp/rings$ wget https://goo.gl/pIR5Z5 -O test.builder
--2015-11-05 22:36:02-- https://goo.gl/pIR5Z5
Resolving goo.gl (goo.gl)... 74.125.239.98, 74.125.239.101, 74.125.239.110, ...
Connecting to goo.gl (goo.gl)|74.125.239.98|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://cloud-storage-onl.ncsa-east-msr.ubisoft.com/v1/AUTH_2d7f58e7e73a47aeaca0150c098a6c2c/for_notmyname/account.builder [following]
--2015-11-05 22:36:02-- https://cloud-storage-onl.ncsa-east-msr.ubisoft.com/v1/AUTH_2d7f58e7e73a47aeaca0150c098a6c2c/for_notmyname/account.builder
Resolving cloud-storage-onl.ncsa-east-msr.ubisoft.com (cloud-storage-onl.ncsa-east-msr.ubisoft.com)... 216.98.54.3
Connecting to cloud-storage-onl.ncsa-east-msr.ubisoft.com (cloud-storage-onl.ncsa-east-msr.ubisoft.com)|216.98.54.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1050666 (1.0M) [application/octet-stream]
Saving to: ‘test.builder’
100%[======================================================================================>] 1,050,666 1.24MB/s in 0.8s
2015-11-05 22:36:04 (1.24 MB/s) - ‘test.builder’ saved [1050666/1050666]
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder
test.builder, build version 13
131072 partitions, 3.000000 replicas, 1 regions, 1 zones, 3 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 172.16.0.11 6002 172.16.0.11 6002 SSD1 100.00 196608 12.50
1 1 1 172.16.0.12 6002 172.16.0.12 6002 SSD2 100.00 196608 12.50
2 1 1 10.131.0.13 6002 10.131.0.13 6002 SSD3 25.00 0 -100.00
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder remove --id 2
d2r1z1-10.131.0.13:6002R10.131.0.13:6002/SSD3_"" marked for removal and will be removed next rebalance.
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder add r1z1-10.131.0.14:6002/SSD3 25.0
Device d3r1z1-10.131.0.14:6002R10.131.0.14:6002/SSD3_"" with 25.0 weight got id 3
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder rebalance 2> /dev/null
Reassigned 43720 (33.36%) partitions. Balance is now 0.00. Dispersion is now 66.68
-------------------------------------------------------------------------------
NOTE: Dispersion of 66.680908 indicates some parts are not
optimally dispersed.
You may want to adjust some device weights, increase
the overload or review the dispersion report.
-------------------------------------------------------------------------------
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder
test.builder, build version 16
131072 partitions, 3.000000 replicas, 1 regions, 1 zones, 3 devices, 0.00 balance, 66.68 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 172.16.0.11 6002 172.16.0.11 6002 SSD1 100.00 174762 -0.00
1 1 1 172.16.0.12 6002 172.16.0.12 6002 SSD2 100.00 174763 0.00
3 1 1 10.131.0.14 6002 10.131.0.14 6002 SSD3 25.00 43691 0.00
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder set_info --id 3 --change-ip 10.131.0.13 --change-replication-ip 10.131.0.13
Device d3r1z1-10.131.0.13:6002R10.131.0.14:6002/SSD3_"" is now d3r1z1-10.131.0.13:6002R10.131.0.13:6002/SSD3_""
vagrant@saio:/tmp/rings$ swift-ring-builder test.builder
test.builder, build version 16
131072 partitions, 3.000000 replicas, 1 regions, 1 zones, 3 devices, 0.00 balance, 66.68 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 172.16.0.11 6002 172.16.0.11 6002 SSD1 100.00 174762 -0.00
1 1 1 172.16.0.12 6002 172.16.0.12 6002 SSD2 100.00 174763 0.00
3 1 1 10.131.0.13 6002 10.131.0.13 6002 SSD3 25.00 43691 0.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment