6cc10d17de04a7ec19727880cd112898ca25d238
Commit Graph

24 Commits

Author SHA1 Message Date
Yuan Zhou
6cc10d17de Update bin scripts to be storage policy aware
swift-container-info:
 Print policy container info
swift-object-info:
 Allow to specify storage policy name when looking for object info
 Notify if there is missmatch between ring location and the actual
 object path in filesystem
swift-get-nodes:
 Allow to specify storage policy name when looking for account/
 container/object ring location
 Notify if there is missmatch between ring and the policy
Lookup policy name in swift.conf; 'Legacy' container will use
policy-0's name; 'Unknown' is shown if policy not found in swift.conf
DocImpact
Implements: blueprint storage-policies
Change-Id: I450d40dc6e2d8f759187dff36d658e52737ae2a5
2014年06月18日 20:57:09 -07:00
Yuan Zhou
4b7bab9fc9 Update swift-get-nodes to use storage_directory util func
Change-Id: I074d6c5f62e5218427c72b3e11de40da4ecfc0ab
2014年03月26日 10:47:22 +08:00
Peter Portante
9411a24ba7 Revert "Refactor common/utils methods to common/ondisk"
This reverts commit 7760f41c3c
Change-Id: I95e57a2563784a8cd5e995cc826afeac0eadbe62
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013年10月07日 17:18:09 -04:00
Jenkins
111ebb9a4b Merge "Fix bad hash_path reference" 2013年10月07日 21:08:13 +00:00
Peter Portante
61e135e211 Fix bad hash_path reference
Mea culpa: these two scripts were missed in commit:
 https://review.openstack.org/46956
