Commit Graph

415 Commits

Author SHA1 Message Date
Sage Weil
d953198aff mon,mgr: track available modules in MgrMap too
Require --force to enable a module that isn't reported as available.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-29 23:10:51 -04:00
Sage Weil
16fcee1f71 mon,mgr: manage mgr module list in mgrmap
Kill old mgr_modules option.

Add new mgr_initial_modules option, on the mon, for the initial cluster
mgrmap.

Add ls, enable, disable commands.

Respawn mgr if the module list changes.  In the future we could enable
new modules without a full restart, but disabling probably requires (and
is best handled by) a respawn.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-29 23:10:51 -04:00
Sage Weil
7fe818990a Merge pull request #15968 from xiexingguo/wip-poolopts-fix
mon/OSDMonitor: two pool opts related fix

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-29 22:03:02 -05:00
Kefu Chai
7ee4907698 Merge pull request #15925 from jcsp/wip-fsstatus-cleanup
mgr: clean up fsstatus module

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-06-30 09:31:02 +08:00
Sage Weil
93918b0be5 test,qa/workunits: fix a zillion tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-28 10:52:49 -04:00
Greg Farnum
3e8bdac704 cephtool/test: create an rbd pool since it's no longer automatic
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2017-06-28 10:52:49 -04:00
xie xingguo
db42eef59d os/bluestore: allow user to unset pool compression_mode[algorithm] properly
A string-typed pool option requires user pass in a empty string to do a valid cancellation,
but the "osd pool set " command won't allow it. E.g.:
./bin/ceph osd pool set rbd compression_mode
Invalid command:  missing required parameter val(<string>)

Since we already use the "unset" keyword to cancel the csum_type setting,
we could simply extends the above mechanism for compression_mode
and compression_algorithm too.

E.g.:
./bin/ceph osd pool set rbd compression_algorithm zlib
set pool 0 compression_algorithm to zlib

 ./bin/ceph osd pool set rbd compression_algorithm unset
