35f4d29ed6562b0f4d5db253deeb218db62078a4
Commit Graph

306 Commits

Author SHA1 Message Date
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
Joe Arnold
5e4ca30281 Fixed swift-bench when using -b and a conf file
Change-Id: I72448cd8578b53a658f151354a26066772e4b9ec
2012年11月07日 16:12:04 -08:00
Jenkins
13941cb8eb Merge "dispersion report option to output missing parts" 2012年11月02日 19:35:38 +00:00
gholt
dcc89e3ad6 dispersion report option to output missing parts
Adds a -p option to swift-dispersion-report that will output the
partitions missing copies to standard error. Another thing we've been
meaning to add for forever. It's useful when you want to do some
further research on whether a partition truly has fewer copies or if
they're just somewhere else in the cluster due to a ring change, for
instance.
DocImpact
Change-Id: I5e47aa5818483ecc34b39ef6f8cd83ad312ed9a0
2012年10月30日 17:40:42 +00:00
John Dickinson
8ac292595f changed TRUE_VALUES references to utils.config_true_value() call
cleaned up pep8 (v1.3.3) in all files this patch touches
Change-Id: I30e8314dfdc23fb70ab83741a548db9905dfccff
2012年10月29日 13:59:01 -07:00
Jenkins
0a03bd06a3 Merge "Added partition option to swift-get-nodes" 2012年10月25日 23:11:05 +00: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
John Dickinson
af4b2851fc fix config parsing in swift-bench -x
This patch ensures that the command-line arg format (boolean)
doesn't conflict with the conf file format (string) and the
proper action is taken.
Change-Id: I3284096e1a9478897e1c3246ab190b46d2590243
2012年10月25日 09:26:00 -07:00
David Goetz
a6c44d2764 allow replicator run_once to check specific devices/partitions
Change-Id: If45f77fda269ae6e251579542e70eb71bd11fe2a
2012年09月28日 12:24:15 -07:00
Florian Hines
c4f5761101 builder.add_devs gets next id if not provided
Have builder.add_devs get the next id to use when adding a new device
if its not specified in the dict.
Change-Id: I5a0defab43f5cfc5d997080bfd8563bfe72368ad
2012年09月14日 16:11:50 -05:00
Andy McCrae
463da7e170 Adds Error Handling to swift-drive-audit for missing or unreadable /var/log/kern.log
Fixes Bug 1049081
Change-Id: If977080350cc5cdb6bc633b6af7d3c490ed23d46
2012年09月11日 16:23:32 +00:00
Florian Hines
c0537ac6e0 Breakout search_devs & add get_builder() for reuse
This moves search_devs into RingBuilder to make it accessible to other utils
that need to search the builder. Along the same lines this also adds a
load() call to get a RingBuilder instance when working with the builder files.
- This adds python-mock >= 0.7 as a dependency for unittests. On Ubuntu
 10.04 you'll have to pip install it, on 12.04 you can apt-get install
 it. Fedora 17+ should be able to yum install it.
- new pep8 compliance
- Fixed a small issue (undefined var) in swift-ring-builder when remove was
called but failed to find a match.
Change-Id: I2e02684235aa2f4e901a00858ae037091594c545
2012年09月06日 20:16:46 -05:00
Darrell Bishop
ed3b12d05c Can run swift-bench across multiple cores/servers.
You run one or more swift-bench-client processes like this:
 $ swift-bench-client 127.0.0.1 20001
 $ swift-bench-client 127.0.0.1 20002
Then you run swift-bench with a new option, --bench-clients (-b), which is
specified once for each swift-bench-client:
 $ swift-bench -b 127.0.0.1:20001 -b 127.0.0.1:20002
