Commit Graph

311 Commits

Author SHA1 Message Date
Sage Weil
c914df2de4 qa/workunits/cephtool/test.sh: ceph, not ./ceph
Fixes: #10053
Signed-off-by: Sage Weil <sage@redhat.com>
2014-11-10 14:12:11 -08:00
Loic Dachary
6741b71d90 tests: group workunits/cephtool/test.sh tests per daemon
So all tests related to a given daemon (mon, osd, mds) can be run at
once.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-11-09 11:59:51 +01:00
Loic Dachary
6fca23f610 qa: avoid qa/workunits/cephtool/test.sh unstability
For testing injectargs a configuration option was changed that has side
effects on the cluster. It could introduce random failures later. It is
replaced with a configuration option that cannot have adverse side
effects on the cluster.

http://tracker.ceph.com/issues/9919 Fixes: #9919

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-28 22:23:11 +01:00
Dan Mick
9a12467a9c Merge pull request #2733 from dachary/wip-9372-injectargs
cli: do not parse injectargs arguments twice

Reviewed-by:  Dan Mick <dan.mick@inktank.com>
2014-10-23 12:32:37 -07:00
Sage Weil
d2fe792c91 Merge remote-tracking branch 'gh/giant' 2014-10-21 10:39:42 -07:00
Joao Eduardo Luis
c589f3f6e9 mon: MDSMonitor: proper error output if pool DNE on 'add_data_pool'
Fixes: #9852

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-21 18:23:49 +01:00
Loic Dachary
2ec3609569 cli: CEPH_ARGS must be before injectargs
It is incorrect to append the content of CEPH_ARGS to the argument list
when running injectargs. For instance if

  CEPH_ARGS='--log-file the.log' \
    ./ceph tell osd.0 injectargs --no-osd_debug_op_order

translates into

    ./ceph tell osd.0 injectargs --no-osd_debug_op_order \
                                 --log-file the.log

it ends up changing the log file of osd.0 which is probably unintended.
Instead CEPH_ARGS is inserted before injectargs and it translates into:

    ./ceph tell osd.0 --log-file the.log \
                      injectargs --no-osd_debug_op_order

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-20 23:03:11 -07:00
Loic Dachary
a458bd83f5 cli: do not parse injectargs arguments twice
The arguments of injectargs being valid ceph arguments, they are.
consumed when the ceph cli calls rados.conf_parse_argv(). It can be
worked around by obsuring them as in:

   ceph tell osd.0 injectargs '--osd_debug_drop_ping_probability 444'

where '--osd_debug_drop_ping_probability 444' is a single argument that
does not match any known argument. The trick is that it will be
evaluated again once it reaches the OSD or the MON and translated into
the expected list of arguments. Although it is clear once explained, it
is obscure and leads to strange combinations such as:

   ceph tell osd.0 injectargs '--osd_debug_op_order '

(note the extra space at the end) to set boolean parameters. A better
workaround is to add a -- marking the end of the options as in:

   ceph tell osd.0 -- injectargs --osd_debug_op_order

this one is unfortunately much less documented and the user does not
usually know the exact semantic of --, let alone where it should be
placed.

The simpler solution is to split the argument list in two if
"injectargs" is found. The arguments that show after the "injectargs"
argument is removed from the list of arguments until parsing is
complete. It implements the more intuitive syntax:

   ceph tell osd.0 injectargs --osd_debug_op_order

and the other forms are still valid for backward compatibility.

http://tracker.ceph.com/issues/9372 Fixes: #9372

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-20 23:03:07 -07:00
Joao Eduardo Luis
ac3c1cb5d0 qa/workunits: cephtool: don't remove self's key on auth tests
Suites run with CEPH_TEST_CLI_DUP_COMMAND=1, which will send a duplicate
command for every command issued with the 'ceph' tool.  Behavior is to
get a reply from the command and then send a duplicate, looking for the
same outcome (guaranteeing idempotency of the operations).  However, it
so happens that if you remove the entity's own key from the keyring and
you happen to be unlucky enough so that the client's connection gets
failed (we also run tests with connection failure injections), the
'ceph' tool won't be able to reconnect to the cluster to send the
duplicate command (as it's entity no longer exists in the cluster's
keyring).

We rewrite the test instead of resorting to ugly hacks to work around
this behavior, simply having a new 'role-definer' added by the existing
'role-definer' (which we weren't testing anyway, so bonus points for
that) and then have one removing the other (to test the procedure) and
finally using 'client.admin' to remove the last 'role-definer'.

Fixes: #9820

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-20 18:00:15 +01:00
Loic Dachary
3741aab39e auth: unit tests for auid display
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-15 13:25:17 -07:00
Loic Dachary
9b3d345d50 qa: move mon_mds tests last
Assuming they are more likely than others to leave OSD/MON in an
unstable state that could have undefined side effects on the tests
following it. A cleaner solution would be to run them in a separate
script that is run on an independent cluster.

