Commit Graph

1783 Commits

Author SHA1 Message Date
Sage Weil
c77e19c9f2 qa: test config CLI interface
Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:49 -06:00
Sage Weil
d4cc161566 cleanup: src/.libs -> build/lib
Clean up remaining traces of automake's .libs.  This makes unittest_*
tests easier to run by hand (mostly).

Signed-off-by: Sage Weil <sage@redhat.com>
2018-03-06 14:44:47 -06:00
Nathan Cutler
bebcdbeb76 tests: workunits: drop rest/test.py workunit
This workunit is only used by the two rest-api test cases that are also being removed.

Fixes: http://tracker.ceph.com/issues/21264
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-03-06 09:34:43 +01:00
Yuri Weinstein
57ffaaa389
Merge pull request #19015 from hansbogert/master
mon: Add `ceph osd get-require-min-compat-client` command

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
2018-02-28 06:25:31 -08:00
Mykola Golub
c3038c5cbc
Merge pull request #20599 from dillaman/wip-librbd-devstack-tempest
qa/workunits/rbd: switch devstack tempest to 17.2.0 tag

Reviewed-by: Mykola Golub <mgolub@suse.com>
2018-02-27 20:43:36 +02:00
Jason Dillaman
8f45676ec3 Merge pull request #20577 from Songweibin/wip-group-rename
rbd: add group rename methods

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-02-27 08:28:08 -05:00
Jason Dillaman
c1b84297b8 qa/workunits/rbd: switch devstack tempest to 17.2.0 tag
Fixes: http://tracker.ceph.com/issues/22961
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-02-26 14:04:48 -05:00
songweibin
034ad878fd rbd: add 'group rename' action to CLI and Python API
Signed-off-by: songweibin <song.weibin@zte.com.cn>
2018-02-26 10:21:58 +08:00
Ilya Dryomov
72edaae04d qa: krbd latest-osdmap-on-map test
Make sure we get the latest osdmap when using an existing client.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-02-25 11:40:19 +01:00
Jason Dillaman
ab06f835f4
Merge pull request #20499 from idryomov/wip-krbd-discard-tests
qa: additional krbd discard test cases

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-02-20 14:02:07 -05:00
Mykola Golub
783bc22438
Merge pull request #20490 from dillaman/wip-rbd-journal-workunit
qa/workunits/rbd: remove sanity check in journal.sh test

Reviewed-by: Mykola Golub <mgolub@suse.com>
2018-02-20 18:45:11 +02:00
Jason Dillaman
bc80c8c7f9 qa/workunits/rbd: remove sanity check in journal.sh test
When the OSDs are being concurrently thrashed, this can result in
sporadic failures due to the admin socket disappearing.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-02-19 15:21:46 -05:00
Jason Dillaman
1374acdf1a qa/workunits/rbd: correct permission test handling for clone v2 images
Fixes: http://tracker.ceph.com/issues/23043
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-02-19 15:16:40 -05:00
Jason Dillaman
7b9161eb05 qa/workunits/rbd: utilize RBD profiles in permissions.sh test case
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-02-19 14:53:27 -05:00
Ilya Dryomov
8fa9dec271 qa: krbd_fallocate.sh: add -ENOENT handling test case
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-02-19 20:02:57 +01:00
Gregory Farnum
240b688177
Merge pull request #20147 from smithfarm/wip-15904
tools: rados: make -f be --format for consistency with ceph tool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2018-02-13 09:07:24 -08:00
hansbogert
364559074e mon: Add ceph osd get-require-min-compat-client command
As an antagonist to the already existing `set-require-min-compat-client`

Signed-off-by: hansbogert <hansbogert@gmail.com>
2018-02-13 00:52:22 +01:00
Sage Weil
13738cd752
Merge pull request #19939 from liewegas/wip-osd-new-class
mon,osd: do not use crush_device_class file to initalize class for new osds

Reviewed-by: Alfredo Deza <adeza@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Andrew Schoen <aschoen@redhat.com>
2018-02-12 11:17:14 -06:00
Jason Dillaman
82ef376e80 librbd: auto-remove trash snapshots when image is deleted
Fixes: http://tracker.ceph.com/issues/22873
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-02-09 13:34:55 -05:00
Mykola Golub
57baca0166 qa/workunits/rbd/cli_generic: fix test_purge for rbd default format 1
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-02-09 16:04:43 +02:00
songweibin
21c3bc3e69 test/rbd: cli_generic fails if v1 image format or deep-flatten disabled
Fixes: http://tracker.ceph.com/issues/22950

