Commit Graph

70 Commits

Author SHA1 Message Date
John Spray
d8106fa9e1 tasks: add run_ceph_w to CephManager
Analogous to raw_cluster_command, but instead
of calling blocking CLI command we're invoking
the -w mode.

Signed-off-by: John Spray <john.spray@redhat.com>
2016-01-05 18:58:00 +00:00
Samuel Just
89dcc0daf3 ceph_manager: do_pg_scrub: keep scrubbing until it's done
The ceph pg scrub ... command isn't really guarranteed to
start a scrub, keep reissuing it until the scrub actually
happens.

Related: #12746
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-11-19 15:07:38 -08:00
Sage Weil
f467a98a29 tasks/ceph_manager: %d -> %s
Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-30 14:58:32 -04:00
Sage Weil
a53a80b9f0 tasks/ceph_manager: fix logging on failed pool property
Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-30 09:24:38 -04:00
Samuel Just
4e9f1df514 rados: add test for 13234.yaml
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-09-29 21:19:10 -07:00
Sage Weil
0e2814d81e tasks/ceph_manager: ignore failure getting pg_num
Otherwise, we may fail while racing with a workload that deletes a pool:

2015-09-23T15:01:52.855 INFO:tasks.workunit.client.1.vpm128.stdout:[ RUN      ] LibRadosTwoPoolsPP.PromoteSnapTrimRace
2015-09-23T15:01:53.892 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .rgw pg_num'
2015-09-23T15:01:54.206 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .rgw.gc pg_num'
2015-09-23T15:01:54.462 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .users.uid pg_num'
2015-09-23T15:01:54.696 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .users.email pg_num'
2015-09-23T15:01:55.006 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .users pg_num'
2015-09-23T15:01:55.296 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .rgw.buckets.index pg_num'
2015-09-23T15:01:55.523 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .log pg_num'
2015-09-23T15:01:55.752 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .usage pg_num'
2015-09-23T15:01:56.188 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get .rgw.buckets.extra pg_num'
2015-09-23T15:01:56.625 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get test-rados-api-vpm128-17360-6 pg_num'
2015-09-23T15:01:56.928 INFO:teuthology.orchestra.run.vpm176:Running: 'sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage ceph osd pool get test-rados-api-vpm128-17360-13 pg_num'
2015-09-23T15:01:57.193 INFO:teuthology.orchestra.run.vpm176.stderr:Error ENOENT: unrecognized pool 'test-rados-api-vpm128-17360-13'
2015-09-23T15:01:57.206 ERROR:teuthology.parallel:Exception in parallel execution
Traceback (most recent call last):
...

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-24 12:19:07 -04:00
Sage Weil
dad981d339 tasks: sudo ceph for cli
/var/run/ceph is 770.  This is mainly necessary for any
interaction with the daemon sockets, but it is what users do
and it may avoid log noise.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-11 12:15:01 -04:00
Sage Weil
a328e3e60d tasks/ceph_manager: dump pgs when recover times out
It is really hard to map a stuck recovery back to the pgs that
are stuck.  This will make it easy.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-08 08:59:49 -04:00
Sage Weil
c93fe1f1c6 tasks/ceph_manager: be silent about sending SIGHUPs
At the default interval this generates tons of log noise.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-04 13:08:04 -04:00
Andrew Schoen
a3c9a763b1 ceph_manager: don't add an osd to live_osds until it's been revived
also waits to remove it from dead_osds. this fixes an issue where
do_sighup tries to send a signal to an osd that has not been revived
yet.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2015-07-28 17:05:31 -05:00
Andrew Schoen
84d24038aa ceph_manager: adds a do_sighup method
This method runs in a separate greenlet than do_thrash and will pick a
random live osd to send a signal.SIGHUP to. There is a config option,
sighup_delay, which controls how long to delay between sending the
signals.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2015-07-28 14:46:12 -05:00
Andrew Schoen
ed73f67991 ceph_manager: adds a signal_osd method
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2015-07-28 14:13:30 -05:00
David Zafman
b255db820f thrasher: Can't test ceph-objectstore-tool if nodes turned off (powercycle)
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-06-09 14:24:47 -07:00
Samuel Just
91b300d12c rados/thrash: add test for radosgw with snaps
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-05-28 15:36:39 -07:00
Samuel Just
2a60852a1d squash: ceph_manager: add utility_task doc string 2015-05-04 14:21:31 -07:00
Samuel Just
015ed70f8a suites/rados: add test for 11429
This patch also adds some convenience facilities for making
some of the ceph_manager methods into tasks usable from a
yaml file.

Signed-off-by: Samuel Just <sjust@redhat.com>
2015-05-04 11:53:54 -07:00
John Spray
0de712f42a tasks/ceph_manager: DRY in mds_status
Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:38 +01:00
John Spray
5c1071b103 ceph_manager: fix bad type assertions
In python, isinstance(foo, str) will fail if
a unicode string is passed in.  The correct check
is basestring.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:38 +01:00
Yuri Weinstein
581fcf192f Merge pull request #380 from ceph/wip-11204
Make sure that ulimits are adjusted for ceph-objectstore-tool
2015-03-27 12:23:37 -07:00
Sage Weil
dcb5e8da9d Merge remote-tracking branch 'gh/hammer'
Conflicts:
	.gitignore
2015-03-26 17:09:33 -07:00
David Zafman
e6ce90fdb1 Make sure that ulimits are adjusted for ceph-objectstore-tool
Fixes: #11204

Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-26 15:18:47 -07:00
David Zafman
6c5300552d ceph_manager: Check for exit status 11 from ceph-objectstore-tool import
Fixes: #11139

