Commit Graph

13 Commits

Author SHA1 Message Date
Zack Cerza
158f9ba1ff Revert "Lines formerly of the form '(remote,) = ctx.cluster.only(role).remotes.keys()'"
This reverts commit d693b3f895.
2014-03-27 11:35:28 -05:00
Warren Usui
d693b3f895 Lines formerly of the form '(remote,) = ctx.cluster.only(role).remotes.keys()'
and '(remote,) = ctx.cluster.only(role).remotes.iterkeys()' would fail with
ValueError and no message if there were less than 0 or more than 1 key.
Now a new function, get_single_remote_value() is called which prints out
more understandable messages.

Fixes: 7510
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-03-26 18:43:48 -07:00
John Spray
8dfcfa4a7e mds_thrash: Fix a potential getitem on None
get_mds_status returns None for things it can't see,
so have to check for Noneness on all its outputs.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-27 18:39:45 +00:00
John Spray
22825c25a5 mds_thrash: Refactor gevent usage + get traceback
This simplifies the code to make MdsTrash be a greenlet
(as it logically is) rather than encapsulating one that
gets started in __init__ (spawning threads in constructors
is evil).

With this done, do_thrash is called from _run inside an
exception handler that will give us full tracebacks
if something bad happens.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-27 18:39:45 +00:00
John Spray
f12426c3ec mds_thrash: PEP8-ize whitespace
...so that I can edit the code in a python IDE without
it lighting up like a christmas tree!

Signed-off-by: John Spray <john.spray@inktank.com>
2014-02-27 14:25:13 +00:00
John Spray
aaf9b51c60 Fix MDS wait when get_mds_status returns None 2014-01-31 20:49:13 +00:00
Alfredo Deza
cc3956adf4 fix indentation level for task
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
(cherry picked from commit 1397d29963b2135998ccaaa9a89c83e0bb9710f4)
2014-01-28 16:04:46 -05:00
Alfredo Deza
bdafbc0c56 make sure we are using a dict
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
(cherry picked from commit fe4c97dc4f5f893df526f8694d4b9fafb064f9d3)
2014-01-28 16:04:25 -05:00
Warren Usui
a1d8225b7d Added docstrings, and improved some of the comments on several tasks. 2013-10-12 01:35:34 -07:00
Sam Lang
6fd7ebd44d task/mds_thrash: Log mds dump after long delay
In cases where the mds thrasher continuously loops
waiting for an mds to be removed from the map, or
for a new mds to become active, we want to start logging
the mds state for debugging.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-03-27 08:48:45 -05:00
Sage Weil
d9a233c9bc mds_thrash: requery mds status inside the wait loop
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-09 22:17:15 -08:00
Sam Lang
14730276b9 Fixes for syntax errors found by pyflakes.
This patch includes minor fixes to the teuthology
python code for syntax errors found by running
check-syntax.sh (which runs pyflakes on each file).

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-31 07:58:57 -06:00
Sam Lang
53f22d9493 task/mds_thrasher: New task for thrashing the mds
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2013-01-18 15:48:52 -06:00