Fixes bug 1235441
Change-Id: I4303bc808448a79bddbb991526b0cca26150b392
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013年10月07日 11:18:28 -04:00
ZhiQiang Fan
f72704fc82 Change OpenStack LLC to Foundation
Change-Id: I7c3df47c31759dbeb3105f8883e2688ada848d58
Closes-bug: #1214176 
2013年09月20日 01:02:31 +08:00
Kun Huang
cb69dc881a Give friendly notification in swift-get-nodes
Hard coding of '/srv/node' maybe drive to some errors. But it seems
unfixable (please see talks in bug report). To avoid erros as we can,
showing a friendly notification to let user set their own device
location works better than hard coding directly.
Change-Id: I45d749dd52af8d3b051dfe98dbb9d71a5a374f97
Fixes: bug #907908 
2013年03月09日 13:43:54 +08:00
Samuel Merritt
7548cb9c47 Make rings' replica counts adjustable.
Example:
$ swift-ring-builder account.builder set_replicas 4
$ swift-ring-builder rebalance
This is a prerequisite for supporting globally-distributed clusters,
as operators of such clusters will probably want at least as many
replicas as they have regions. Therefore, adding a region requires
adding a replica. Similarly, removing a region lets an operator remove
a replica and save some money on disks.
In order to not hose clusters with lots of data, swift-ring-builder
now allows for setting of fractional replicas. Thus, one can gradually
increase the replica count at a rate that does not adversely affect
cluster performance.
Example:
$ swift-ring-builder object.builder set_replicas 3.01
$ swift-ring-builder object.builder rebalance
<distribute rings and wait>
$ swift-ring-builder object.builder set_replicas 3.02
$ swift-ring-builder object.builder rebalance
<distribute rings and wait>...
Obviously, fractional replicas are nonsensical for a single
partition. A fractional replica count is for the whole ring, not for
any individual partition, and indicates the average number of replicas
of each partition. For example, a replica count of 3.2 means that 20%
of partitions have 4 replicas and 80% have 3 replicas.
Changes do not take effect until after the ring is rebalanced. Thus,
if you mean to go from 3 replicas to 3.01 but you accidentally type
2.01, no data is lost.
Additionally, 'swift-ring-builder X.builder create' can now take a
decimal argument for the number of replicas.
DocImpact
Change-Id: I12b34dacf60350a297a46be493d5d171580243ff
2013年02月22日 15:03:10 -08:00
David Goetz
ded504600f Allow actual paths to work for swift-get-nodes
Change-Id: I29f9ab73c8ca2a3c52247fb92ef951dd5b5246cb
2013年01月04日 13:48:15 -08:00
Samuel Merritt
35f4d29ed6 Upgrade pep8 to 1.3.3.
This required a bunch of whitespace-poking of the scripts in bin, but
that's all. Now every file in swift/ and bin/ is pep8-1.3.3-compliant,
so hopefully we can be done with this pep8 stuff for a good long time.
Change-Id: I44fdb41d219c57400a4c396ab7eb0ffa9dcd8db8
2012年11月26日 18:15:21 -08:00
gholt
e415e4d235 Added partition option to swift-get-nodes
Sometimes you just want to know what machines a given partition
should be on, or what handoffs that partition would use if needed.
We've been meaning to add this option to swift-get-nodes for quite
some time, but I just finally got to it.
Example: swift-get-nodes /etc/swift/object.ring.gz -p 123
I tried to leave as much of the existing swift-get-nodes unaltered,
so the output isn't exactly distilled to just what you'd need for
getting a partition's nodes. But it should suffice for what it is, an
admin tool.
Change-Id: I438400ddc0eecbf9c48266e7f38a2e4f0765f374
2012年10月25日 17:47:01 +00:00
Samuel Merritt
67af56b156 Make swift-get-nodes -a show all handoffs.
Commit 95786e5 made swift-get-nodes only output N handoff nodes, where
N is the ring's replica count. This change leaves that behavior in
place as the default, but adds the option -a/--all to print all the
handoff nodes.
This is handy if you're consuming the output with a script, e.g. if
you're doing some analysis of the distribution of primary+handoff
nodes for a particular set of things.
Change-Id: Ie0253575bb21ccf25559a1c5fd20570a58a2d9fa
2012年06月20日 12:45:34 -07:00
gholt
95786e577c Update swift-get-nodes to return fewer more_nodes
Changed swift-get-nodes to just return up to replica_count of
more_nodes instead of all of them. When you have thousands of drives,
returning all possible handoff nodes is pretty crazy. :)
Change-Id: I864e7243726ca3ef2ac08c4ab660a05789f37878
2012年06月13日 01:56:43 +00:00
Samuel Merritt
8e6f099daa Speed up swift-get-nodes by 2x.
It was loading the ring off disk once to print the primary nodes, and
then loading the whole thing off disk again to print the handoff
nodes. Changed it to only load the ring off disk once.
Change-Id: I6f4cd0af9762e1e69660c3eb20586590b5339e5f
2012年05月10日 00:10:24 -07:00
John Dickinson
1ecf5ebba1 updated copyright date for all files
Change-Id: Ifd909d3561c2647770a7e0caa3cd91acd1b4f298
2012年03月19日 13:45:34 -05:00
David Goetz
51ce438f7f changing /usr/bin/python to /usr/bin/env python 2011年03月24日 15:51:44 -07:00
Anne Gentle
8823427161 Changed copyright notices on py files and the single rst file with a copyright notice 2011年01月04日 17:34:43 -06:00
gholt
57970bdeb5 Cleaned up the bins; patched the broken test (when run standalone) 2010年12月29日 12:00:08 -08:00
Michael Barton
f432269013 add gettext to all binaries 2010年12月22日 17:18:30 +00:00
Jay Payne
013194b71b corrected dir order and spelling errors in ls section 2010年09月17日 15:54:05 +00:00
Jay Payne
12d8f14891 Fixed pep8 errors, dir error in the listing, made dryer 2010年09月16日 13:54:17 +00:00
Jay Payne
cbbfb80f86 Clean up code that was requested 2010年09月15日 19:28:57 +00:00
Jay Payne
e61c21b98f Adds HandOff locations to the various displays 2010年09月14日 06:51:20 +00:00
Monty Taylor
76e6c6ea6c Renamed bin files in the tree so that setup.py install does the same thing
as a deb install.
2010年07月14日 09:58:38 -05:00