Signed-off-by: songweibin <song.weibin@zte.com.cn>
2018-02-09 16:17:27 +08:00
Sage Weil
59bdada5d5 mon/OSDMonitor: accept crush_device_class in 'osd new' json input
If provided, set the OSD device_class at OSD creation time.  This is
simpler than writing a file that the OSD has to read in and use to
set its initial device class, and also avoids a bit of sticky state
at the OSD that will make it keep trying to reset its device class on
startup if it ever gets cleared.

Note that we now ignore json input fields we don't understand, so remove
a test case.

Signed-off-by: Sage Weil <sage@redhat.com>
2018-02-08 12:34:49 -06:00
Josh Durgin
eae6e64034
Merge pull request #20173 from liewegas/wip-os-ch
os: unify Sequencer and CollectionHandle

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2018-02-07 14:04:08 -08:00
Sage Weil
5749434ad6 test/bench: remove smallio bench tools
These are stale and superceded by the fio ObjectStore (and other)
backends.  Shed the weight!

Signed-off-by: Sage Weil <sage@redhat.com>
2018-02-06 08:21:29 -06:00
Jason Dillaman
57559a47f6 qa/workunits/rbd: force use of v1 clone when testing orphan
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-02-05 11:12:00 -05:00
Jason Dillaman
3ac57a7eb7
Merge pull request #19711 from trociny/wip-20762
rbd: unified way to map images using different drivers

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2018-02-02 13:56:13 -05:00
Jason Dillaman
bba63db1b4
Merge pull request #20170 from trociny/wip-22803
qa/workunits/rbd: remove "trash purge --threshold" test

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-02-02 08:32:36 -05:00
Mykola Golub
be60490f15 qa/workunits/rbd: remove "trash purge --threshold" test
It is difficult to make it work reliably in different environments.

Fixes: http://tracker.ceph.com/issues/22803
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-02-01 17:36:21 +02:00
songweibin
c3e119d0d3 librbd: fix deep copy a child-image
* tweak create a cloned image when the source image is
  a clone (or at least one of its snapshots is a clone).

Signed-off-by: songweibin <song.weibin@zte.com.cn>
2018-02-01 08:17:19 +08:00
Mykola Golub
6a57358add rbd: unified way to map images using different drivers
Instead of "rbd map|unmap|showmapped", "rbd ndb map|unmap|list",
"rbd ggate map|unmap|list" commands, provide:

 rbd device -t krbd|nbd|ggate|... map|unmap|list

which gives interface consistent between drivers.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-01-29 09:34:11 +02:00
Nathan Cutler
3a058a2e42 tests: rados tool: test -f option
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-01-28 12:52:34 +01:00
Mykola Golub
023759c7c1
Merge pull request #20124 from dillaman/wip-devstack
qa/workunits/rbd: switch devstack to pike release

Reviewed-by: Mykola Golub <mgolub@suse.com>
2018-01-26 07:41:00 +02:00
Jason Dillaman
6253490445
Merge pull request #19996 from Songweibin/wip-rbd-deep-cp
rbd: add deep cp CLI method

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-01-25 21:59:31 -05:00
Jason Dillaman
7ff1e0bc21 qa/workunits/rbd: switch devstack to pike release
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-01-25 18:44:20 -05:00
songweibin
0551029242 rbd: add deep cp CLI method
Signed-off-by: songweibin <song.weibin@zte.com.cn>
2018-01-24 09:04:33 +08:00
Theofilos Mouratidis
b9e4aa94b7 rbd trash: replace cli delay option, add rbd trash purge command
Replaced the delay argument for the trash move
command with a string acceptable by /bin/date, e.g.:

$ rbd trash move --pool foo --image bar --expires-in "2 weeks"

Added a "rbd trash purge" command that deletes any expired
image from the trash, has also a command to alter the current
expiration date with the "--older-than" argument which accepts
again a valid argument for /bin/date, e.g.:

$rbd trash purge mypool --older-than "2017-08-20"

There is also the "threshold" argument which tries to remove the
oldest trashed images (by deferment end time) until the pool space
is freed up to a percentage point, e.g.:

$ rbd trash purge mypool --threshold 0.9

If mypool uses 1GB it will try to remove trashed images until the
pool usage becomes equal to or lower than 900MB.

