Commit Graph

54 Commits

Author SHA1 Message Date
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
Loic Dachary
6dac43fa46 ceph_manager: factorize with get_osd_dump_json
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:17 +01:00
Loic Dachary
5fc42b98ab ceph_manager: add get_pool_dump to return the json pool dump
Get the part of ceph osd dump specific to the pool given in argument.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-11-19 23:19:13 +01:00
Loic Dachary
f353c150a8 ceph_manager: add get_osd_dump_json to get the full output
Converts ceph osd dump_json into a python object.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-11-19 23:19:13 +01:00
Gregory Farnum
e8cd3f10d6 Merge pull request #221 from ceph/wip-forward-scrub
Wip forward scrub

Reviewed-by: John Spray <john.spray@redhat.com>
2014-11-07 16:16:38 -08:00
Sage Weil
8a18d8baaf Merge remote-tracking branch 'gh/giant' into m
Conflicts:
	tasks/ceph_manager.py
2014-10-29 14:31:26 -07:00
David Zafman
4ddadf0698 Thrasher: Disable ceph_objectstore_tool tests if old release missing command
Leaving disabled until merge of import/export fixes

Fixes: #9805

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-22 23:30:29 -07:00
David Zafman
523cb63b5f ceph_manager: ceph_objectstore_tool testing off by default
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-22 10:32:46 -07:00
David Zafman
a295c18a80 Thrasher: Disable ceph_objectstore_tool tests if old release missing command
Don't need to explicitly turn off the test during some upgrades
Leaving disabled until merge of import/export fixes

Fixes: #9805

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-22 19:21:04 -07:00
David Zafman
bdbcf760d9 ceph_manager: ceph_objectstore_tool testing off by default
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-22 10:34:26 -07:00
Greg Farnum
4db95170e6 document 'command' requirements on admin_socket method
Signed-off-by: Greg Farnum <greg@inktank.com>
2014-10-13 12:37:52 -07:00
Sage Weil
7ba50e0c89 tasks/ceph_manager: enable log for ceph_objectstore_tool
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-07 08:37:53 -07:00
tamil
a5a1cce3c7 included an option to ceph_objectstore_tool, whenever we have keyvaluestore_backend as a configurable parameter
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2014-09-23 07:50:49 -07:00
David Zafman
05eee9fa79 ceph_manager: Add test code to use export/import to move a pg
Check for more than 1 osd down and randomize on chance_move_pg (100%)
For now only export from older down osd to newly down osd to avoid missing map

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-30 16:20:22 -07:00
David Zafman
0cdf6e813d ceph_manager: Implement export/import when thrasher kills an osd
Use list-pgs to avoid races by seeing actual pgs present

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-30 16:20:22 -07:00
John Spray
322e2498de Merge pull request #101 from ceph/wip-7810
Wip 7810
2014-08-27 22:22:13 +01:00
Sage Weil
12a391ea01 thrashosds: increase osd revive timeout (75s -> 150s)
This is needed when running valgrind.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-25 08:52:02 -07:00