http://tracker.ceph.com/issues/9700 Fixes: #9700

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-08 16:33:22 +02:00
John Spray
e27cf4139f qa: cephtool tests for tell mds.X
Signed-off-by: John Spray <john.spray@redhat.com>
2014-10-08 12:01:21 +01:00
John Spray
620a722da3 qa: fixup cephtool test when MDS exists
We added MDS resetting code here a while back,
but the order of operations was such that a
"cluster up" was being run between a fail_all_mds
and the point at which we needed the map not to
be interfered with (testing setmap).

Also the new fs create/destroy cycles for testing
EC pool handling were missing calls to stop the
daemons before fs rm.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-10-08 11:58:20 +01:00
Sage Weil
1036e9827c Merge remote-tracking branch 'gh/giant'
Conflicts:
	src/osdc/Objecter.cc
2014-10-07 12:40:45 -07:00
Sage Weil
2ac2a96898 Merge pull request #2560 from ceph/wip-9418
mon: add new profiles & audit cap checks

Reviewed-by: Sage Weil <sage@redhat.com>
2014-10-07 06:32:53 -07:00
Loic Dachary
f1becf9ad7 qa: ceph tell must retry on ENXIO
It is expected for ceph tell to fail with ENXIO if the daemon it is
trying to join is not ready for some reason. This should be handled as a
transient error instead of a fatal error.

Add two shell functions to help with retry. They may prove useful if
other cases requiring a few retries show up.

http://tracker.ceph.com/issues/9655 Fixes: #9655

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-04 11:34:27 +02:00
Joao Eduardo Luis
ea96863d2a qa/workunits: cephtool: test auth profiles
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-10-03 16:24:19 +01:00
Loic Dachary
29356d8765 qa: fix osd pool ls invalid test
expect_false does not extend past the pipe and fails because the command
succeeds

introduced in f05c977bbcd310a83e6df03344a72d4cc06e1cc3

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-01 23:41:09 +02:00
João Eduardo Luís
46166eefe6 Merge pull request #2452 from ceph/wip-pool-ls
mon: add 'osd pool ls [detail]' command

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-01 16:22:42 +00:00
Sage Weil
f36e8540d0 Merge remote-tracking branch 'gh/giant'
Conflicts:
	qa/workunits/cephtool/test.sh
	src/test/erasure-code/TestErasureCodeIsa.cc
2014-09-29 16:17:15 -07:00
Loic Dachary
beade63a17 qa/workunits/cephtool/test.sh: fix thrash (ultimate)
Keep the osd trash test to ensure it is a valid command but make it a
noop by giving it a zero argument (meaning thrash 0 OSD maps).

Remove the loops that were added after the command in an attempt to wait
for the cluster to recover and not pollute the rest of the tests. Actual
testing of osd thrash would require a dedicated cluster because it the
side effects are random and it is unnecessarily difficult to ensure they
are finished.

http://tracker.ceph.com/issues/9620 Fixes: #9620

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-29 13:47:06 +02:00
John Spray
b8e6a6b180 Merge remote-tracking branch 'origin/giant' 2014-09-24 11:40:52 +01:00
Loic Dachary
13780d7551 mon: osd find / metadata --format plain fallback
ceph --format plain osd find 1 (and metadata) are not implemented and
must fallback to the default (json-pretty).

http://tracker.ceph.com/issues/9538 Fixes: #9538

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 15:31:33 +02:00
Loic Dachary
7ac60d8caf tests: check osd health in cephtool/test.sh
Add a trivial osd health test at the beginning of each group of
tests. When facing an intermittent failure, it is difficult to diagnose
if the cluster appears to be missing an OSD but there is no indication
as to when the OSDs were last up.

The tests are now only run after all OSDs are up.

These checks can be disabled with --no-sanity-check to allow running
some tests that have less requirements than running all the tests.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 13:23:44 +02:00
Loic Dachary
4d75c4c36d tests: qa/workunits/cephtool/test.sh ! and -e
From the bash man page:

   set -e exit immediately ... The shell does not exit ... if the
   command's return value is being inverted with !

Add an explicit exit 1 where appropriate.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-19 13:09:18 +02:00
John Spray
681a49c412 mon: forbid tier changes when in use by FS
* Removing tiers from a base pool in use by CephFS is forbidden.
* Using CephFS pools as tiers is forbidden.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-16 17:16:23 -07:00
John Spray
80441cda8c mon: prevent cache pools being used CephFS
Fixes two things:
 * EC pools are now permissible if they have a cache overlay
 * Pools are not permissible if they are a cache tier.

Fixes: #9435

Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-16 17:16:23 -07:00
Sage Weil
f05c977bbc mon: add 'osd pool ls [detail]' command
This is much friendlier than

 ceph osd dump | grep ^pool