You get log lines from each client (interleaved) along with a final report
for all clients:
 127.0.0.1:20002 swift-bench-server 2012年08月25日 22:44:06,148 INFO Auth version: 1.0
 127.0.0.1:20001 swift-bench-server 2012年08月25日 22:44:06,148 INFO Auth version: 1.0
 127.0.0.1:20001 swift-bench-server 2012年08月25日 22:44:12,249 INFO 83 PUTS [0 failures], 41.5/s
 127.0.0.1:20002 swift-bench-server 2012年08月25日 22:44:14,430 INFO 74 PUTS [0 failures], 34.3/s
 ...
 127.0.0.1:20002 swift-bench-server 2012年08月25日 22:45:18,942 INFO Auth version: 1.0
 127.0.0.1:20002 swift-bench-server 2012年08月25日 22:45:20,946 INFO 238 DEL [2 failures], 118.9/s
 swift-bench 2012年08月25日 22:45:27,549 INFO 2000 PUTS **FINAL** [0 failures], 56.8/s
 swift-bench 2012年08月25日 22:45:27,550 INFO 30000 GETS **FINAL** [50 failures], 974.6/s
 swift-bench 2012年08月25日 22:45:27,550 INFO 2000 DEL **FINAL** [20 failures], 237.1/s
The concurrency, PUT count, and GET count config settings are divided by
the number of bench_clients. In other words, the same volume of work is
attempted (vs. not specifying --bench-clients), but it can now span
servers and CPU cores.
Benchmark containers are created (if use_proxy = yes) and deleted (if
delete = yes), with appropriate concurrency, in the initiating
swift-bench process, not any of the swift-bench-client processes.
Change-Id: Idbf31a23093244ab357a9bf77e6031257774f24a
2012年08月30日 18:22:49 +00:00
Darrell Bishop
9bda92d54a Misc. swift-bench improvements.
swift-bench now honors the environment variables, ST_AUTH, ST_USER, and
ST_KEY like python-swiftclient does.
Added --lower-object-size (or -l) command-line option which, if
specified, will turn a specified --object-size into --upper-object-size.
It will raise a ValueError if --object-size is not specified or is <=
--lower-object-size.
BenchController how handles SIGINT (KeyboardInterrupt) similarly to the
swift command-line client: the first Ctrl-C will make it fast-track to
completion (no new PUT or GET operations are started, but everything PUT
is DELETE'ed). A second Ctrl-C will immediately exit. The behavior for
SIGTERM is unchanged (a single SIGTERM will immediately terminate the
process).
Added a sample configuration file for swift-bench, with documenting
comments.
Change-Id: I6f394ad995300fc8af3d565d95c3b45559ee510a
2012年08月27日 20:25:44 +00:00
Jenkins
ba9158886e Merge "To simulate the real workloads, the objects to be uploaded could be created in the random sizes, which are bounded (lower_object_size and upper_object_size) by the user inputs." 2012年08月17日 23:47:32 +00:00
Jenkins
f2f3b75802 Merge "Use custom encoding for RingData, not pickle." 2012年08月13日 15:52:56 +00:00
Darrell Bishop
f8ce43a218 Use custom encoding for RingData, not pickle.
Serialize RingData in a versioned, custom format which is a combination
of a JSON-encoded header and .tostring() dumps of the
replica2part2dev_id arrays. This format deserializes hundreds of times
faster than rings serialized with Python 2.7's pickle (a significant
performance regression for ring loading between Python 2.6 and Python
2.7). Fixes bug 1031954.
swift.common.ring.ring.RingData is now responsible for serialization and
deserialization of its data via a new load() class method and save()
object method. The new implementation is backward-compatible; if a ring
does not begin with a new-style magic string, it is assumed to be an
old-style pickle-dumped ring and is handled as before. So new Swift
code can read old rings, but old Swift code will not be able to read
newly-serialized rings. THIS SHOULD BE MENTIONED PROMINENTLY IN THE
RELEASE NOTES.
I didn't want to bite of more than necessary, so I didn't mess with
builder file serialization.
Change-Id: I799b9a4c894d54fb16592443904ac055b2638e2d
2012年08月05日 00:51:49 -07:00
ning_zhang
aad7cdc364 To simulate the real workloads, the objects to be uploaded could be created in the random sizes, which are bounded (lower_object_size and upper_object_size) by the user inputs.
Change-Id: I64647c5d613a0794f0807886a4833cd5c31c0c5e
2012年08月03日 11:47:39 -07:00
Florian Hines
f2f6b2f26c Report all unmounted drives
- swift-recon cli now reports all unmounted drives.
- Fixes bug 1031060
Change-Id: Ia9e6bbf05215879b602e9dcb77d007094c494dc1
2012年07月30日 15:09:14 -05:00
Florian Hines
5f72a8db4a Fix Dispersion report and swift-bench on saio
We're still using saio:11000 in a few spots so a few things
don't work out of the box on the saio. Fixes bug #1024561
Change-Id: I226de54c2785b0d0b681c8d0cc24260adbd3d663
2012年07月13日 17:48:37 -05:00
Jenkins
217676c06c Merge "swift-bench should be able to use auth version 2.0" 2012年07月02日 18:49:13 +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
Greg Lange
f4c319b94c Made dispersion report work with any replica count other than 3.
This changes the JSON output keys missing_one and missing_two to
missing_1 and missing_2 (if there are at least 2 replicas), drops
the missing_all key, and can add more missing_x keys depending on
the replica count. We will definitely need to post a prominent
notice of this change with the next release.
bug 862816
Change-Id: Ib747d944476638c33ee1d876b8f9db28953826e2
2012年06月18日 20:15:51 +00:00
François Charlier
ef3e556b72 swift-bench should be able to use auth version 2.0
Fixes Bug #1011727
Change-Id: I6681bd85a5ddb82a1059913ae90696e5994aa906
2012年06月13日 09:06:57 +02: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
Jenkins
22624aa50a Merge "added printing of 404s to dispersion report; fixed small, unrelated bug" 2012年06月11日 23:42:43 +00:00
Greg Lange
27455cb15b added printing of 404s to dispersion report; fixed small, unrelated bug
also fixed bug where in error_log where identifier wasn't being set to anything meaningful, set it to the right thing
bug 612722
Change-Id: I53f237ea0db2a5b2b8979a7b41189faf1275e861
2012年06月07日 21:15:18 +00:00
Chmouel Boudjnah
22572b506a Remove swift.common.client from here.
- It has been to its own gerrit project.
- direct_client should follow next.
- Implements blueprint clientbindings.
Change-Id: I3bb50c95eba81302bfec71cb7ce5288b85a41dc0
2012年06月07日 16:36:49 +02:00
Florian Hines
ccb6334c17 Expand recon middleware support
Expand recon middleware to include support for account and container
servers in addition to the existing object servers. Also add support
for retrieving recent information from auditors, replicators, and
updaters. In the case of certain checks (such as container auditors)
the stats returned are only for the most recent path processed.
The middleware has also been refactored and should now also handle
errors better in cases where stats are unavailable.
While new check's have been added the output from pre-existing
check's has not changed. This should allow existing 3rd party
utilities such as the Swift ZenPack to continue to function.
Change-Id: Ib9893a77b9b8a2f03179f2a73639bc4a6e264df7
2012年05月24日 14:50:00 -05:00
gholt
1c3b75c291 Reverted the pulling out of various middleware:
RateLimit
StaticWeb
TempURL/FormPOST
Change-Id: I988e93e6f4aacb817a2e354d43a04e47516fdf88
2012年05月16日 21:25:10 +00:00
Jenkins
86f37c47d7 Merge "Let some swift-ring-builder commands take >1 arg." 2012年05月11日 15:15:03 +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
Samuel Merritt
47f0dbb125 One PEP8 fix to make tox happy again.
Change-Id: I5ff2056f9f2eb99bfb98b020e3fc013332100e12
2012年05月09日 12:28:00 -07:00
gholt
c0532a6ef2 Pulled out TempURL/FormPOST
TempURL/FormPOST is now at http://gholt.github.com/swift-tempurl/
For current users of TempURL/FormPOST, this will require installing the new
package and changing the "use" line of the tempurl and formpost conf section's
to:
[filter:tempurl]
use = egg:swifttempurl#tempurl
[filter:formpost]
use = egg:swifttempurl#formpost
And then 'swift-init proxy reload'.
Change-Id: I5bddf7f9e09ee07815530a41c46ff901fc21b447
2012年05月08日 20:20:29 +00:00
Jenkins
742f3d1a8e Merge "Make scripts in bin/ PEP8-compliant." 2012年05月04日 17:33:32 +00:00
Samuel Merritt
2ccf219ec1 Make scripts in bin/ PEP8-compliant.
Also made tox's PEP8 check look at the scripts in bin/ to keep them
PEP8-compliant.
Change-Id: I710365ea929d7fc15578d5f742a236bad47ef28e
2012年05月04日 08:24:51 -07:00
Brent Roskos
0d640971cd Fix related to bug #994502
Added support for configuring lock file location.
added an additional error handler.
Change-Id: I3635ed9694b9fb8526e0ca0591dc731da03a7128
2012年05月04日 06:59:45 -04:00
Samuel Merritt
0befccccdf Let some swift-ring-builder commands take >1 arg.
`swift-ring-builder X.builder [add|set_weight|set_info|remove]` can
now work on multiple devices at once.
This allows for faster bulk operations; for example, if an
administrator has to add 48 new devices to the ring, then this lets
them do it in one command invocation. Since each invocation of
swift-ring-builder follows a deserialize-operate-serialize pattern,
using the bulk form of the commands on N devices will save N-1
[de]serializations.
Change-Id: Ibf77528f28026866af3c94d0370181c8013d5bc5
2012年05月03日 17:45:33 -07:00
Pete Zaitcev
6b91352007 Restore the syntax -U tenant:user
On a relatively recent build of swift, all my scripts blew up with
"No tenant specified". It was caused by the fix to add --os_tenant_name,
commit ID: 208b8e85a8
This patch restores the old behavior. I tested it to work with old
swauth-based Swift, new Keystone-based Swift, in the latter case using
both -U and --os_tenant_name arguments.
Note that this patch permits to use a literal colon in the user name
with the new syntax, as long as tenant is specified. Empty tenant
names are not allowed with either syntax.
Change-Id: I7785e6981a9d6281d0421c43875ee19d61d5ff43
Bug: 982909
2012年04月26日 10:58:07 -06:00
Jenkins
9115bbb17f Merge "Make swift client easier to wrap" 2012年04月19日 02:49:49 +00:00
Jenkins
a77cbc2892 Merge "Use options.os_auth_url rather then environment variable" 2012年04月12日 19:42:48 +00:00
Pete Zaitcev
3aabe86e34 Make swift client easier to wrap
In the process of wrapping for profiling, a trivial wrap with def main()
ended in a ton of these:
 NameError: global name 'parser' is not defined