Signed-off-by: Theofilos Mouratidis <t.mour@cern.ch>
2018-01-23 11:41:54 +01:00
Kefu Chai
74c9cfc466 test: reduce the chance to have degraded PGs
in test_mon_osd_misc(), there is good chance that the cluster chooses
to use an unbalanced weight because of the data distribution at that moment.
but this setting could prevent the CRUSH from choosing enough number of
OSDs for test_mon_cephdf_commands(), where 32 PGs are to be created. so
it's more likely that the CRUSH fails to pick enough OSDs for all PGs.
that's why we have a curr_object_copies_rate = 0.5.

so, in this change, pg=pgp=1 is specified for the new pool.

Fixes: http://tracker.ceph.com/issues/22711
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-01-22 21:24:58 +08:00
Kefu Chai
0c38eb87e2
Merge pull request #19673 from zouaiguo/wip_erase_code
mon/OSDMonitor.cc : set erasure-code-profile to "" when create replicated pools.

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-01-15 18:34:34 +08:00
Sage Weil
df5a37091a
Merge pull request #19946 from liewegas/wip-22677
qa/workunits/rados/test_rados_tool: fix stray |, race
2018-01-14 13:40:54 -06:00
Sage Weil
ff9fa835da qa/workunits/rados/test_rados_tool: remove stray |, fix race
Fixes: http://tracker.ceph.com/issues/22676
Signed-off-by: Sage Weil <sage@redhat.com>
2018-01-14 10:35:14 -06:00
Victor Denisov
838cae45af rbd: Add group snapshot rename commands
Signed-off-by: Victor Denisov <denisovenator@gmail.com>
2018-01-13 14:00:31 -05:00
Sage Weil
ea2c99ec87 qa/workunits/rados/test_rados_tool.sh: -x
Signed-off-by: Sage Weil <sage@redhat.com>
2018-01-13 10:26:24 -06:00
Yuri Weinstein
a7b97806fc
Merge pull request #19793 from badone/wip-blocking-deep-scrub
ceph.in: Add blocking mode for scrub and deep-scrub

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2018-01-12 14:47:30 -08:00
Jason Dillaman
619b0c0244 rbd: adjusted "lock list" JSON and XML formatted output
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-01-12 11:31:07 -05:00
Sage Weil
c1ec2752ee
Merge pull request #19180 from theanalyst/tools/rados-omap-clear
tools: rados add a cli option to clear omap keys

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-01-11 15:50:12 -06:00
Jason Dillaman
31a382f1ec rbd: utilize '<name>@<snap>' format when creating/removing group snaps
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-01-11 10:38:23 -05:00
Victor Denisov
d95b791e8d qa/workunits/rbd: Add tests for consistency groups
Signed-off-by: Victor Denisov <denisovenator@gmail.com>
2018-01-11 10:38:23 -05:00
Brad Hubbard
637bf125c3 qa: Add blocking versions of scrub and deep-scrub
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-01-10 14:05:55 +10:00
Casey Bodley
f473d57013 librados: add async interfaces for use with Networking TS
Defines asynchronous librados operations that satisfy all of the
"Requirements on asynchronous operations" imposed by the C++ Networking
TS [1] in section 13.2.7. These operations are implemented in terms of
boost::asio, but the interfaces themselves are free of boost types -
this makes the transition to std::net trivial when it's available.

These interfaces conform to the Extensible Asynchronous Model [2] that
originated in boost::asio. This model allows the last 'handler' argument
to either be a callback that gets the result, a coroutine yield_context
that will suspend until completion, or a 'use_future' tag to request the
result in a std::future (see the unit tests for examples of each). The
'Extensible' part also enables further integration with new frameworks.

For now, only async_read(), async_write(), and the read/write variants
of async_operate() are provided.

[1] Working Draft, C++ Extensions for Networking
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4711.pdf
[2] "Library Foundations for Asynchronous Operations"
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3896.pdf

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2018-01-09 09:58:18 -05:00
zouaiguo
a61e62cf44 mon/OSDMonitor.cc : set erasure-code-profile to "" when create replicated pools.
when we create a pool specify a rule, for example "ceph osd pool create foo replicated 10 rule_foo",
we will set pool foo erasure-code-profile to rule_foo,
if there has an erasure-code-profile names rule_foo, use "ceph osd erasure-code-profile rule_foo" will fail,
"Error EBUSY: foo pool(s) are using the erasure code profile 'rule_foo'", this is wrong.

we should do:
1. set erasure-code-profile to "" when create replicated pools
2. whether erasure-code-profile is used by pool not only judge pool erasure_code_profile property and also the pool is_erasure

Signed-off-by: zouaiguo <zou.aiguo@zte.com.cn>
2018-01-09 14:14:06 +08:00