Signed-off-by: Sage Weil <sage@redhat.com>
2014-09-10 08:07:53 -07:00
Loic Dachary
e13ddc7dae tests: qa/workunits/cephtool/test.sh early fail
Add tests to fail as soon as an unexpected condition is met in
test_mon_osd. Otherwise the actual error will be more difficult find in
the logs.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-08-31 22:59:04 +02:00
Sage Weil
977f85279f qa/workunits/cephtool/test.sh: test reweight-by-pg
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-19 08:16:41 -07:00
Sage Weil
34fe7a8214 Merge pull request #2217 from ceph/wip-problem-osds
mon: 'ceph osd blocked-by' for histogram of peers OSDs are waiting for

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-08-16 13:15:10 -07:00
Sage Weil
cec40dae17 qa/workunits/cephtool: verify setmaxosd doesn't let you clobber osds
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-14 13:18:07 -07:00
Sage Weil
bee79ec480 qa/workunits/cephtool: add trivial 'ceph osd blocked-by' test
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-08 18:12:31 -07:00
Sage Weil
6380f47868 qa/workunits/cephtool: add simple 'ceph osd perf' test
Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-08 18:12:31 -07:00
Sage Weil
ea731ae142 qa/workunits/cephtool/test.sh: fix 'ceph df ...' tests
Broken by ee2dbdb0f5 and friends.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-08-06 13:16:49 -07:00
Dan Mick
aa9ae1f270 qa/workunits/cephtool/test_daemon.sh: verify ceph -c works with daemon
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-07-30 14:52:48 -07:00
Dan Mick
22d20f39b7 qa/workunits/cephtool/test_daemon.sh: typo
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-07-30 14:52:48 -07:00
Dan Mick
97a8d5a9fd qa/workunits/cephtool/test_daemon.sh: allow local ceph command 2014-07-30 14:52:44 -07:00
John Spray
0cd0268421 qa: generalise cephtool for vstart+MDS
Previously this test assumed no pre-existing
filesystem and no MDS running.  Generalize it
to nuke any existing filesystems found before
running, so that you can use it inside a vstart
cluster that had MDS>0.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-07-18 16:53:58 +01:00
Sage Weil
4d6899c756 qa/workunits/cephtool/test.sh: fix erasure_code_profile get test
I broke this in ce9f12d7a2 (the pool isn't
type erasure).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-07-17 10:14:35 -07:00
Sage Weil
ce9f12d7a2 qa/workunits/cephtool/test.sh: test osd pool get erasure_code_profile
Signed-off-by: Sage Weil <sage@inktank.com>
2014-07-16 17:55:36 -07:00
Joao Eduardo Luis
50e93c2138 qa/workunits: cephtool: adjust pool name where missing as it has changed
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-11 15:22:43 +01:00
Joao Eduardo Luis
6cd345732b qa/workunits: cephtool: cleanup after pool creation
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-11 01:02:04 +01:00
Joao Eduardo Luis
704b0a33f2 qa/workunits: cephtool: pool needs to be a tier to be used as such
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-11 00:17:47 +01:00
Joao Eduardo Luis
49db676715 qa/workunits: cephtool: test erroneous 'tier remove'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-11 00:17:47 +01:00
Joao Eduardo Luis
9fea033f30 qa/workunits: cephtool: test get/set on both tier and non-tier pools
Make sure gets and sets of tiering-specific variables succeed on tier
pools and fail on non-tier pools.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-11 00:17:47 +01:00
Joao Eduardo Luis
df5944955d qa/workunits: cephtool: split get/set on tier pools from get/set tests
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-11 00:17:47 +01:00
Joao Eduardo Luis
b927c0de7d qa/workunits: cephtool: test for 'osd pool {get,set}-quota'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-08 19:33:14 +01:00
Sage Weil
55e297ad9a Merge pull request #2046 from ceph/wip-8670
mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Sage Weil <sage@redhat.com>
2014-07-02 17:44:56 -07:00
Joao Eduardo Luis
ddc04c83ff mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it
Add support to get the values for the following variables:
 - target_max_objects
 - target_max_bytes
 - cache_target_dirty_ratio
 - cache_target_full_ratio
 - cache_min_flush_age
 - cache_min_evict_age

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-07-02 19:35:31 +01:00
John Spray
e2b151d009 mds: Update default FS name
From 'default' to 'cephfs' so that it looks
at least vaguely meaningful.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-07-01 18:40:26 +01:00
John Spray
f62f7f57e0 qa: update cephtool EC pools test to respect IDs
...of data and metadata pools which are no longer
constant.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-07-01 18:40:03 +01:00
John Spray
710561cb8d mon/MDSMonitor: EC check in 'fs new' like newfs
Signed-off-by: John Spray <john.spray@redhat.com>
2014-07-01 18:40:03 +01:00
John Spray
44eb259341 qa: add a check for crash_replay_interval autoset
... that after a fs new on fresh pools, crash_replay_interval
is set to the default on the data pool.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-07-01 18:40:03 +01:00
Loic Dachary
522174b066 qa: support running under non privileged user
If the test is run against a cluster started with vstart.sh (which is
the case for make check), the --asok-does-not-need-root disables the use
of sudo and allows the test to run without requiring privileged user
permissions.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-07-01 08:42:58 +02:00
Gregory Farnum
d7f3c88d83 Merge pull request #1942 from ceph/wip-fs-cmds
Wip fs cmds

