Commit Graph

51 Commits

Author SHA1 Message Date
Joao Eduardo Luis
f0653c0401 qa/workunits: mon: auth_caps: account for mon blank caps
test creating and entity with blank caps with and without '--force'
being specified.  without '--force' they must fail with EINVAL as the
monitor will not be able to parse them.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-03 16:24:20 +01:00
Joao Eduardo Luis
c7d5c25324 qa/workunits: mon: auth_caps: variables must be local
We have variables with the same name that are being shared!  We don't
hit any issues with it currently because the code just kind of works
even though that happens.  Add a bit of new logic that relies on an
immutable return code (for instance) and we're in the woods.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-03 16:24:19 +01:00
Joao Eduardo Luis
7e85bebd74 qa/workunits: mon: auth_caps: cleanup on successful exit
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
2014-10-03 16:24:19 +01:00
Sage Weil
576315ac15 mon/OSDMonitor: add 'osd crush reweight-subtree ...'
Reweight all items within a subtree.  For example, you might reweigh tall
OSDs within a rack to a new value.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-27 15:42:08 -07:00
Joao Eduardo Luis
e213ee1573 qa: workunits: mon: auth_caps.sh: test 'auth' caps requirements
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-04-07 18:30:56 +01:00
Sage Weil
7cb1d3a43d qa/workunits/mon/pool_ops.sh: fix test
The pool create command doesn't take k/v pairs any more.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-27 12:57:40 -07:00
Sage Weil
233801c622 qa/workunits/mon/pool_ops.sh: use expect_false
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-27 12:56:44 -07:00
Joao Eduardo Luis
38fd666ac6 qa: workunits/mon/rbd_snaps_ops.sh: ENOTSUP on snap rm from copied pool
'rados cppool' copies the contents but that doesn't make the destination
pool an unmanaged snaps pool.  Therefore, we must get an ENOTSUP when
we try to remove an unmanaged snap from a not-unmanaged pool.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2014-03-07 19:49:56 +00:00
Sage Weil
772968e60b mon/OSDMonitor: disallow crush buckets of type 0
Prevent creation of buckets of type 0 ('osd', 'device', etc.), as they
will confusing the mapping algorithm.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 13:15:58 -08:00
Sage Weil
ca12e0d92e qa/workunits/mon/crush_ops: use expect_false
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-05 12:52:08 -08:00
Sage Weil
250ecf6655 qa/workunits/mon/crush_ops.sh: fix in-use rule rm test
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-28 10:22:18 -08:00
Joao Eduardo Luis
50868a528d qa: workunits: mon: ping.py: test 'ceph ping'
Basic testing by forcing each monitor out of quorum at a time and making
sure they still reply to ping requests.

Fixes: #6705

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-11-22 01:43:06 +00:00
Sage Weil
89482cac83 Merge remote-tracking branch 'gh/next' 2013-09-26 10:21:54 -07:00
Sage Weil
c8cae87e9e qa/workunits/mon/crush_ops.sh: fix test
Fix root.

Fixes: #6392
Signed-off-by: Sage Weil <sage@inktank.com>
2013-09-25 10:10:21 -07:00
Sage Weil
952b39d4c4 Merge remote-tracking branch 'gh/next'
Conflicts:
	src/osd/ReplicatedPG.cc
2013-09-24 21:46:47 -07:00
Sage Weil
3de32562b5 mon/OSDMonitor: fix 'ceph osd crush reweight ...'
The adjust method returns a count of adjusted items.

Add a test.

Fixes: #6382
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-09-24 15:26:03 -07:00
Loic Dachary
bcc1680ad2 mon: fix inverted test in osd pool create
When using the properties key=value only, the test was inverted
and an attempt to obtain a substring at index string::npos throws
an exception.

Add variations of osd pool create to qa/workunits/mon/pool_ops.sh
to assert the problem has been fixed and all code paths are used.

