Commit Graph

12 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
Warren Usui
567961b727 Readjust the indentation of mon_clock_skew_check.py and mon_thrash.py.
Added docstrings.

Fixes: 6537
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-02-13 20:36:08 -08:00
Joao Eduardo Luis
e84c54addd task: mon_clock_skew_check: grab max-skew value from ceph-mon's config
Instead of relying on hardcoded values, obtain the max-skew default from
'ceph-mon --show-config-value mon_clock_drift_allowed' to match the mon's
expectation.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 10:02:22 -07:00
Joao Eduardo Luis
06ad2d2cc9 task: mon_clock_skew_check: by default, use max skew from global config
If not defined, defaults to 0.05;  if 'max-skew' however is defined, it
must override whatever is on the config.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-19 21:54:34 -07:00
Joao Eduardo Luis
7ca59dfae1 task: mon_clock_skew_check: missing 'str'.format() key crashed the test
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-19 21:54:28 -07:00
Joao Eduardo Luis
a63fac32f8 task: mon_clock_skew_check: use absolute value when comparing mon_skew
The monitors may report either positive or negative clock skews, and by
not using an absolute value we were constantly ignoring reported negative
clock skews.

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-01-30 20:52:39 +00:00
Joao Eduardo Luis
89e09fa90c task: mon_clock_skew_check: mark as ran once if an expected skew was found
... even if we didn't get a clean/finished result from the monitors

This ought to significantly cut the waiting time if something else (or
someone else) is leaving the leader hanging thus unable to finish a given
timecheck round.

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-01-30 20:52:03 +00:00
Joao Eduardo Luis
aa85d914c4 task: mon_clock_skew_check: increase timeout and kick it off only on stop
We were kicking-off the timeout as soon as we started; it's better however
to kick if off only when we are told to stop (as long as 'at-least-once'
is true).

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-01-25 17:56:09 -08:00
Joao Eduardo Luis
673101c72f task: mon_clock_skew_check: distinguish between on-going and finished check
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-01-25 17:56:05 -08:00
Joao Eduardo Luis
98cc1b835c task: mon_clock_skew_check: add option to run at least one timecheck
at-least-once          Runs at least once, even if we are told to stop.
                         (default: True)
  at-least-once-timeout  If we were told to stop but we are attempting to
                         run at least once, timeout after this many
                         seconds. (default: 300)

Fixes: #3854

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-01-21 21:10:45 -08:00
Joao Eduardo Luis
620dd5511b task: mon_clock_skew_check.py: Check for clock skews on the monitors
Will run for as long as teuthology runs. By default, fails if any clock
skews higher than 0.05 seconds are detected, but will only fail when the
teuthology run finishes and after reporting a list of all the detected
skews.

Accepted options:

 interval     amount of seconds to wait in-between checks. (default: 30.0)
 max-skew     maximum skew, in seconds, that is considered tolerable
              before issuing a warning. (default: 0.05)
 expect-skew  'true' or 'false', to indicate whether to expect a skew
              during the run or not. If 'true', the test will fail if no
              skew is found, and succeed if a skew is indeed found; if
              'false', it's the other way around. (default: false)
 never-fail   Don't fail the run if a skew is detected and we weren't
              expecting it, or if no skew is detected and we were
              expecting it. (default: False)

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-01-04 18:16:58 +00:00