Reviewed-by: Greg Farnum <greg@inktank.com>
2014-06-30 20:52:46 -07:00
Sage Weil
bcc09f9376 qa/workunits/cephtool/test.sh: sudo ceph daemon
Signed-off-by: Sage Weil <sage@inktank.com>
2014-06-30 16:41:17 -07:00
John Spray
7294e8c4df test/qa: update for MDSMonitor changes
Accomodate changes:
 * data and metadata pools no longer exist by default
 * filesystem-using tests must use `fs new` to create
   the filesystem first.

Signed-off-by: John Spray <john.spray@inktank.com>
2014-06-30 10:38:57 +01:00
Joao Eduardo Luis
48e38ac632 qa/workunits: cephtool: fix 'osd bench' test
Commit 7dc93a9651f602d9c46311524fc6b54c2f1ac595 fixed an incorrect
behavior with the OSD's 'osd bench' value hard-caps.  The test wasn't
appropriately modified unfortunately.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
4b0809a13e qa/workunits: cephtool: only run heap profiler test if tcmalloc enabled
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
5c4616e100 qa/workunits: cephtool: set +e for the tcmalloc tests
Avoids failing the tests when tcmalloc is not present

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
6725543515 qa/workunits: cephtool: delete unnecessary function calls
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:36 +01:00
Joao Eduardo Luis
946bd0dad4 qa/workunits: cephtool: disable bash debug when not running tests
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:35 +01:00
Joao Eduardo Luis
5d26575ef2 qa/workunits: cephtool: allow running individual tests
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:35 +01:00
Joao Eduardo Luis
f4184086d0 qa/workunits: cephtool: cleanup state after erasure-code-profile test
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 01:00:35 +01:00
Joao Eduardo Luis
780424df3a qa/workunits: cephtool: add/remove comments
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:57:14 +01:00
Joao Eduardo Luis
3d14a96f4b qa/workunits: cephtool: split into properly indented functions
The test was a big sequence of commands being run and it has been growing
organically for a while, even though it has maintained a sense of
locality with regard to the portions being tested.

This patch intends to split the commands into functions, allowing for a
better semantic context and easier expansion.  On the other hand, this
will also allow us to implement mechanisms to run specific portions of
the test instead of always having to run the whole thing just to test a
couple of lines down at the bottom (or have to creatively edit the test).

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:55:46 +01:00
Joao Eduardo Luis
04658b7b2b qa/workunits: cephtool: move test line to where it's more appropriate
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:52:44 +01:00
Joao Eduardo Luis
db6cc133ba qa/workunits: cephtool: split into functions
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-26 00:51:05 +01:00
Samuel Just
4e68ac34ec Merge pull request #2001 from dachary/wip-tiermsg
mon: test that pools used in tiers cannot be removed

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-06-25 13:39:48 -07:00
Joao Eduardo Luis
378b5add22 qa/workunit: cephtool: test mds newfs and add_data_pool with ec pools
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-06-24 00:48:43 +01:00
Loic Dachary
39a4b78177 mon: test that pools used in tiers cannot be removed
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-06-20 09:52:31 +02:00
Sage Weil
4951244726 Merge remote-tracking branch 'gh/next' 2014-06-02 22:24:48 -07:00
Joao Eduardo Luis
38405d3554 qa/workunits/cephtool: test setting options using SI units
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-05-30 22:09:23 +01:00
Loic Dachary
c2225f874d mon: fix set cache_target_full_ratio
It was a noop because it was incorrectly using the variable n. Add a
test to protect against regression.

http://tracker.ceph.com/issues/8440 Fixes: #8440

Reported-by: Geoffrey Hartz <hartz.geoffrey@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-05-27 10:24:18 +02:00
Joao Eduardo Luis
fd970bbc95 mon: OSDMonitor: disallow nonsensical cache-mode transitions
Fixes: 8155

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-05-03 03:42:19 +01:00
Loic Dachary
aae16ab355 mon: add ceph osd pool set <pool> auid
When a pool is created with ceph osd pool create, the auid is not
inferred from the session auid and is set to zero. Add the

  ceph osd pool set <pool> auid <int>

