Commit Graph

309 Commits

Author SHA1 Message Date
John Spray
325ab8085f mon: enable dump all mds metadata at once
Same as mon and osd, leave out ID to get all.

Signed-off-by: John Spray <john.spray@redhat.com>
2016-05-16 10:56:52 +01:00
John Spray
288e11e7da mon: enable dump all mon metadata at once
Same as we already have for osd metadata, where
if you omit the ID you get all daemons.

Signed-off-by: John Spray <john.spray@redhat.com>
2016-05-16 10:56:52 +01:00
Sage Weil
84bd0dce18 mon/OSDMonitor: max_osds must be > 0 for reweight-by-*
Include a few test cases.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-29 22:01:56 -04:00
Sage Weil
c3b595f284 Merge pull request #7942 from xiexingguo/xxg-wip-fixdirtyinc
mon: OSDMonitor: improve pool creation logic

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Xiaoxi Chen <xiaoxchen@ebay.com>
2016-04-22 20:21:57 -04:00
Kefu Chai
558863ad6d test: set a default $CEPH_ROOT env variable
in cf24535, we use $CEPH_ROOT to specify the $top_srcdir to unify
cmake and autotools, but this breaks ceph-qa-suite/tasks/workunit.py,
as it only clones the necessary qa/workunits directory, and does not
pass $CEPH_ROOT to the test scripts. so we need to set a default
$CEPH_ROOT if it is not set.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-04-19 00:19:07 +08:00
Ali Maredia
cf24535ed7 cmake: cephtool-test-rados/mds/osd passing in cmake
Replaced relative paths in test/cephtool-test-mon.sh,
qa/workunits/cephtool/test.sh, and test/cephtool-test-mon.sh
to work with CEPH_FOO environment variables set in cmake.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2016-04-14 20:48:21 -04:00
Greg Farnum
f6209798f8 Merge remote-tracking branch 'github/wip-fs-lockouts' into greg-fs-testing
Protect a number of unstable/experimental features behind durable flags

https://github.com/ceph/ceph/pull/8383

Reviewed-by: John Spray <john.spray@redhat.com>
2016-04-07 17:07:16 -07:00
Greg Farnum
ea1b276e7e test: update tests for new flag requirements
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2016-04-07 16:40:23 -07:00
xie xingguo
be07a418b5 mon: OSDMonitor: add a guard for prepare_remove_snaps()
Method preprocess_remove_snaps() is designed to fast check whether
we can safely handle a remove-snaps-request without changing the osdmap.
The original design is to be able to handle snaps from multiple pools,
including those snaps even from a non-existent pool by simply skipping
over them. However, this method will quit on successfully detecting
any vaild snap which is truly needed to be removed and forward this
request to prepare_remove_snaps() for further processing.

From the above analysis, the prepare_remove_snaps() method will
theoretically also encounter some snaps which possibly belong to
non-existent pools.

This pr solves the above problem by adding a sanity check against
pool existense associated with the specified snap to be removed, which
shall be considered as a defensive move and makes prepare_remove_snaps()
stronger.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-07 17:31:58 +08:00
xie xingguo
c98d97e37c mon: OSDMonitor: return EINVAL if we unable to parse addr
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-07 17:29:21 +08:00
xie xingguo
fd6c023f49 mon: OSDMonitor: reply ENOENT if specified osd does not exist
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-04-07 17:29:21 +08:00
Erwan Velu
c5fa83f586 tests: Avoiding a fixed 10sec sleep in test_mon_cephdf_commands()
The current code was waiting 10s to expect the file being put.
If the file was put in a shorter time than 10s, the test just waits for
nothing reducing the execution speed of that test.

This patch simply check if the file is actually available every second
during 10sec to exit prematurely.

This patch saves exactly 10 sec on a local system, surely a little bit
less on an infra but still saves time.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
62bdde2cd2 tests: Optmizing sleep sequence in cephtool/test.sh
The actual code double the wait time between two calls leading to a
possible 511s of waiting time which sounds a little bit excessive.

This patch offer to reduce the global wait time to 300s and test more
often the rados status to exit the loop earlier. In a local test, that
saves 6 secs per run.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
8a49a86901 tests: Moving sleep call after action in ceph_watch_wait()
ceph_watch_wait() is doing a sleep _before_ doing the test which could
stop this loop.

It's better doing the action first as it could exit immediately and
avoid a useless sleep.

That's a minor optimization but everything count when trying to get
something smooth.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
0d254d8916 tests: Reducing sleep time for osd to be up
OSDs are taking some time to be up but waiting 10 secs seems execessive
here between two loops. In the worst case, we can be in a situation of
waiting 10secs for nothing as we are just a few microsecs after the osd
is up.