unset pool 0 compression_algorithm

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-06-28 20:15:17 +08:00
John Spray
4840a5d505 qa: call into status module from cephtool test
Signed-off-by: John Spray <john.spray@redhat.com>
2017-06-27 15:10:50 +01:00
John Spray
6ec69a4547 qa: update cephtool test for multimds on by default
Signed-off-by: John Spray <john.spray@redhat.com>
2017-06-23 17:07:34 +01:00
Sage Weil
11d9541a6f mon: 'mon feature list' -> 'mon feature ls'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-23 10:36:18 -04:00
Sage Weil
1e7cd3550c Merge pull request #13683 from liewegas/wip-crush-rulesets
crush: detect and (usually) fix ruleset != rule id

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-06-21 08:45:42 -05:00
Kefu Chai
a65b08fe6e qa/workunits/cephtool/test.sh: only include last line for epoch
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/qa/workunits/cephtool/test.sh:1606: test_mon_crush:  epoch='2017-06-20 04:44:52.862459 ffffad4d0200 -1 asok(0xffffa8000b10) AdminSocketConfigObs::init: failed: AdminSocket::bind_and_listen: The UNIX domain socket path /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/test/td/t-7202/out/client.admin.48876.asok is too long! The maximum length on this system is 107
12'
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/qa/workunits/cephtool/test.sh:1607: test_mon_crush:  '[' '2017-06-20 04:44:52.862459 ffffad4d0200 -1 asok(0xffffa8000b10) AdminSocketConfigObs::init: failed: AdminSocket::bind_and_listen: The UNIX domain socket path /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/test/td/t-7202/out/client.admin.48876.asok is too long! The maximum length on this system is 107
12' -gt 1 ']'
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/qa/workunits/cephtool/test.sh: line 1607: [: 2017-06-20 04:44:52.862459 ffffad4d0200 -1 asok(0xffffa8000b10) AdminSocketConfigObs::init: failed: AdminSocket::bind_and_listen: The UNIX domain socket path /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/test/td/t-7202/out/client.admin.48876.asok is too long! The maximum length on this system is 107
12: integer expression expected

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-20 16:21:28 +08:00
Sage Weil
07abacb2e4 osd/osd_types: pg_pool_t: rename crush_ruleset -> crush_rule
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-19 19:09:06 -04:00
Sage Weil
36cb4629dc Merge pull request #15533 from liewegas/wip-crush-version
mon,osd: add crush_version to OSDMap, and allow crush map updates to gate on crush_version

Reviewed-by: Loic Dachary <loic@dachary.org>
2017-06-19 18:06:07 -05:00
Sage Weil
74087cf5ab qa/workunits/cephtool/test.sh: silence dev warnings
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-19 14:11:57 -04:00
xie xingguo
f53559f95b mon/OSDMonitor: batch noup/noin osds support
This is a follow-up change of https://github.com/ceph/ceph/pull/15381.
This patch also simplifies the original code logic a bit.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-06-18 08:39:50 +08:00
Sage Weil
307026a468 mon/OSDMonitor: add prior_version arg to 'osd crush set', 'osd setcrushmap'
If the prior_version doesn't match, reject the update.

Note that we also allow the crush_version-1 iff the proposed map is
identical to the current map in order to make the command idempotent.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-15 13:41:30 -04:00
Greg Farnum
010e45d7d0 qa: test 'osd df' in cephtool/test.sh
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2017-06-14 17:02:50 -07:00
Yuri Weinstein
3ace41f8d2 Merge pull request #15381 from xiexingguo/wip-noout-osdlist
mon/OSDMonitor: batch OSDs nodown/noout support

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
2017-06-14 13:11:58 -07:00
Kefu Chai
419ff0b90e qa: remove duplicated flush_pg_stats() helper
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-12 18:32:50 +08:00
xie xingguo
905ad73c33 mon/OSDMonitor: add "ceph osd ls-tree" command
E.g.:
~# ceph osd tree
ID WEIGHT  TYPE NAME                                        UP/DOWN REWEIGHT PRIMARY-AFFINITY
-5 3.00000 root foo
-4 2.00000     rack foo-rack-1
-3 1.00000         host foo-host-192-8-8-91
 1 1.00000             osd.1                                     up  1.00000          1.00000
-6 1.00000         host foo-host-192-8-8-92
 2 1.00000             osd.2                                     up  1.00000          1.00000
-8 1.00000     rack foo-rack-2
-7 1.00000         host foo-host-192-8-8-93
 0 1.00000             osd.0                                     up  1.00000          1.00000
-1       0 root default
-2       0     host gitbuilder-ceph-rpm-centos7-amd64-basic

~# ceph osd ls-tree foo
0
1
2

~# ceph osd ls-tree foo-rack-1
1
2

~# ceph osd ls-tree foo-rack-2
0

~# ceph osd ls-tree foo-host-192-8-8-92
2

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-06-12 10:08:33 +08:00
xie xingguo
4fec5b85f1 mon/OSDMonitor: batch OSDs nodown/noout support
This patch allow us to add batch OSDs(e.g., from a specific host which is currently in maintenance)
into a specific nodown/noout list, which can not be automatically marked down/out
and hence can be eliminated from data migration.

This has the same effect with the global nodown/noout flag but is more fine-grained.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-06-12 10:08:33 +08:00
Yuri Weinstein
17376dbff6 Merge pull request #15436 from liewegas/wip-versions
mon: {mon,osd,mds} {versions,count-metadata}

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-06-07 09:36:59 -07:00
Kefu Chai
b55b464f39 Merge pull request #15497 from liewegas/wip-log-last
mon/LogMonitor: 'log last' command

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-06-07 12:30:06 +08:00
Sage Weil
189b17b784 qa/workunits/cephtool/test.sh: test 'log last [n]'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-06 14:52:26 -04:00
Sage Weil
daa5126ed9 Merge pull request #14074 from jecluis/wip-mon-osd-replacement
mon: replace osds with `osd destroy` and `osd new`

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-06 08:25:15 -05:00
Sage Weil
3f32f34082 qa/workunits/cephtool/test.sh: fix osd full health detail grep
This changed with the switch to OSDMonitor doing the fullness
and pgmonitor getting disabled.

Fixes: http://tracker.ceph.com/issues/20187
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-05 14:23:12 -04:00
Joao Eduardo Luis
8ab3a1dbf5 qa/workunits: add cephtool test for new commands
Tests `ceph osd new`, `ceph osd destroy` and `ceph osd purge`.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2017-06-05 15:31:41 +01:00
Joao Eduardo Luis
9e0d3de6b2 qa/workunits: adjust expected return on cephtool
We changed the behavior of `osd create` to return EEXIST instead of
EINVAL if an uuid exists with a different `id` than the one the user
provides.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2017-06-05 15:31:41 +01:00
Sage Weil
c38221d266 mon: implement '{mon,osd,mds} versions' and '{mon,osd,mds} count-metadata <field>'
Summarize running versions of mon, osd, and mds daemons, or similarly
tabulate daemons by any other metadata property.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-02 14:46:12 -04:00
Kefu Chai
3c12465f96 qa/workunits/cephtool/test.sh: use jq instead of awk to select the require element
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-02 13:02:46 -04:00
Kefu Chai
44708d8365 qa/workunits/cephtool/test.sh: use flush_pg_stats to sync mon with osd
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-02 13:02:46 -04:00
Kefu Chai
74752505bf mgr: add a command "mgr report"
* extract send_report() out of tick() so it can be reused.
* add a commmand "mgr report-mon" for mgr, so we are able to flush the
  the mgr stats to mon actively without waiting for the tick. this
  could help with the tests.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-02 13:02:46 -04:00
Sage Weil
cd00aae1c3 qa/workunits/cephtool/test.sh: fix flush_pg_stats usage
Use a helper.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-02 13:02:45 -04:00
Sage Weil
ea5b054e65 qa/workunits/cephtool/test.sh: adjust watch test
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-01 22:22:24 -04:00
Sage Weil
99d96c3c09 Merge pull request #15294 from liewegas/wip-osd-tree
osd: 'osd tree in|out|up|down' to filter tree results

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-30 08:22:35 -05:00
Sage Weil
0027a3b9be mon: add up|down|in|out filters to 'osd tree'
For example, 'ceph osd tree down' will show *just* down OSDs and their
ancestors.  \o/

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-30 08:21:16 -04:00
Sage Weil
3118d9a154 osd: replace require_*_osds flags with require_osd_release field
- OSDMap encode and decode translate between the flags and int
representations.
- OSDMap::Incremental only does decode; we do not expect to ever encode
an incremental osdmap for an old osd that sets any of these flags.
- the 'osd set' command still lets you set the jewel and kraken flags,
but not luminous.
- OSDMap::apply_incremental handles the conversion of legacy require flags
to the new field if the jewel or kraken flags have to be set before
starting the osd upgrade.
- clear out the legacy flags when we make the luminous transition only;
until then we keep using the old flag in the encoded and decoded version
(although the require_osd_release field will be accurate in memory in all
cases).

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-29 21:33:17 -04:00
liuchang0812
b0af39713b test/cephtool: convert FS_NAME to local variable
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
2017-05-26 10:27:26 +08:00
liuchang0812
5680936878 tool/ceph: create "tell x help" command
Fixes: http://tracker.ceph.com/issues/19885

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
2017-05-26 10:27:26 +08:00
Yuri Weinstein
25b8e0f63f Merge pull request #15146 from tchaikov/wip-split-test-tiering
qa: split test_tiering into smaller pieces

Reviewed-by: Sage Weil <sage@redhat.com>
2017-05-25 13:43:53 -07:00
Sage Weil
b24fa931b2 mon/MgrMonitor: add 'mgr dump [epoch]' command
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-18 12:05:13 -04:00
Kefu Chai
a4a72a9f7b qa: split test_tiering into smaller pieces
so we can debug them individually if anything goes wrong

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-05-18 13:58:05 +08:00
Sage Weil
f08de01c58 mon/OSDMonitor: 'osd set-require-min-compat-client ...'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-09 11:32:56 -05:00
Willem Jan Withagen
59238fb1db qa/workunits/ceph-helpers.sh: Improve test_mon_pg() by starting healthy
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-04-20 15:47:01 -07:00
Willem Jan Withagen
e07f9ccb13 qa/workunits/ceph-helpers.sh: introduce (and use) wait_for_health
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-20 15:39:34 -07:00
David Zafman
1810a17e23 mon: Fix incorrect health output and test code to match
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-20 15:39:34 -07:00
David Zafman
86fea9d539 /workunits/cephtool/test.sh: Improve testing of health-output.
Instead of 9ff401e65b use regex to handle:
       HEALTH_ERR 2 pgs stuck unclean; Full ratio(s) out of order

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-20 15:39:33 -07:00
David Zafman
1474d0f233 test: Fix test_admin_heap_profiler() and enable it
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-20 15:39:33 -07:00
David Zafman
84f2182881 cephtool/test.sh: Get socket for whichever environment this test is running
Need sudo for qa suite runs

Fixes: http://tracker.ceph.com/issues/19698

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-20 15:39:09 -07:00