command to set it after it is created, and the matching get:

  ceph osd pool get <pool> auid

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-04-23 22:20:42 +02:00
Sage Weil
2cb0bac697 qa/workunits/cephtool/test.sh: make set pg_num test non-racy
Loop while the pool is creating.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-04-21 14:18:21 -07:00
Greg Farnum
82edda23aa test: handle the create-pg delay when testing cache split syntax
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-04-18 13:41:00 -07:00
Sage Weil
015df934af mon/OSDMonitor: require force argument to split a cache pool
There are several perils when splitting a cache pool:

 - split invalidstes pg stats, which disables the agent
 - a scrub must be manually triggered post-split to rebuild stats
 - the pool may fill the OSDs during that period.
 - or, the pool may end up beyond the 'full' mark and once scrub does
   complete and the agent activate we may block IO for a long time while
   we catch up with flush/evict

Make it a bit harder for users to shoot themselves in the foot.

Fixes: #8043
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-15 13:57:21 -07:00
Sage Weil
e44f85ce18 qa/workunits/cephtool/test.sh: test 'osd pg-temp ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-31 14:12:51 -07:00
Sage Weil
8c761c4797 mon: make 'ceph osd erasure-code-profile set ...' idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-31 10:01:43 -07:00
Loic Dachary
b273011874 osd,mon: use profile instead of properties
The qa and functional tests are adapted to the new command prototype
requiring a profile instead of a list of properties. When possible the
implicit ruleset creation is used to simplify the test setup.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-03-18 00:23:42 +01:00
Sage Weil
b70db7e735 Merge remote-tracking branch 'gh/firefly' 2014-03-11 19:20:27 -07:00
Sage Weil
2fbd77206c qa/workunits/cephtool/test.sh: fix thrash (more)
If I have to touch this again I will remove it.  Ugh.  This time,

ubuntu@teuthology:/var/lib/teuthworker/archive/teuthology-2014-03-11_02:30:01-rados-firefly-distro-basic-plana/125922

hit NXIO a few lines down because one of the OSDs was still down.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-11 17:03:23 -07:00
Sage Weil
1c8c61897d qa/workunits/cephtool/test.sh: fix 'osd thrash' test
- fix the wait check for osds to come back up
- make sure they get marked back in, too

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2014-03-07 15:21:38 -08:00
Sage Weil
0fd636c488 Merge remote-tracking branch 'gh/firefly'
Conflicts:
	README
2014-03-07 08:19:20 -08:00
Sage Weil
b436930779 qa/workunits/rest/test.py: do not test 'osd thrash'
This wreaks havoc on our QA because it marks osds up and down and then
immediately after that we try to scrub and some osds are still down.

Adjust the CLI test to wait for all OSDs to come back up after thrashing.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-06 13:46:10 -08:00
Gregory Farnum
b642e3884c Merge pull request #1343 from ceph/wip-cache-warn-full
mon: warn when cache tier is full

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-03-05 14:22:34 -08:00
Sage Weil
b093958a11 Merge pull request #1351 from ceph/wip-7248
osd: OSD: limit the value of 'size' and 'count' on 'osd bench'

Reviewed-by: Sage Weil <sage@inktank.com>
2014-03-05 14:18:28 -08:00
Sage Weil
0592368070 mon: warn when pool nears target max objects/bytes
The cache pools will throttle when they reach the target max size, so it
is important to make the administrator aware when they approach that point.
Unfortunately it is not particularly easy to efficiently keep track of
which PGs have hit their limit and use that for reporting.  However, it
is easy to raise a flag when we start to approach the target for the
entire pool, and that sort of early warning is arguably more useful
anyway.

Trigger the warning based on the target full ratio.  Not when we hit the
target, but when we are 2/3 between it and completely full.

Implements: #7442
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 11:59:07 -08:00
Sage Weil
c029c2fbf1 mon/OSDMonitor: add 'osd tier add-cache <pool> <size>' command
This is a friendlier interface for setting up a cache tier with some
reasonable defaults (defined via config options).  This will simplify
the user experience and documentation.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:16:24 -08:00
Sage Weil
08efb45889 OSDMonitor: do not add non-empty tier pool unless forced
In general, users should not use non-empty pools as new tiers or else
things can behave strangely:

 - the data sets are unrelated behavior will be... strange.
 - if the cache pool is not "new" and does not do the OMAP flag, the OSD
   will not know not to flush omap objects to an EC base tier
 - probably other random stuff I'm forgetting

Allow a user to shoot themselves in the foot with --force-nonempty.

Implements: #7457
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-03 21:11:17 -08:00
Joao Eduardo Luis
aca6ac343e qa: workunits: cephtool: test 'osd bench' limits
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-03 15:28:04 +00:00
Kai Zhang
dc20c7d674 OSDMonitor: enable getting hit set parameters
We would like to get the hit set parameters: hit_set_type |
hit_set_period | hit_set_count | hit_set_fpp via OSDMonitor