A closer investigation revealed an apparent confusion in argument names.
The problem was introduced by commit 985968f765
of November 2010. Note that Greg fixed st_delete() correctly in that one,
but apparently forgot the others.
Unit tests pass for both current (bad) code, and the patched code.
By the magic of Python scoping, current code works, just impossible
to wrap for a quick hack.
Change-Id: I18f2494ce2a201d04d49f99ea259d141939dcb6a
2012年04月10日 10:27:54 -06:00
Jenkins
3c2e85609b Merge "Add os_tenant_name to bin/swift and common.client" 2012年04月10日 14:42:33 +00:00
Julien Danjou
50361f6a22 Use options.os_auth_url rather then environment variable
If you do specify --os_auth_url rather than using the environment variable
OS_AUTH_URL, you'll end up with different behaviour.
Change-Id: I7430c2a619487375427b1c377ce00245eff107ff
2012年04月06日 15:53:43 +02:00
Julien Danjou
9a423d0b78 Allow to specify auth_version in swift-dispersion tools
Change-Id: I080d531471d8ea57c69a918d4f6930441f1e69f6
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
2012年04月02日 16:42:05 +02:00
Julien Danjou
7a39fea989 Fix typo in swift-dispersion-report and populate
Change-Id: I5168942ad32b3461f4c46300e378b249dab6a2ee
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
2012年04月02日 16:38:48 +02:00
Jenkins
549ca120fa Merge "Display total disk usage info in swift-recon" 2012年03月26日 09:02:48 +00:00
Jenkins
6682138b0a Merge "Make ring class interface slightly more abstracted from implementation." 2012年03月22日 20:25:06 +00:00
Florian Hines
83a12ece2a Display total disk usage info in swift-recon
Now display's cluster disk space used, free, and total.
Change-Id: I9c48dd6badaecd64cda4a2a8a51f41f1c29d328a
2012年03月21日 17:30:44 -05:00
Chmouel Boudjnah
208b8e85a8 Add os_tenant_name to bin/swift and common.client
- Make sure we have a tenant_name when doing get_auth for 2.0
 auth_version.
Change-Id: I02dceb03f224c8fb91972e1f0e2925e5d1a06640
2012年03月20日 12:11:21 +00:00