Commit Graph

403 Commits

Author SHA1 Message Date
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
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
Josh Durgin
4315221179 osd,OSDMonitor: try to protect against ec overwrites with filestore
This isn't perfect, but it's better than nothing. Prevent enabling the
allow_ec_overwrites flag if any of a sample of pgs in the pool map to
osds using filestore. This mainly protects filestore-only clusters
from enabling it.

If a filestore osd is started later, warn in the cluster log when it
gets a pg with ec overwrites enabled.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2017-04-19 17:45:43 -07:00
Josh Durgin
a219319137 qa/tasks/rados: test sparse reads with ec overwrites
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2017-04-19 17:45:43 -07:00
Willem Jan Withagen
9ff401e65b /workunits/cephtool/test.sh: Be more liberal in testing health-output.
Sometimes I get output like:
   HEALTH_ERR 2 pgs stuck unclean; Full ratio(s) out of order

Which goes away over time. So it is a transit issue

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-04-18 13:43:54 +02:00
David Zafman
3becdd3138 test: Test health check output for full ratios
Test out of order ratios summary and details
Test various full osd conditions summary and details

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-17 13:02:57 -07:00
David Zafman
a5731076ad osd: Handle backfillfull_ratio just like nearfull and full
Add BACKFILLFULL as a local OSD cur_state
Notify monitor of this new fullness state

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-17 08:00:24 -07:00
John Spray
0cb0c494d9 Merge pull request #13466 from jcsp/wip-cephfs-ecoverwrites
Add test for is_hacky_ecoverwrites in cephfs pool checks

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-15 19:44:00 +01:00
Sage Weil
7e547a10b1 Merge pull request #13073 from chardan/jfw-wip-15475-admin_heap_command
osd: add "heap *" admin command

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-04-10 16:24:14 -05:00
Sage Weil
175e33bd5b Merge pull request #14130 from liewegas/wip-json-slash
common/escape: do not escape / in json

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Dan Mick <dmick@redhat.com>
2017-04-08 13:21:44 -05:00
Sage Weil
6db1193906 qa/workunits/cephtool/test.sh: handle non-escaped-/ json
Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-08 14:19:00 -04:00
John Spray
f452256ff0 test: test cephfs pool ops with ec overwrites
Signed-off-by: John Spray <john.spray@redhat.com>
2017-04-04 11:32:53 +01:00
Jesse Williamson
fc4a4aa686 osd: heap profiling cleanups in response to review notes, build fixes.
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2017-04-03 01:12:29 -07:00
Jesse Williamson
23c0264e4d osd: Add test for admin heap profiling command.
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2017-03-31 01:22:59 -07:00