Signed-off-by: Kai Zhang <zakir.exe@gmail.com>
2014-03-01 00:22:14 -08:00
Loic Dachary
1340b360b5 erasure-code: test that changing the pool size is not allowed
http://tracker.ceph.com/issues/7360 fixes #7360

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-23 07:52:59 -08:00
Sage Weil
dcf20b9bf3 osd: add 'notieragent' flag to OSDMap
This will pause tiering agent work.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-15 22:09:38 -08:00
Loic Dachary
199bdb1ba8 mon: test dirty stats in ceph df detail
Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-15 22:09:38 -08:00
Sage Weil
95f25ce092 mon/OSDMonitor: allow new pool policy fields to be set
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-15 22:08:12 -08:00
Sage Weil
af848d4a4a Merge pull request #1176 from ceph/wip-primary-affinity
osd: primary affinity

Added primary-affinity thrashing to thrashosd.py.

Reviewed-by: Loic Dachary <loic@dachary.org>
2014-02-15 16:59:35 -08:00
Loic Dachary
d921d9b383 qa: do not create erasure pools yet
comment out erasure pool related tests when an OSD is involved because
it does not work yet. See http://tracker.ceph.com/issues/7360.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-16 00:53:13 +01:00
Sage Weil
7e9f03b18e Merge pull request #1181 from dachary/wip-7277
DNM: mon: s/ENOSYS/ENOTSUP/

Reviewed-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-02-15 10:08:45 -08:00
Sage Weil
1cc8c258b9 mon/OSDMonitor: add 'osd primary-affinity ...' command
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-12 13:38:12 -08:00
Sage Weil
d136eb4cbd mon: allow firefly crush tunables to be selected
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-11 11:12:56 -08:00
Sage Weil
bb6d3f81a7 rest/test.py: use larger max_file_size for mds set test
Current min is 64k.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-07 06:11:57 -08:00
Loic Dachary
302fc924fe mon: s/ENOSYS/ENOTSUP/
On Linux ENOTSUP is remapped
/usr/include/x86_64-linux-gnu/bits/errno.h

    /* Linux has no ENOTSUP error code.  */
    # define ENOTSUP EOPNOTSUPP

and should have different values on other operating systems. On Ubuntu
precise the string returned when translating the error value of ENOTSUP
or EOPNOTSUPP is always EOPNOTSUPP but on Ubuntu saucy it is always
ENOTSUP.

Replace ENOSYS with ENOTSUP because the expected semantic is very
similar and modify the test to not check on the string translation of
the error.

Rework the check_response shell function to optionaly check the return
code. The erasure coded pool size change test verifies the error message
only but not the error code.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-07 12:41:42 +01:00
David Zafman
42a64e19b7 Revert test case of "mon: OSDMonitor: do not allow changing an erasure-coded pool's size"
This reverts part of commit c8c4cc6e81816069886af6bff968712993554759.

Fixes: #7355

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-02-06 19:13:20 -08:00
Joao Eduardo Luis
c8c4cc6e81 mon: OSDMonitor: do not allow changing an erasure-coded pool's size
Fixes: 7277

Reviewed-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-02-04 10:22:48 +01:00
Sage Weil
eb9ffd5a79 mon: use 'mds set inline_data ...' for enable/disable of inline data
This makes the management interface a bit more consistent.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-03 17:50:32 -08:00
Sage Weil
408b0c8e75 mon: fix 'mds set allow_new_snaps'
We had already added this as a flag (set/unset) when I generalized the
'mds set_max_mds' to be 'ceph mds set <var> <val>'.  Switch the snaps
flag to be a key/value to with true/false (similar to the hashpspool
pool flag) since there are fewer users and the var/val approach is more
general.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2014-02-03 17:50:18 -08:00
Loic Dachary
08c17b7c5c qa: cleanup cephtool/test.sh tmp files
When run in a shared environment ( as opposed as a machine created for
the purpose of running this test only ), it is important to cleanup
leftovers to avoid poluting the /tmp space. Create a common temporary
directory for all tmp files.

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-01-14 17:31:04 +01:00
Sage Weil
ca9acb9634 mon: implement 'mds set max_mds|max_file_size'
First, add the ability to modify max_file_size.  While we are at it, move
to a more sensible interface for adjusting max_mds too.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-01-09 04:31:41 -08:00
Loic Dachary
a10fc025d7 osd: build_simple creates a single rule
The three rules created by build_simple are identical. They are replaced
by a single rule named replicated_rule which is set to be used by the
data, rbd and metadata pools.

Instead of hardcoding the ruleset number to zero, it is read from
osd_pool_default_crush_ruleset which defaults to zero.

The CEPH_DEFAULT_CRUSH_REPLICATED_RULESET enum is moved from osd_type.h to
config.h because it may be needed when osd_type.h is not included.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-27 00:13:47 +01:00
Loic Dachary
5cf2cdc073 qa: remove osd pool create erasure tests
Creating an erasure pool will crash the OSD because OSD::_make_pg
asserts if the type is not replicated. The tests related to erasure
coded pool creation are removed from qa/workunits/cephtool/test.sh.