This patch simply reduce the sleep from 10 to 1 seconds.
Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-05 09:36:25 +02:00
Erwan Velu
f47e06b907 tests: Fixing broken test/cephtool-test-mon.sh test
Since the merge of pr #7693, 'ceph command' to get the help is invalid.
As a result, 'test/cephtool-test-mon.sh' test was broken

This patch simply change the 'ceph command' by a 'ceph --help command'

Since this change the test is passing again.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-04-04 16:58:58 +02:00
Sage Weil
052fa90eb7 Merge pull request #7062 from wonzhq/scrub-prio-pool
osd: add the support of per pool scrub priority

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-30 08:24:43 -04:00
Sage Weil
359d8324a3 qa/workunits/cephtool/test.sh: fix cache mode tests
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-28 16:57:42 -04:00
Sage Weil
6a80e2df8b qa/workunits: remove 'mds setmap' from workunits
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-15 09:44:19 -04:00
John Spray
22ff1224fd qa: update cephtool test for CephFS multi filesystems
Includes adding test for the enable_multiple flag.

Signed-off-by: John Spray <john.spray@redhat.com>
2016-03-10 11:18:28 +00:00
Sage Weil
2b9775db2c Merge pull request #7890 from liewegas/wip-reweight
mon: osd [test-]reweight-by-{pg,utilization} command updates

Reviewed-by: Samuel Just <sjust@redhat.com>
2016-03-09 14:06:30 -05:00
Sage Weil
661891aa28 mon: remove range=100 from reweight-by-* commands
Specifying the range makes it skip instead of error when you give
it a bad value.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-09 13:25:55 -05:00
Sage Weil
3a72d21e30 Merge pull request #7861 from tchaikov/wip-14910
qa/workunits/cephtool/test.sh: wait longer in ceph_watch_start()

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-07 12:23:46 -05:00
Sage Weil
28b33a5b57 qa/workunits/cephtool/test.sh: test reweight-by-x commands
Signed-off-by: Sage Weil <sage@redhat.com>
2016-03-03 13:49:06 -05:00
Kefu Chai
389ecbbc2a Merge pull request #7390 from badone/wip-13829
common: Allow OPT_INT settings with negative values

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2016-03-02 11:22:24 +08:00
Kefu Chai
6eff39af79 qa/workunits/cephtool/test.sh: wait longer in ceph_watch_start()
"ceph --watch-debug" and "ceph tell mon.foo version" could connect
to different monitors, and there is chance that "ceph --watch-debug"
is not connected yet when "ceph tell" completes, and hence the former
fails to collect the cluster log including the "ceph tell" related
message. this renders test_mon_tell() unreliable. so, in
ceph_watch_start(), we should wait until the "ceph" cli connects to the
monitor and receives messages from it.

Fixes: #14910
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-03-01 20:48:24 +08:00
Zhiqiang Wang
23f3d30987 qa/workunits: add test for setting scrub priority
Signed-off-by: Zhiqiang Wang <zhiqiang@xsky.com>
2016-02-25 06:07:59 -05:00
Sage Weil
50821fa296 Merge pull request #7248 from ukernel/jewel-14379
mon/MDSMonitor: add confirmation to "ceph mds rmfailed"

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2016-01-29 08:27:37 -05:00
Brad Hubbard
994ac2942d qa: Add test for #13829
qa/workunits/cephtool/test.sh: add test for setting negative int options
src/test/daemon_config.cc: remove tests for failed negative values

Fixes: #13829

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2016-01-29 18:06:45 +10:00
Gregory Farnum
5aef0189b6 Merge pull request #7262 from ukernel/jewel-14380
Be more careful about the "mds setmap" command to prevent breakage.

Reviewed-by: John Spray <john.spray@redhat.com>
2016-01-28 21:26:06 -08:00
Yan, Zheng
8af0758638 qa/workunits/cephtool/test.sh: update test for "ceph mds setmap"
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-01-20 11:47:24 +08:00
Yan, Zheng
02d15bb434 mon/MDSMonitor: Add confirmation to "ceph mds rmfailed"
Fixes: #14379
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-01-20 10:47:13 +08:00
Sage Weil
b8bc25b0f0 Merge pull request #7087 from H3C/wip-yrf-cephdf
mon: add RAW USED column to ceph df detail

Reviewed-by: Sage Weil <sage@redhat.com>
2016-01-14 19:00:16 -05:00
Sage Weil
d93d92a7f4 Merge pull request #7085 from tchaikov/wip-11692
config: complains when a setting is not tracked

Reviewed-by: Sage Weil <sage@redhat.com>
2016-01-12 21:26:24 -05:00
Ruifeng Yang
2b597ae6d4 mon: add a column 'RAW USED' for ceph df detail
Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
2016-01-12 22:08:47 +08:00
Sage Weil
37c6390a77 qa/workunits/cephtool/test.sh: leave sortbitwise set
New backends don't work if it's off.

