Commit Graph

371 Commits

Author SHA1 Message Date
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
Sage Weil
accfd6ce88 qa/workunits/cephtool/test.sh: test_auth_profiles must include mgr
For 'pg ...' commands

Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-29 11:39:26 -04:00
Sage Weil
03287f7d22 qa/workunits/cephtool/test.sh: change [near]full_ratio tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-03-06 16:42:34 -05:00
Joao Eduardo Luis
23740119c6 mon: test 'mon feature' cli
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2017-03-02 17:32:35 +00:00
Vikhyat Umrao
90144aa64c auth: 'ceph auth import -i' overwrites caps, if caps are not specified
in given keyring file, should alert user and should not allow this import.
Because in 'ceph auth list' we keep all the keyrings with caps and importing
'client.admin' user keyring without caps locks the cluster with error[1]
because admin keyring caps are missing in 'ceph auth'.

[1] Error connecting to cluster: PermissionDeniedError

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

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2017-02-20 03:48:31 +05:30
Vikhyat Umrao
3715362883 osd/Pool: Disallow enabling 'hashpspool' option to a pool without
'--yes-i-really-mean-it'

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

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
2017-02-14 04:09:32 +05:30
Sage Weil
8226159e7c mon: prevent sortbitwise flag from being unset
Signed-off-by: Sage Weil <sage@redhat.com>
2017-02-07 14:00:32 -05:00
John Spray
48adc77476 Merge pull request #12825 from stiopaa1/r11124_refuseToDoFsNew
mon/MDSMonitor.cc:refuse fs new on pools with obj

Reviewed-by: John Spray <john.spray@redhat.com>
2017-01-27 17:35:38 +01:00
Sage Weil
9080596335 Merge pull request #9348 from LiumxNL/fix-mksnap
mon/OSDMonitor: make snaps on tier pool should not be allowed
2017-01-25 06:35:36 -06:00
Michal Jarzabek
052c3d3f68 mon/MDSMonitor.cc:refuse fs new on pools with obj
Fixes: http://tracker.ceph.com/issues/11124
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2017-01-23 19:48:53 +00:00
Mingxin Liu
0de7ac79b5 test: cannot create pool snap on tier
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-01-22 01:26:43 +08:00
Brad Hubbard
1e8e754007 config: Improve warning for unobserved value
When a variable is not being observed we currently mark it
"unchangable". This can be misleading so try something hopefully a
little more informative.

Fixes: http://tracker.ceph.com/issues/18424
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2017-01-10 15:35:19 +10:00
Sage Weil
bc197d75cc Merge pull request #12451 from liewegas/wip-osd-on-applied
osd: never send rados ack (only commit)

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-12-29 12:43:01 -06:00
Sage Weil
f706819d6a Merge pull request #12403 from liewegas/wip-mon-mgr-cleanups
mon: clean up some osdmon/pgmon interactions

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-12-29 09:38:59 -06:00
Sage Weil
265c2ff446 qa/workunits: remove crash_replay_interval tests
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-29 10:30:39 -05:00
Sage Weil
88ae4bb067 mon/OSDMonitor: ceph osd pool get/set crush_rule by name
This means users don't have to manually translate a rule
they just created to a ruleset ID in order to map a pool
to it.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-27 11:02:19 -05:00
Sage Weil
88d85ad726 mon/PGMap: remove CATEGORY column from 'df detail'
Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-27 11:02:19 -05:00
Sage Weil
904913b37f mon/OSDMonitor: remove 'osd thrash' command
This is a dev hack to generate a bunch of bogus osdmaps.  The maps are
all screwed up anyway (e.g., invalid addrs) and this is minimally useful.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-12-18 23:11:56 -05:00
Kefu Chai
36bf16d073 Merge pull request #11293 from liewegas/wip-mon-markout
mon: preserve osd weight when marking osd out, then in

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-11 22:00:39 +08:00
Kefu Chai
37f3897c55 Merge pull request #11702 from wjwithagen/wip-wjw-freebsd-cephtool-test
qa/workunits/cephtool/test.sh: FreeBSD has no distro.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-11-10 10:18:23 +08:00
Sage Weil
73a2c11e94 mon/OSDMonitor: remember old weight on 'osd out'
If we have an OSD with a weight that's not 1.0 and mark it out,
we should restore the same weight when we mark it back in. We
already do this when an OSD is automatically marked out, just
not when it is explicitly marked out.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-11-07 11:28:43 -05:00
Willem Jan Withagen
e1993eab6d qa/workunits/cephtool/test.sh: FreeBSD has no distro.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-11-02 14:37:32 +01:00
David Zafman
b4c080b1b4 test.sh: Make check for flags more robust
Low space broke test, saw "flags nearfull,pauserd,pausewr...."