The osd-create-pool.sh unit test covers the cases removed from test.sh
more extensively. The intent is to check the interactions with the MON
only, therefore it does not run an OSD and the absence of erasure code
placement group backend implementation is not an issue.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-26 10:01:19 +01:00
Loic Dachary
df0d038d7b mon: osd create pool must fail on incompatible type
When osd create pool is called twice on the same pool, it will succeed
because the pool already exists. However, if a different type is
specified, it must fail.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-22 23:43:50 +01:00
Loic Dachary
a0d1521ddb replace pool type REP with REPLICATED
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-22 08:15:24 +01:00
Loic Dachary
1e238e6f95 mon: pool create will not fail if the type differs
It looked like it worked because the wrapper hide the error. The failing
tests are commented out so that the other tests can be used.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 22:00:31 +01:00
Joao Eduardo Luis
b3ee598f50 qa: workunit: cephtool: test osd pool create with erasure type
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-12-19 02:21:05 +00:00
Sage Weil
1bb46c0ec9 Merge pull request #955 from ceph/wip-crush-2
crush: make set_chooseleaf_tries work with firstn chooseleaf, too

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>
2013-12-18 10:00:55 -08:00
Sage Weil
7e0c84b84d mon/OSDMonitor: 'osd crush show-tunables'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-18 08:35:25 -08:00
Sage Weil
0d217cf9e9 qa/workunits/cephtool/test.sh: clean up our client.xx.keyring
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-17 18:18:46 -08:00
Sage Weil
58d68995c4 Merge pull request #947 from dachary/wip-6824
mon: set ceph osd (down|out|in|rm) error code on failure

Reviewed-by: Sage Weil <sage@inktank.com>
2013-12-15 21:16:48 -08:00
Sage Weil
edc4224de4 Merge remote-tracking branch 'gh/wip-hitset'
Reviewed-by: Greg Farnum <greg@inktank.com>

Conflicts:
	src/common/config_opts.h
	src/osd/ReplicatedPG.cc
	src/osdc/Objecter.cc
	src/vstart.sh
2013-12-15 16:57:23 -08:00
Loic Dachary
31507c90f0 qa: test for error when ceph osd rm is EBUSY
http://tracker.ceph.com/issues/6824 fixes #6824

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-15 23:06:26 +01:00
Loic Dachary
4b9a41aa17 qa: make cephtool test imune to pool size
instead of assuming the pool size is 2, query it and increment it to
test for pool set data size. It allows to run the test from vstart.sh
without knowing what the required pool size is in advance:

    rm -fr dev out ;  mkdir -p dev ; \
     MON=1 OSD=3 ./vstart.sh -n -X -l mon osd

    LC_ALL=C PATH=:$PATH CEPH_CONF=ceph.conf \
      ../qa/workunits/cephtool/test.sh

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-15 21:45:31 +01:00
Loic Dachary
f9cfa24adc qa: add function name and line number to cephtool output
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-15 21:45:31 +01:00
Loic Dachary
cb352484f1 qa: silence cephtool tests cleanup
The file removal installed to be triggered when the script stops must
not fail if the file does not exist.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-15 21:45:31 +01:00
Sage Weil
0cd36e0587 mon/OSDMonitor: take 'osd pool set ...' value as a string again
We ran into problems before when we made this a string because a mixed
cluster of mons might forward a client request with the wrong schema.
To make this work, we make the new code understand both the new and
old schema, and also backport a change to emperor and dumpling to
handle the new schema.

For the previous attempt to do this, see:
 337195f046
 2fe0d0d97a

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-12-11 15:29:42 -08:00
Sage Weil
b92f431100 mon/OSDMonitor: set hit_set fields
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-12-06 14:37:27 -08:00
tamil
11e26ee424 s/true/1 and s/false/0
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-12-05 13:05:12 -08:00
Sage Weil
d39ff4c3d8 mon/OSDMonitor: 'osd metadata N' command
Report recorded metadata about an OSD.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-11-09 06:10:14 -08:00
Sage Weil
0d508156ca Merge pull request #687 from ceph/wip-pool
mon: make 'mon {add,remove}_data_pool ...' take pool name or id

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-10-15 15:09:09 -07:00
Sage Weil
e2602c549f mon: make 'mon {add,remove}_data_pool ...' take pool name or id
Take either a pool name or an id.  Fix up the tests accordingly.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-14 16:46:58 -07:00
Joao Eduardo Luis
1c2886964a mon: OSDMonitor: allow (un)setting 'hashpspool' flag via 'osd pool set'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-10-11 08:05:02 -07:00
Dan Mick
1ba7e47c6a ceph_argparse.py, cephtool/test.sh: fix blacklist with no nonce
It's legal to give a CephEntityAddr to osd blacklist with no nonce,
so allow it in the valid() method; also add validation of any nonce
given that it's a long >= 0.

Also fix comment on CephEntityAddr type description in MonCommands.h,
and add tests for invalid nonces (while fixing the existing tests to remove
the () around expect_false args).