http://tracker.ceph.com/issues/6357 fixes #6357

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-20 00:33:13 +02:00
Gary Lowell
33671f3554 Merge branch 'next' 2013-09-18 09:11:02 +00:00
Joao Eduardo Luis
3bc618b7b4 qa: workunits: mon: crush_ops: test 'ceph osd crush move'
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-09-10 00:29:19 +01:00
Joao Eduardo Luis
b2b0f202ea qa: workunits: mon: test snaps ops using rbd.
Regression test for #6047

Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
2013-08-29 00:48:34 +01:00
Joao Eduardo Luis
258135b9ad qa: workunits: mon: workunit to stress the monitor's caps
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-08-06 14:01:48 -07:00
Sage Weil
3dec530de6 qa/workunits/mon/caps.sh: clean up users; rename
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-19 22:32:23 -07:00
Joao Eduardo Luis
fb2150425b qa: workunits: mon: test mon caps permissions
set env var TEST_EXIT_ON_ERROR=0 to obtain all errors instead of exiting
with return 1 on first error found.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-07-19 21:18:07 -07:00
Sage Weil
9a7ed0b3f8 mon: fix idempotency of 'osd crush add'
If we add an item that already exists in particular position, we should
update instead of inserting it; the CrushWrapper methods are not
idempotent.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-13 14:42:05 -07:00
Danny Al-Gaaf
eb3350e4b0 test_mon_config_key.py: fix some more naming of local vars
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:02:20 +02:00
Danny Al-Gaaf
7436542937 test_mon_config_key.py: fix naming of local variable opLOG
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:02:02 +02:00
Danny Al-Gaaf
9d3b4fd788 test_mon_config_key.py: fix naming of local variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:01:16 +02:00
Danny Al-Gaaf
04075722bc fix "Instance of 'list' has no 'split' member"
Cast with str() to fix issue.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 16:00:09 +02:00
Danny Al-Gaaf
c792ea6707 test_mon_config_key.py: fix naming of local variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:57:20 +02:00
Danny Al-Gaaf
912bb82c72 test_mon_config_key.py: fix naming of global variables/constants
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:56:30 +02:00
Danny Al-Gaaf
1464169a26 test_mon_config_key.py: add missing space after comma
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:56:19 +02:00
Danny Al-Gaaf
16c565068b test_mon_config_key.py: remove unnecessary semicolon
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:56:14 +02:00
Danny Al-Gaaf
f601eb9053 test_mon_config_key.py: fix bad indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-04-25 15:55:19 +02:00
Sage Weil
29f9db1980 mon: fix crush unit tests for idempotency
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-03 15:45:34 -07:00
Dan Mick
cfd32fff7c test_mon_config_key.py: fix 'del' to clean up correctly internally 2013-04-02 15:09:43 -07:00
Joao Eduardo Luis
677867d088 qa: workunits: mon: test 'config-key' store
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2013-04-01 16:11:01 +01:00
Sage Weil
3f2e71169a mon: fix crush_ops.sh tests
Make it work.  Also, make note that these aren't handled idempotently by
the mon currently.  Doh!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-26 22:47:37 -07:00
Sage Weil
eae1532ca1 mon, crush: add some tests to build a DAG via the cli
Signed-off-by: Sage Weil <sage@inktank.com>
2013-03-22 15:15:38 -07:00
Sage Weil
473beb53c5 qa: mon/pool_ops.sh: fix last test
Got this one backwards, bah!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-20 08:44:03 -08:00
Sage Weil
96e153aeef qa: mon/pool_ops.sh: test pool set size
Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-19 15:54:52 -08:00
Sage Weil
7bd49d02ad qa: mon/pool_ops.sh: fix pool tests
The '! command' doesn't fail properly, even with -e, in bash (wtf!).

Also, the last pool deletion command succeeds because the pool
'--yes-i-really-really-mean-it' doesn't exist.  So drop that test.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-19 15:54:07 -08:00
Sage Weil
6d338591b7 qa: mon/workloadgen.sh: drop TEST_CEPH_CONF code
The binaries already pick up on CEPH_CONF, which will be set as needed.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-19 09:02:14 -08:00
Sage Weil
670a14827a qa: fix mon/osd.sh
It needs to be a valid osd id that we try to remove (that doesn't exist).

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-13 08:30:09 -08:00
Danny Al-Gaaf
7b89ee666b ceph-test: give binaries from ceph-test package useful names
The files from the ceph-test subpackage are installed to /usr/bin,
give them more useful names to make sure that the user know they
belong to ceph. add a 'ceph_' prefix and change some test* binaries
to ceph_test_*.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-10 18:33:56 +01:00
Sage Weil
b79067a863 qa: add workunits/mon/crush_ops.sh
Test creating, listing, removing crush rules via the mon.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-05 14:31:13 -08:00
Josh Durgin
1a6197a75b qa: fix mon pool_ops workunit
Use ! for clarity when commands are supposed to fail.
Check a few other cases that should fail, and correct deleting
non-existent pools.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-28 15:25:13 -08:00
Sage Weil
bbb86ec794 mon: safety interlock for pool deletion
Require that the pool name be passed twice along with an force option
before we irreversibly delete an entire pool of objects.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-01-26 13:45:12 -08:00
Joao Eduardo Luis
2a681052b2 qa: workunits: mon: add workloadgen's workunit
Uses test/mon/test_osd_workloadgen to generate a bunch of map
changes

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-11-27 20:00:44 +00:00
Sage Weil
efa03cef5e mon: require pgnum in 'ceph osd pool create <poolname> <pgnum> [<pgp_num>]' command
The default of 8 is virtually never the right answer.  Require the initial
pg count to be explicitly provided.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-11-12 12:01:07 -08:00
Sage Weil
640e5fdebc qa: simple tests for 'ceph osd create|rm' commands
Signed-off-by: Sage Weil <sage@inktank.com>
2012-07-27 10:43:26 -07:00