Signed-off-by: Sage Weil <sage@redhat.com>
2016-01-01 13:09:17 -05:00
Kefu Chai
6a59aae076 config: complains when a setting is not tracked
* not all config items are tracked, so it does not take any effect after
  we sucessfully changed them using "ceph tell <daemon> injectargs  --foo-bar 15',
  as shown by the command output:
    $daemon: foo_bar = '15'
  if foo-bar happens to be the one not tracked by any components in <daemon>.
  in this fix, the message of
    $daemon: foo_bar = '15' (unchangeable)
  is returned instead. nevertheless, the config is still updated. as
  "ceph daemon <daemon> config show | grep foo_bar" shows:
    "foo_bar": "15"
  this helps user to understand that the setting is not dynamically
  changeable.
* update the test accordingly

Fixes: #11692
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-12-31 00:35:58 +08:00
John Spray
42389742c2 mon: add osd blacklist clear
This is just like 'blacklist rm' except it removes
everything.  Useful if you've got a whole bunch of
things in your blacklist and you don't want to wait
for N "blacklist rm" commands to run.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-12-16 12:02:36 +00:00
Robin H. Johnson
cd0c13bbf0 qa/workunits/cephtool/test.sh: false positive fail on /tmp/obj1.
If /tmp/obj1 happened to exist already, and was not writable by the
testing user, then this test failed!

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
2015-12-07 15:27:12 -08:00
Sage Weil
c3e3ee05d8 Merge pull request #5953 from guangyy/wip-13121
osd: support pool level recovery_priority and recovery_op_priority

Reviewed-by: David Zafman <dzafman@redhat.com>
2015-12-04 10:09:13 -05:00
Guang Yang
ba346bf432 qa: add a test for the recovery_priority/recovery_op_priority pool settings.
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
2015-12-03 02:16:52 +00:00
Sage Weil
35403da171 qa/workunits/cephtool/test.sh: no ./
Introduced by 1ace4d03b2

Signed-off-by: Sage Weil <sage@redhat.com>
2015-12-01 08:14:53 -05:00
Mykola Golub
e6dcf1419a osd: store per pool scrub intervals in pool options
ceph osd pool set $POOL scrub_min_interval N
  ceph osd pool set $POOL scrub_max_interval N
  ceph osd pool set $POOL deep_scrub_interval N

If N > 0, this value is used for the pool instead of
the corresponding global parameter from the config
(osd_scrub_min_interval, osd_scrub_max_interval or
osd_deep_scrub_interval).

Fixes: #13077
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-11-27 13:35:51 +02:00
Sage Weil
d633b64566 Merge pull request #5734 from cxwshawn/mon-fix
auth: make keyring without mon entity type return -EACCES

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-11-26 17:24:59 -05:00
Sage Weil
6cbdd6750c mon/PGMonitor: remove map_pg_creates, send_pg_creates commands
These shouldn't be triggered manually.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-11-23 08:38:50 -05:00
Xiaowei Chen
1ace4d03b2 auth: keyring without mon entity type should return -EACCES
test:
                         see test.sh:test_mon_caps
                         before modify:
                         when we first exec ../qa/workunits/cephtool/test.sh -t mon_caps --asok-does-not-need-root , it stuck.
                         after modify:
                         exec again, return Permission denied.

Signed-off-by: Xiaowei Chen <chen.xiaowei@h3c.com>
2015-11-10 02:54:35 -05:00
Sage Weil
8d97771c3c Merge pull request #6084 from liewegas/wip-revert-scrub
Revert "osd: new pool settings: scrub intervals"

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2015-09-28 16:40:31 -04:00
Sage Weil
80b7237e5e qa/workunits/cephtool/test.sh: don't assume crash_replay_interval=45
e.g., it's 5 in teuthology's ceph.conf.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-28 13:13:40 -04:00
Sage Weil
216eef53e9 Revert "osd: new pool settings: scrub intervals"
This reverts commit 30810da4b5.

After some discussion we have decided it is better to build a generic
dictionary in pg_pool_t to store infrequently used per-pool properties.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-25 14:01:19 -04:00
Mykola Golub
30810da4b5 osd: new pool settings: scrub intervals
ceph osd pool set $POOL scrub_min_interval N
 ceph osd pool set $POOL scrub_max_interval N
 ceph osd pool set $POOL deep_scrub_interval N

If N > 0, this value is used for the pool instead of
the corresponding global parameter from the config
(osd_scrub_min_interval, osd_scrub_max_interval or
osd_deep_scrub_interval).

Fixes: #13077
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2015-09-21 09:08:16 +03:00