Fixes: #6425
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-09-26 18:06:30 -07:00
Joao Eduardo Luis
b1eeaddd5f qa: workunits: cephtool: check if 'heap' commands are parseable
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-09-20 17:51:50 +01:00
Greg Farnum
3516996bb3 mon/OSDMonitor: 'osd tier {set,remove}-overlay <pool> [tierpool]'
Also prevent 'osd tier remove ...' if the tierpool is the current overlay.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-30 14:06:33 -07:00
Greg Farnum
efb7ab2ae4 qa/workunits/cephtool/test.sh: test osd tier CLI
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-30 14:06:33 -07:00
Sage Weil
0c1fd629fa qa/workunits/cephtool/test.sh: test set/unset of all osd flags
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-07 08:35:48 -07:00
Sage Weil
db27c3f5a3 qa/workunits/cephtool/test.sh: add tests for 'pg dump ...'
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-05 13:06:42 -07:00
Dan Mick
6dd4ff8371 cephtool/test.sh, rest/test.py: add tell command tests
Also add HTTP method to test.py output

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-08-05 11:21:19 -07:00
Dan Mick
55095d56ea cephtool/test.sh: add a few tests for invalid command args
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-08-05 11:20:41 -07:00
Sage Weil
e5d9ac64df qa/workunits/cephtool/test_daemon.sh: we should error on bad command
See #5872.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-04 15:24:59 -07:00
Sage Weil
b4ed4e2ebd qa/workunits/cephtool/test_daemon.sh: sudo
Fixes: #5814
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-31 13:46:12 -07:00
Sage Weil
e70e08c060 cephtool/test.sh: add tests for mon daemon command
[Also move into a separatate test script; validate result -sage]

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-30 23:04:41 -07:00
Sage Weil
2e216b5474 qa/workunits/cephtool/test.sh: test 'osd create <uuid>'
Make sure it gives us back the same id.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-07-17 18:18:51 -07:00
Sage Weil
56c5b83589 qa/workunits/cephtest/test.sh: put 'osd ls' before any 'osd create' tests
A monc/mon connection fault or the dup command test flag may mean an extra
osd id is created that we isn't actually up; reorder so that doesn't screw
up 'osd ls'.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-17 09:36:36 -07:00
Sage Weil
f129d17414 qa/workunits/cephtool/test.sh: mds cluster_down/up are idempotent
As of d45429b81ab9817284d6dca98077cb77b5e8280f; fix the test.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-16 17:16:36 -07:00
Dan Mick
07590ae865 cephtool/test.sh: sync status no longer supported
da0aff28ab478bcc3136715f92bc1af8d4b403c1 removed 'ceph sync status';
test script needs to stop trying it

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
e66d011cc8 cephtool/test.sh cleanup
1) don't pass subshell to expect_false
2) osd pause/unpause don't take arguments (apply to all OSDs)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Dan Mick
ca55c3416e cephtool/test.sh: add case for auth add with no caps
Test case for failure in #5467.  Supplying new auth info overwrites.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-06-26 17:09:49 -07:00
Sage Weil
fd769c0f21 qa/workunits/cephtool/test.sh: fix and cleanup several tests
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-20 11:28:26 -07:00
Sage Weil
5de54f6a79 a/workunits/cephtool/test.sh: --no-log-to-stderr when examining stderr
We can get random messages to stderror from socket reconnects and such;
discard those if we are looking at stderr in the test.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-20 11:04:26 -07:00
Sage Weil
701943a278 qa/workunits/cephtool/test.sh: look for 'ceph log' via -w, not in log file
'ceph-conf ...' doesn't give you final/default values, only what is in the
conf file.  Use -w output to test this instead.

Fixes: #5327
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-12 14:00:24 -07:00
Dan Mick
b0469a14cf cephtool/test.sh: fix "expect failure"
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-03 17:30:41 -07:00
Dan Mick
bec630fc2f cephtool/test.sh: add test for --verbose and --concise 2013-05-22 13:08:11 -07:00
Dan Mick
4698d99c38 Enhance cephtool tests for coverage of CLI rewrite
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-05-21 16:23:41 -07:00
Dan Mick
2491f976e4 workunits/cephtool: add tests for ceph osd pool set/get
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-18 22:36:31 -08:00
Dan Mick
aea898db2b ceph: reject negative weights at ceph osd <n> reweight
Check the integer (fixed-point) value to avoid any worries
about floating-point rounding.  Add tests for reweight < 0.

Fixes: #3872
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
2013-01-18 18:32:21 -08:00
Dan Mick
7d9d7651be workunit/cephtool: Use '! cmd' when expecting failure
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-01-18 18:32:13 -08:00
Sage Weil
2e49d5c4b7 cephtool: add qa workunit
A few basic sanity checks, including a tell on a down osd.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-19 08:37:42 -08:00