Signed-off-by: David Zafman <dzafman@redhat.com>
2015-03-20 21:25:41 -07:00
Alfredo Deza
4ed442e44c stdin is no longer a kwarg
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 49a61dc2d2)
2015-02-26 14:48:40 -05:00
Alfredo Deza
33f7982480 add the log object to ceph_manager
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit f7c1ca4a1e)
2015-02-26 14:48:30 -05:00
Alfredo Deza
49a61dc2d2 stdin is no longer a kwarg
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-02-26 11:34:21 -05:00
Alfredo Deza
f7c1ca4a1e add the log object to ceph_manager
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-02-26 11:33:47 -05:00
Kefu Chai
64de3cd574 Thrasher: log backtrace of thrown exception
* add a wrapper to log uncaught exception to self.logger, greenlet also
  prints the backtrace and exception to stderr, but teuthology.log does
  not capture stderr. so we need to catch them by ourselves to reveal
  more info to root-cause this issue.
* log uncaught exception thrown by Thrasher.do_thrash() to self.log.

See: #10630
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-02-25 16:10:52 +08:00
David Zafman
ca04dc65c1 Thrasher: Fix log message
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-02-12 11:54:59 -08:00
David Zafman
e5876126a9 Formatting changes 2015-01-21 09:08:44 -08:00
David Zafman
14e27650a6 Fix wrapped line 2015-01-21 09:08:44 -08:00
David Zafman
bff2358373 Fix objectstore name changed to keyvaluestore
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-01-21 09:08:44 -08:00
David Zafman
b239dadc02 ceph_manager: Fix Thrasher kill_osd() to ignore pool going away
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-01-21 09:08:44 -08:00
David Zafman
4eda2967a4 ceph_manager: Thrasher fixes to run() calls to set check_status = False
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-01-21 09:08:44 -08:00
David Zafman
e0b0d41e4c ceph_manager: Re-enable Thrasher ceph-objectstore-tool testing
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-01-21 09:08:44 -08:00
David Zafman
4a195c78c1 ceph_manager: In Thrasher randomly remove past intervals
Signed-off-by: David Zafman <dzafman@redhat.com>
2015-01-21 09:08:44 -08:00
David Zafman
f9e088fcbc ceph_manager: In Thrasher disable ceph_objectstore_tool tests if old release missing command
Require ceph-objectstore-tool to be available on all OSD nodes
Log a message when tool is not available

Signed-off-by: David Zafman <dzafman@redhat.com>
2015-01-21 09:08:44 -08:00
Loic Dachary
ae68658339 ceph_manager: add ceph-objectstore-tool wrapper
Add the CephManager.objectstore_tool method to encapsulate a call to
ceph-objectstore-tool. The wrapper can convert an object name into the
PG id and figure out the primary OSD. The designated OSD is stopped
before running the command and restarted afterwards.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 12:31:15 -08:00
Loic Dachary
0465c0c53f ceph_manager: add object helpers
Add CephManager.methods to get information regarding the pools and PGs
used to store a given object.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 12:31:15 -08:00
Loic Dachary
f3bd336dbe repair_test: rework indentation to make it pep8 clean
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 12:31:15 -08:00
Loic Dachary
f08d95a5ea repair_test: rework to remove levels of indirection
The commit is large but does not introduce any semantic change and
consists primarily in code moving around, re-indented and removed.

Replace functions generating functions by functions and sequentially
iterating over a list of functions with a sequential call to the
functions.

Replace the setup/teardown with an equivalent using a with
statement and the ceph_manager.pool method.

Replace inline code with a call to ceph_manager.wait_for_all_up

It makes it easier to modify the tests, for instance to create erasure
coded pools and tests specific to them.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 12:31:15 -08:00
Loic Dachary
bd4926c4ac ceph_manager: rework indentation to make it pep8 clean
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 20:22:33 +01:00
Loic Dachary
50e7e6df2b ceph_manager: fix docstring typo
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 20:18:25 +01:00
Loic Dachary
7234481bae ceph_manager: define pool context
To create a pool before running a code bloc and remove it after.

   with manager.pool("mypool"):
        mytest..

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-01-13 20:18:25 +01:00
Sage Weil
0220cbb717 Revert "tasks/ceph_manager: dump raw cluster command at debug level"
This reverts commit b0ebeba79c.
2014-12-23 12:57:18 -08:00
Sage Weil
b0ebeba79c tasks/ceph_manager: dump raw cluster command at debug level
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-23 10:35:55 -08:00
David Zafman
eec179c687 ceph_objectstore_tool: Changes for rename of binary ceph-objectstore-tool
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-17 17:10:32 -08:00
John Spray
89beed1b0a tasks/ceph: conservative PG count in FS pools
This was tripping over the recent commit 42c85e80
in Ceph master, which tightens the limits on
acceptable PG counts per OSD, and was making
teuthology runs fail due to never going clean.

Rather than put in a new hardcoded count, infer
it from config.  Move some code around so that
the ceph task can get at a Filesystem object
to use in FS setup (this already has conf-getting
methods).

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-02 13:30:06 +00:00
Loic Dachary
b925be13bc ceph_manager: add pool type constants
The osd dump command displays pool types using numerics instead of
symbolic names. Create constants in the CephManager class to use instead
of numbers.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-11-20 22:38:25 +01:00
Loic Dachary
fd1ec39d38 ceph_manager: fix typo in get_pgid docstring
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-11-20 22:38:25 +01:00
Loic Dachary
2abb9f9087 ceph_manager: factorize with get_pool_dump
Replace code that duplicates get_osd_dump_json with a call to the
function.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-11-20 22:38:25 +01:00