Skip to content

Instantly share code, notes, and snippets.

@pandemicsyn
Created June 14, 2012 04:48
Show Gist options
  • Select an option

  • Save pandemicsyn/2928044 to your computer and use it in GitHub Desktop.

Select an option

Save pandemicsyn/2928044 to your computer and use it in GitHub Desktop.
ringscout
fhines@ubuntu:~/RingMaster (master)$ python ringscout.py -z 1 -w 1 -r 172.16.63.129-155 /etc/swift/object.builder -p 6010
Scanning 172.16.63.129-155 for drives to add to zone 1 with meta data []...
---> 172.16.63.129:6010 found: ['sdc']
Add all devices to ZONE 1: [y/n]: y
Backed up builder too /etc/swift/backups/1339649292.object.builder (b12532da805cc5b7f280604505f74213)
adding...
adding z1-172.16.63.129:6010/sdc_ 1
fhines@ubuntu:~/RingMaster (master)$ python ringscout.py -h
Usage:
usage: ringscout.py [-v] [--suppress] [-y] [-z zone] [-w weight] [-m "meta info"]
[--swift-dir=/etc/swift] builder.file
ex: ringscout.py -y -i 1.1.1.1-254 -p 6000 --zone=1 -w 25 object.builder -y
Options:
-h, --help show this help message and exit
-v, --verbose Print verbose info
--dry-run Dry run don't make any changes to builder files
--suppress Suppress most connection related errors
-z ZONE, --zone=ZONE Add devices to given zone
-w WEIGHT, --weight=WEIGHT
Add devices with given weight
-t SECONDS, --timeout=SECONDS
Time to wait for a response from a server
-y, --yes Answer all questions yes
-m META, --meta=META Default = Nothing
-r IPRANGE, --iprange=IPRANGE
-p PORT, --port=PORT
-e DRIVE_EXCLUDE, --drive-exclude=DRIVE_EXCLUDE
Exclude drives matching this pattern
-i DRIVE_INCLUDE, --drive-include=DRIVE_INCLUDE
Include only drives matching this pattern
--swiftdir=SWIFTDIR Default = /etc/swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment