405a2b2a55866b74f196ad81eaafedeee4615fa8
Commit Graph

27 Commits

Author SHA1 Message Date
kenichiro matsuda
81816bebe6 Fix shebang of commands
Fix shebang of following commands.
 $ grep '#!/usr/bin/python' swift/bin/*
 swift/bin/swift-account-info:#!/usr/bin/python
 swift/bin/swift-container-info:#!/usr/bin/python
 swift/bin/swift-container-sync:#!/usr/bin/python
 swift/bin/swift-recon:#!/usr/bin/python
 swift/bin/swift-ring-builder:#!/usr/bin/python
 swift/bin/swift-ring-builder-analyzer:#!/usr/bin/python
Change-Id: I564d1d8abd76eba57730fc2f30263b0a0f809867
Closes-Bug: #1481623 
2015年08月06日 11:02:40 +09:00
Christian Schwede
39d22ccec7 Don't create bin/* files magically
Just use import to make scripts available in bin/ instead of
creating these during setup.py install.
Change-Id: I7318bbb77f6564ed58736887e711e1c497873471
2014年02月13日 10:51:27 +00:00
Christian Schwede
cd4b4da8b6 Add some tests for bin/swift-recon
Fix also minor bug in zone filtering when zone set to 0.
Moved bin/swift-recon to swift/cli/recon.py, which makes
it possible to import it without using some scary hacks.
bin/swift-recon is now created by setup.py install.
Closes-Bug: #1261692
Change-Id: Id0729991c8ece73604467480dbf93fec7d8eb196
2014年01月31日 15:34:37 +00:00
Christian Schwede
866c568cd6 Make swift-recon usable on hosts without IPv6
Fixes a bug when swift-recon --sockstat is used on hosts without
IPv6 support.
Tested by disabling IPv6 on Ubuntu 12.04 LTS:
Add "ipv6.disable=1" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
sudo update-grub
sudo /sbin/reboot
Closes-Bug: 1270711
Change-Id: Ib31a059e412ac68ca0a3faef4201fec7560d1178
2014年01月20日 07:13:20 +00:00
Florian Hines
62254e42c4 Fix checkmount error parsing in swift-recon
- swift-recon now handles parsing instances where 'mounted' key (in unmounted
 and disk_usage) is an error message instead of a bool.
- Add's checkmount exception handling to the recon umounted endpoint.
- Updates existing unittest to have ismount throw an error.
- Updates unittests to cover the corner cases
Change-Id: Id51d14a8b98de69faaac84b2b34b7404b7df69e9
2013年12月28日 20:58:27 -08:00
Christian Schwede
33706cb974 Add option to return disk usage report with byte suffix.
Disk usage is currently returned as bytes. This patch adds the option
to return the value with a more human-friendly suffix, eg. MB/GB/TB/PB.
Change-Id: I3d55181f7e6085e711bd6e09ea2ce0a12b290cc5
2013年12月03日 16:29:00 +00:00
Monty Taylor
5a785aa5ee Add missing copyright license headers
We're working on adding enforcement that things have appropriate
copyright license headers. In anticipation of that, fix the files that don't
have them.
Change-Id: Ie0a9fd5eece5b6671ff4389b07b69ca29be7d017
2013年08月07日 17:50:32 -03:00
Dirk Mueller
8aba2d602e Start using Hacking
Instead of blacklisting Hacking globally,
only blacklist those that currently occur frequently
(for a later followup patch), and fix the rest. In
detail:
H101 Use TODO(NAME)
H201 no 'except:' at least use 'except Exception:'
H231 octal number 022 should be written as 0o22
H401 docstring should not start with a space
H701 Empty localization string
Change-Id: Ib3b3d56b68d1cf15d3b67ac9749fcbdb876dc52a
2013年07月15日 11:41:58 +02:00
gholt
0640a61776 Fixed some swift-recon typos
Change-Id: Ibe4b59a90b82742b70b00353d22aedd972bbeb59
2013年02月08日 20:19:48 +00:00
gholt
a88b412e17 swift-recon: Added oldest and most recent repl
I've been doing this with cluster-wide log searches for far too long.
This adds support for reporting the oldest replication pass
completion as well as the most recent. This is quite useful for
finding those odd replicators that have hung up for some reason and
need intervention.
Change-Id: I7fd7260eca162d6b085f3e82aaa3cf90670f2d53
2013年01月12日 05:49:14 +00:00
gholt
18f755a287 Added --top option to swift-recon -d
When showing the disk usage dispersion graph it is often useful to
know what those top full drives are so you can do further research.
Now you can run 'swift-recon -d --top 10' to list the top ten devices
by fullness after the usual dispersion graph.
Change-Id: I7ddb2141e55e0613f69750fabe544940192c2d48
2012年11月29日 22:18:18 +00: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
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
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
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
Jenkins
549ca120fa Merge "Display total disk usage info in swift-recon" 2012年03月26日 09:02:48 +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
Michael Barton
e008c2ebb8 Make ring class interface slightly more abstracted from implementation.
Change-Id: I0f55d61c7b8de30460f17a69e5d9946494dbda6e
2012年03月14日 22:00:30 +00:00
Florian Hines
c18a4e4f43 swift-recon cli cleanup
Refactored swift-recon completely. It's broken out into Classes and no
longer uses globals. In addition, I pulled out the previous individual
scout_XXXX functions that where getting added for each check. All the
check's now use the same method from the Scout class to obtain stats
and telemetry.
Change-Id: I512ab50f29e1ef4d10bd3adbf1cac642308e7cf1
2012年02月28日 16:33:57 +00:00
gholt
0406323f9b Added timeout option to swift-recon
Change-Id: I0d3c55a11c5e3252f0fd4b128ab840403c7f55f6
2012年02月08日 00:06:55 +00:00
Florian Hines
413ca11a5f Add sockstat info to recon.
Add's support for pulling info from /proc/net/sockstat and /proc/net/sockstat6 via recon.
Change-Id: Idb403c6eda199c5d36d96cc9027ee249c12c7d8b
2011年11月15日 17:55:14 +00:00
Florian Hines
3b8e20d059 Fixes bug 887278. The disk usage graph will now be drawn correctly.
Change-Id: I75cf87e409fefa701eea5019f2449757e55eba2f
2011年11月07日 19:38:56 +00:00
Florian Hines
480df2e89e Query only specific zone via swift-recon
Add support to query only specific zones, as well a --all shortcut flag to run all checks.
Also skip deleted devices when trying to grab hosts from the ring.
Change-Id: I441ec76c90857c2e74262a7a9e2d36de89b28631
2011年09月28日 01:00:31 -05:00
Chmouel Boudjnah
1397fa799b Fix swift-recon
Make sure there is things in the row of ring_data.devs.
Adjust else: for the driver information.
Change-Id: I11a949dfa3f36691f86f3b7330d65e435c22da24
2011年09月26日 15:31:48 +02:00
Florian Hines
dcd39d098f account for parent/.. hardlinks 2011年08月12日 16:29:13 -05:00
Florian Hines
44803a835d add quarantine stats 2011年08月12日 15:01:28 -05:00
Florian Hines
aa622eb799 recon middlewear for the object server and utils for cluster monitoring 2011年07月27日 10:41:07 -05:00