Signed-off-by: David Zafman <dzafman@redhat.com>
2016-10-27 22:42:11 -07:00
Kefu Chai
d2b6b34215 Merge pull request #10916 from jordan41177/fix-17169
mon: OSDMonitor: fix the check error of pg creating

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-10-10 14:39:56 +08:00
DesmondS
179d3d1659 mon: OSDMonitor: fix the check error of pg creating
The variable 'pgs_per_osd' set value from 'new_pgs' divided by 'expected_osds',
and its type is integer. So it would remove the decimal point and get smaller value.
This would have problem in some situations, for exmaple:

The limitation of pg creating for one OSD is '32'.
There have 3 OSDs and I want to increase pgs for a pool.
It should be the limitation for creating new pgs up to '96(32 * 3)' at once.
Now, I create '98' pgs for a pool.

In original code, '98' would be divided by 'expected_osds' and get the floating value '32....'
Because of the type which is integer, the 'pgs_per_osd' would be set to 32.
Then the value won't bigger than the limitation and get the wrong result.

Signed-off-by: DesmondS <desmond.s@inwinstack.com>
Fixes: http://tracker.ceph.com/issues/17169
2016-09-19 17:59:01 +08:00
Willem Jan Withagen
6f0e717e6b qa/workunits/cephtool/test.sh: fix omision of ceph-command
- The script fails with these commands, but not for the correct reason.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2016-09-05 12:04:55 +02:00
xie xingguo
3b160df0aa mon/OSDMonitor: expose require_kraken_osds flag to user
For newly created cluster the CEPH_OSDMAP_REQUIRE_KRAKEN will be
automatically set, while for existing clusters it will not.

This change add "require_jewel_osds" to white list, so user
can access it by the "ceph osd set *" command family.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-08-01 12:24:26 +08:00
Kefu Chai
de68fe38e1 qa/workunits/cephtool/test.sh: use absolute path for TEMP_DIR
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-25 16:58:28 +08:00
Kefu Chai
7c1b456022 qa/workunits/cephtool/test.sh: s/TMPDIR/TEMP_DIR/
this fixes the test failure of
```
2016-07-12T23:29:40.935
INFO:tasks.workunit.client.0.mira101.stderr:/home/ubuntu/cephtest/workunit.client.0/cephtool/test.sh:
line 153: /CEPH_WATCH_9445: Permission denied
```
see
http://pulpito.ceph.com/kchai-2016-07-12_23:09:35-rados-wip-kefu-testing2---basic-mira/311333/

it's a regression introduced by e5c262b

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-15 16:20:37 +08:00
Kefu Chai
e5c262bfe6 qa/workunits/cephtool/test.sh: use mktemp $TEMP_DIR/XXX instead
mktemp -p is not supported on FreeBSD

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-15 14:21:52 +08:00
Kefu Chai
06195b3476 qa/workunits/cephtool/test.sh: respect $TMPDIR
create temp directory and files in $TMPDIR. the $TMPDIR is hard-wired to
/tmp before this change, we'd better respect the env variable $TMPDIR,
so it would be more consistent, and easier to do the cleanup if any.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-07 12:11:05 +08:00
Kefu Chai
5e16f2379d test: cephtool/test.sh: fix expect_false with pipe
this fixes failures like,

/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/cephtool/test.sh:
line 32: ceph osd blacklist ls | grep 192.168.0.1: command not found

where the failure is not the "failure" we are expecting.

in our tests, following command

expect_false "ceph osd blacklist ls | grep 192.168.0.1"

is designed to to verify that "ceph osd blacklist ls | grep 192.168.0.1"
fails with non-zero return code. but expect_false() evaluates the command
line using plain "$@", which will send the arguments direct to the shell,
and $0 is "ceph auth get client.xx | grep caps | grep mon", which does
not exist and is not built-in command. so we need to check the grep
command instead.

for multiple piped command line, use

expect_false sh <<< "echo foo  | grep bar | grep baz"

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-05 15:26:43 +08:00
Samuel Just
c962c72092 Merge pull request #9248 from xiexingguo/xxg-wip-expose-requirejewel
mon: expose require_jewel_osds flag to user

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2016-06-23 13:03:34 -07:00