Commit Graph

1873 Commits

Author SHA1 Message Date
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
Yan, Zheng
8da3283dda qa/workunits/snaps: add snaprealm split test
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2018-02-09 18:42:29 +08:00
Yan, Zheng
35af091a04 qa/workunits/snaps: add hardlink snapshot test
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2018-02-09 18:42:29 +08: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
Mykola Golub
e372e9492b rbd-nbd: output format support for list-mapped command
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-01-03 14:44:10 +02:00
Mykola Golub
a5fd0e71d1
Merge pull request #19724 from dillaman/wip-18480
rbd: support cloning an image from a non-primary snapshot

Reviewed-by: Mykola Golub <mgolub@suse.com>
2018-01-03 14:11:25 +02:00
Jason Dillaman
e4b8ae348b
Merge pull request #19666 from trociny/wip-nbd-unmap-by-image
rbd-nbd: allow to unmap by image or snap spec

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-01-02 20:35:30 -05:00
Jason Dillaman
c7c15b681c librbd: permit creation of clones against non-primary images
Fixes: http://tracker.ceph.com/issues/18480
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-01-02 10:11:56 -05:00
Mykola Golub
be87e8b118 rbd-ggate: allow to unmap by image or snap spec
(to match the behaviour of krbd unmap)

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-27 20:29:58 +00:00
Mykola Golub
8e0f40aae1 rbd-ggate: extended info when listing devices
This matches nbd and krbd drivers output.

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-12-27 20:29:58 +00:00
Mykola Golub
02e211c282 rbd-nbd: allow to unmap by image or snap spec
(to match the behaviour of krbd unmap)

Signed-off-by: Mykola Golub <mgolub@suse.com>
2017-12-25 17:19:49 +02:00
Mykola Golub
47e38ca1b9 qa/workunits/rbd: bench-write is part of exclusive option test
Signed-off-by: Mykola Golub <mgolub@suse.com>
2017-12-25 17:19:49 +02:00
Jason Dillaman
8c2ee6dd0f qa/workunits/rbd: simplify split-brain test to avoid potential race
Fixes: http://tracker.ceph.com/issues/22485
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-12-19 16:30:25 -05:00
Abhishek Lekshmanan
83631d9bd8 qa: add test for clearomap cli option
Fixes:http://tracker.ceph.com/issues/22255
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-12-05 11:06:22 +01:00
John Spray
967fc9cf8a
Merge pull request #18649 from b-ranto/wip-restful-fixes
mgr/restful: A couple of restful fixes

Reviewed-by: John Spray <john.spray@redhat.com>
2017-11-29 12:11:58 +00:00
Kefu Chai
b3c159e9fb qa/ceph-disk: enlarge the simulated SCSI disk
100MB will be allocated for journal, and the remaining 100MB is for data
device. taking the inode into consideration, there will be approximately
87988 kB available for the activated OSD. and it will complain with a
"nearfull" state.

Fixes: http://tracker.ceph.com/issues/22136
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-28 14:55:33 +08:00
Kefu Chai
aa34321a4a qa/workunits/ceph-disk: do not redirect stderr to stdout
normally, if we care about the output of ceph-disk, we expect a json
string, and ceph-disk sends the output to stdout, and errors/warnings
to stderr. so everything works as expected. and the test should also
follow this tradition. for example, if deprecated warnings are printed,
the warning message should not be collected along with the json string.

see also: d44334f3

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-28 14:55:19 +08:00
Boris Ranto
059588e758 qa/restful: Test pg_num/pgp_num modifications
Signed-off-by: Boris Ranto <branto@redhat.com>
2017-11-27 14:35:26 +01:00
Mykola Golub
7fb9920316 qa/workunits/rbd: wait for status propagated only if daemon started
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-11-21 22:29:16 +02:00
Jason Dillaman
0502cb1573
Merge pull request #19073 from trociny/wip-qa-demote
qa/workunits/rbd: wait for demote status is propagated

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-11-21 12:52:08 -05:00
Kefu Chai
d44334f317 qa/workunits: silence py warnings for ceph-disk tests
ceph-disk now prints "depreacted" warning message when it starts. but
the tests parses its stdout and stderr for a json string. so we need to
silence the warnings for the tests.

Fixes: http://tracker.ceph.com/issues/22154
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-21 21:49:48 +08:00
Mykola Golub
f4b88b2c9d qa/workunits/rbd: wait for demote status is propagated
(before promoting the image on another cluster)

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-11-21 13:22:50 +02:00
Ilya Dryomov
c1d6f8364f
Merge pull request #18652 from idryomov/wip-qa-krbd-blkroset
qa/suites/krbd: add krbd BLKROSET test

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-11-02 10:10:39 +01:00
Jason Dillaman
540b4cf575
Merge pull request #18619 from trociny/wip-qa-mirror-remove
qa/workunits/rbd: unnecessary sleep after failed remove

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-11-01 21:34:35 -04:00
Yuri Weinstein
223f45e4e1
Merge pull request #18610 from cbodley/wip-osd-subop-num
osd: add processed_subop_count for cls_cxx_subop_version()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-11-01 08:24:13 -07:00
Kefu Chai
371d3f4091 qa: stop testing deprecated "ceph osd create"
"ceph osd create" is not idempotent, and is considered deprecated.

Fixes: http://tracker.ceph.com/issues/21993
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-11-01 10:45:11 +08:00
Ilya Dryomov
c4888ddc1f qa/workunits/rbd: remove set_ro.py
This test is incomplete and has been obsoleted by krbd_blkroset.t.
It's also not wired up, so it's not actually being run.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-10-31 13:40:16 +01:00
Casey Bodley
83d6b493f7 qa: add ceph_test_cls_log to cls workunit
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-10-30 15:31:03 -04:00
Mykola Golub
cb90069604 qa/workunits/rbd: unnecessary sleep after failed remove
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-10-30 08:57:29 +02:00
Jason Dillaman
27613a63d1 qa/suites/rbd: run cls tests for all dependencies
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-10-27 15:23:45 -04:00
Sage Weil
7740af808c Merge pull request #18552 from liewegas/wip-mds-cluster-down
qa/workunits/rest/test.py: stop trying to test obsolte cluster_up/down

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-10-26 17:47:51 -05:00
Sage Weil
810a138133 qa/workunits/rest/test.py: stop trying to test obsolete 'mds *' commands
These were recently removed.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-10-26 11:22:20 -05:00
Sage Weil
c337b8739d Merge pull request #18533 from tchaikov/wip-qa-cephtool
qa: do not "ceph fs get cephfs" w/o a cephfs fs

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
2017-10-26 09:19:11 -05:00
Kefu Chai
3ceab4ca43 Merge pull request #16332 from badone/wip-warn-about-objects-with-too-many-omap-entries
osd: Warn about objects with too many omap entries

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-10-25 19:20:00 +08:00
Kefu Chai
0f1e97238c qa: do not "ceph fs get cephfs" w/o a cephfs fs
introduced by 183646c

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-10-25 19:12:39 +08:00
Patrick Donnelly
c58161f25b
Merge PR #17266 into master
* refs/pull/17266/head:
	qa: update test_ceph_argparse to test fs cmds
	qa: use fs rm_data_pool
	qa: fix mdsmap lookup
	qa: remove usage of mds dump
	PendingReleaseNotes: add obsoleted mds commands
	qa: remove use of obsolete mds commands
	ceph_volume_client: remove use of obsolete mds cmd
	doc: update on obsolete mds commands
	cephfs: obsolete deprecated mds commands

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
2017-10-24 16:37:14 -07:00
Patrick Donnelly
b897ef9445
qa: use fs rm_data_pool
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-10-24 11:51:02 -07:00
Brad Hubbard
71bf04775b osd: Warn about objects with too many omap entries
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2017-10-24 17:27:57 +10:00
Jason Dillaman
918df91213 rbd: bench should flush prior to starting a test
For the new read-based bench tests, flushing prior to the start of the test
will result in the exclusive lock being acquired and the object map being
utilized.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-10-23 13:22:50 -04:00
Kefu Chai
9911e905e4 Merge pull request #16745 from Liuchang0812/object-store-repair
common, tool: update kvstore-tool to repair key/value database

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-10-18 00:24:39 +08:00
Jason Dillaman
ecec3217b6 Merge pull request #17134 from PCzhangPC/metaexin
rbd: export/import image-meta when we export/import an image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-10-16 21:00:08 -04:00
Chang Liu
8d5d9c6a62 test: new test case for ceph-kvstore-tool
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
2017-10-16 22:52:10 +08:00
Jason Dillaman
22816ed3f4 qa/workunits/rbd: fixed variable name for resync image id
Fixes: http://tracker.ceph.com/issues/21663
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-10-03 13:25:33 -04:00
Patrick Donnelly
183646c919
qa: remove use of obsolete mds commands
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-10-01 17:22:36 -07:00
Mykola Golub
fcaffe7e01 qa/workunits/rbd: pool create may fail for small cluster
ceph osd pool create test 100
Error ERANGE:  pg_num 100 size 3 would mean 648 total pgs, which exceeds max 600 (mon_max_pg_per_osd 200 * num_in_osds 3)

Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-10-01 16:36:17 +02:00
PCzhangPC
2f0b233a31 rbd:export/import image-meta when we export/import an image
when we do exporting/importing an image, we should export or import the image-meta of this image at the same time

Signed-off-by: PCzhangPC <pengcheng.zhang@easystack.cn>
2017-09-29 13:30:01 +08:00
Jason Dillaman
9aa5dfb8ec rbd-mirror: sync image metadata when transfering remote image
Fixes: http://tracker.ceph.com/issues/21535
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-09-28 15:22:08 -04:00
Sage Weil
07fe4fd5b5 Merge pull request #17528 from liewegas/wip-mgr-localpool
pybind/mgr/localpool: module to automagically create localized pools

Reviewed-by: John Spray <john.spray@redhat.com>
2017-09-25 12:30:05 -05:00
Sage Weil
6383fa5b30 qa/workunits/mgr/test_localpool: simple test for localpool mode
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-25 12:34:53 -04:00
Sage Weil
e0beb1e02a Merge pull request #17848 from liewegas/wip-ruleset-errors
mon/OSDMonitor: error out if setting ruleset-* ec profile property

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2017-09-24 21:15:42 -05:00
Sage Weil
6376d75eda mon/OSDMonitor: error out if setting ruleset-* ec profile property
We change ruleset -> crush back in dc7a2aaf7a.
If someone tries to use the old property, error out early, instead of
silently not doing the thing they thought they told us to do.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-24 11:25:01 -04:00
xie xingguo
b60d3498e2 osd/PrimaryLogPG: prepare_transaction - fix EDQUOT vs ENOSPC
We now set full flag if a pool is currently running out of space and
set both full and full_no_quota flags if it is running out of quota.
Therefore the full_no_quota flag should be instead used to uniquely
identify whether we are running out of quota or not.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-09-20 08:49:42 +08:00
xie xingguo
5dd3458eec qa: fix pool-quota related tests
https://github.com/ceph/ceph/pull/17371 introduces support of
per-pool space-full flag, which turns out to set both
full and full_no_quota flags now if a pool is currently running out
of quota.

Actually this test is fragile as long as we keep appending new flags
at pool granularity, but let's not bother with that complexity now.

Fixes: http://tracker.ceph.com/issues/21409
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-09-16 13:50:18 +08:00
Mykola Golub
0bafa7e8d4 Merge pull request #17559 from dillaman/wip-21181
qa/workunits/rbd: relax greps to support upgrade formatting change

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-09-09 11:23:57 +03:00
Tamilarasi Muthamizhan
594b736228 Merge pull request #17536 from ceph/wip-cd-rbd-pool
qa/tests: fix rbd pool creation for systemd tests
2017-09-07 15:13:32 -07:00
Sage Weil
1006b62fe6 Merge pull request #17322 from liewegas/wip-post-luminous-mon
mon: remove pre-luminous compat cruft (2 of many)

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2017-09-07 13:47:43 -05:00
Sage Weil
e715533feb qa/workunits/*: require-osd-release mimic, not luminous
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-07 09:18:56 -04:00
Jason Dillaman
273c84578b qa/workunits/rbd: relax greps to support upgrade formatting change
Fixes: http://tracker.ceph.com/issues/21181
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-09-07 08:56:16 -04:00
Jason Dillaman
b0f1545d3b Merge pull request #16998 from trociny/wip-20860
rbd-mirror: update asok hook name on image rename

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-09-07 08:34:42 -04:00
Vasu Kulkarni
49f95b3d8b create the rbd pool right after install
rbd pool should exist for many rbd tests to work properly, create
the pool right after install is successful.

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
2017-09-06 18:07:54 -07:00
Sage Weil
e21e63cb88 qa/workunits/cephtool/test.sh: drop 'pg set_full_ratio'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-09-06 10:18:06 -04:00
Sage Weil
1ae70df392 Merge pull request #17329 from xiexingguo/wip-21162
mon/OSDMonitor: make 'osd crush rule rename' idempotent

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-29 15:58:21 -05:00
Yuri Weinstein
f4c4a9d90c Merge pull request #17125 from xiexingguo/wip-add-bucket-with-loc
mon/OSDMonitor: add location option for "crush add-bucket" command

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-29 09:12:43 -07:00
Mykola Golub
9ddb5da337 rbd-mirror: update asok hook name on image rename
Fixes: http://tracker.ceph.com/issues/20860
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-08-29 08:30:20 +02:00
xie xingguo
cd2191c3f1 mon/OSDMonitor: make 'osd crush rule rename' idempotent
Fixes: http://tracker.ceph.com/issues/21162
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-29 08:29:13 +08:00
Kefu Chai
30b5b4627c Merge pull request #16494 from asomers/bin_bash
misc: Fix bash path in shebangs

Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-08-27 10:14:14 +08:00
Sage Weil
d930a4e062 Merge pull request #17029 from xiexingguo/wip-crush-rule-rename
mon: "ceph osd crush rule rename" support

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-25 10:21:38 -05:00
xie xingguo
1ea448ac75 common/types: make numbers a bit nicer when displaying space usage
Was:
----------------------------------------------------------------------------
GLOBAL:
    SIZE       AVAIL      RAW USED     %RAW USED
    30911M     27050M        3861M         12.49
POOLS:
    NAME                  ID     USED        %USED     MAX AVAIL     OBJECTS
    rbd                   0      101216k      1.10         8913M        1178
    cephfs_data_a         1            0         0         8913M           0
    cephfs_metadata_a     2          892         0         8913M          21
----------------------------------------------------------------------------

Now:
----------------------------------------------------------------------------
GLOBAL:
    SIZE      AVAIL     RAW USED     %RAW USED
    30.2G     26.4G        3.77G         12.50
POOLS:
    NAME                  ID     USED      %USED     MAX AVAIL     OBJECTS
    rbd                   0      99.2M      1.10         8.70G        1180
    cephfs_data_a         1          0         0         8.70G           0
    cephfs_metadata_a     2        892         0         8.70G          21
----------------------------------------------------------------------------

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-22 12:33:10 +08:00
xie xingguo
ac36b471a3 mon/OSDMonitor: add location option for "crush add-bucket" command
So we can combine "crush add-bucket" with "crush move" command,
and hence avoid making two separate changes to the osdmap,
and hence slow down map-epoch generation.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-22 10:39:03 +08:00
Xie Xingguo
89d28a176c Merge pull request #16955 from xiexingguo/wip-app-ls
mon/OSDMonitor: "osd pool application get" support

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-08-19 17:49:43 +08:00
Mykola Golub
c4c7075029 qa/workunits/rbd: test data pool is mirrored correctly
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-08-17 10:07:12 +02:00
xie xingguo
7c67f95201 crush, mon: "ceph osd crush rule ls-by-class" support
This command returns all crush rules that are currently
referencing the device class specified by user.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-17 13:34:36 +08:00
xie xingguo
46586b2288 mon/OSDMonitor: "osd pool application ls" support
It would be a pain if we have to call 'ceph osd dump --format=json-pretty'
to find out these each time...

Demo output:
(1) ceph osd pool application get
{
    "cephfs_data_b": {
        "cephfs": {}
    },
    "cephfs_metadata_a": {
        "cephfs": {}
    },
    "test_pool": {
        "rbd": {
            "test": "me"
        }
    }
}

(2) ceph osd pool application get test_pool
{
    "rbd": {
        "test": "me"
    }
}

(3) ceph osd pool application get test_pool rbd
{
    "test": "me"
}

(4) ceph osd pool application get test_pool rbd test
me

Fixes: http://tracker.ceph.com/issues/20976
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-16 09:41:11 +08:00
xie xingguo
a5075ed253 mon: "ceph osd crush rule rename" support
User may specify a rule with the same name of the pool that it serves.
Since a pool can be renamed, so does the rule.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-15 17:01:26 +08:00
Sage Weil
9c42597f09 qa/workunits/mon/crush_ops.sh: test weight sets vs device classes
Signed-off-by: Sage Weil <sage@redhat.com>
2017-08-11 09:40:11 -04:00
Yuri Weinstein
c1b87c71e3 Merge pull request #16892 from xiexingguo/wip-clean-pg-temp
mon/OSDMonitor: fix 'osd pg temp' unable to cleanup pg-temp

Reviewed-by: Sage Weil <sage@redhat.com>
2017-08-09 16:34:38 -07:00
Mykola Golub
6a575136a7 qa/workunits/rbd: use command line option to specify watcher asok
The previous method to get the watcher admin socket was fragile
and had started to fail after the recent changes to vstart ceph.conf.

Fixes: http://tracker.ceph.com/issues/20954
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-08-09 09:03:00 +02:00
xie xingguo
71cef3cb74 mon/OSDMonitor: fix 'osd pg temp' unable to cleanup pg-temp
This is not very elegant way but should work..

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-08 17:33:35 +08:00
Mykola Golub
b4dbfcc879 rbd-ggate: tool to map images on FreeBSD via GEOM Gate
rbd-ggate spawns a process responsible for the creation of ggate
device and forwarding I/O requests between the GEOM Gate kernel
subsystem and RADOS.

On FreeBSD it provides functionality similar to rbd-nbd on Linux.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-08-08 11:00:30 +02:00
Jason Dillaman
4e1b834d2d rbd-mirror: simplify resync handling within image replayer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-08-07 10:13:33 -04:00
xie xingguo
bfd1d4ef9a mon/OSDMonitor: sanity check osd before performing 'osd purge'
This will pervent OSDMonitor from crashing on purging a very large
non-existent osd id as below:

osd e11 prepare_command_osd_purge purging osd.8
    -1> 2017-08-05 18:59:44.994319 7f6076968700 10 mon.a@0(leader).osd e11 prepare_command_osd_destroy osd.8 does not exist.
     0> 2017-08-05 18:59:45.002309 7f6076968700 -1 /home/xxg/build/ceph-dev/src/osd/OSDMap.h: In function 'int OSDMap::get_state(int) const'
 thread 7f6076968700 time 2017-08-05 18:59:44.994336
/home/xxg/build/ceph-dev/src/osd/OSDMap.h: 690: FAILED assert(o < max_osd)

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-05 19:43:39 +08:00
Sage Weil
62e51661e6 Merge branch 'wip-qa-rbd-health' of git://github.com/dillaman/ceph
# Conflicts:
#	qa/tasks/ceph.py
2017-08-04 15:07:22 -04:00
Sage Weil
9c7a653fee Merge pull request #16769 from liewegas/wip-20295-b
os/bluestore: allow multiple DeferredBatches in flight at once

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-04 11:04:38 -05:00
Nathan Cutler
d919987caa tests: rbd: reproducer for rbd-on-EC issue
This introduces a new "rbd/singleton-bluestore" suite because creating an rbd
on an EC-backed datapool will fail on filestore.

References: http://tracker.ceph.com/issues/20295
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2017-08-03 22:54:17 -04:00
Kefu Chai
007095b7ae qa/workunits/mon/crush_ops.sh: remove existing dev class before setting it
we cannot overwrite existing dev class, and "osd_class_update_on_start"
is true by default (see 0c885d6). so we should remove all device classes before
setting them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-08-03 17:26:26 -04:00
Jason Dillaman
c2b451e8cb qa: fix RBD-related POOL_APP_NOT_ENABLED health warnings
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-08-03 09:50:41 -04:00
Kefu Chai
d67d6c57ae qa/workunits/ceph-disk: fix the path to ceph-helpers-root.sh
partially reverts 841f3bd

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-08-01 21:54:44 +08:00
Kefu Chai
2a128f4829 Merge pull request #16599 from liewegas/wip-standalone-fixes
qa/workunits: adjust path to ceph-helpers.sh

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-28 13:18:47 +08:00
Alan Somers
3aae5ca6fd scripts: fix bash path in shebangs
/bin/bash is a Linuxism.  Other operating systems install bash to
different paths.  Use /usr/bin/env in shebangs to find bash.

Signed-off-by: Alan Somers <asomers@gmail.com>
2017-07-27 13:24:26 -06:00
Sage Weil
c1aef68f02 Merge pull request #16569 from liewegas/wip-set-not-put
mon: 'config-key put' -> 'config-key set'

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
2017-07-27 11:34:37 -05:00
Sage Weil
c7430c56cd Merge pull request #16388 from xiexingguo/wip-class-misc-fixes
crush, mon: simplify device class manipulation commands

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-27 11:04:33 -05:00
Jason Dillaman
42fabc2e80 Merge pull request #16398 from dillaman/wip-20655
rbd-mirror: guard the deletion of non-primary images

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2017-07-27 08:27:39 -04:00
Sage Weil
5534912daa qa/workunits/cephtool/test.sh: add some config-key tests
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 14:13:22 -04:00
Sage Weil
4eb1a518e3 mon: 'config-key put' -> 'config-key set'
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 14:10:08 -04:00
Sage Weil
ee06dc6996 Merge pull request #16530 from xiexingguo/wip-fix-pgtemp
mon: prime pg_temp and a few health warning fixes

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 13:09:33 -05:00
xie xingguo
a27fd9d25c crush: kill "class create" command
The device class is now self and automatically managed.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 22:40:17 +08:00
Sage Weil
742005bd75 Merge pull request #16579 from liewegas/wip-fix-nonregression
qa/suites/rados/singleton/all/erasure-code-nonregression: fix typo

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Amik Kumar <amitkuma@redhat.com>
2017-07-26 08:46:43 -05:00
Sage Weil
c1bdd36d8f qa/workunits/erasure-code/encode-decode-nonregression: do not require git checkout
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 09:35:46 -04:00
Sage Weil
841f3bdf92 qa/workunits: adjust path to ceph-helpers.sh
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-26 08:08:01 -04:00
Kefu Chai
d85a7889fd Merge pull request #16446 from xiexingguo/wip-destroyed
mon: show destroyed status in tree view; do not auto-out destroyed osds

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-26 17:15:53 +08:00
xie xingguo
96eb0a9887 mon/OSDMonitor: apply new 'destroyed' status to 'osd tree' filter
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-26 15:13:32 +08:00
Sage Weil
d2c31a8114 Merge pull request #16469 from xiexingguo/wip-fix-test
test: s/osd_objectstore_type/osd_objectstore
2017-07-25 21:04:22 -05:00
Sage Weil
a264725b62 Merge pull request #16541 from liewegas/wip-20761
qa/workunits/cephtool/test.sh: disable 'fs status' until bug is fixed
2017-07-25 14:03:38 -05:00
Jason Dillaman
76fd882464 qa/workunits/rbd: rbd-mirror now treats no primary image as unknown state
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-25 07:17:15 -04:00
xie xingguo
450633b9e6 mon/OSDMonitor: ENOENT on removing non-existent app key
So we don't bother to trigger an pool update, which is potentially
big stuff.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-25 13:19:35 +08:00
xie xingguo
b4dcdecb6a mon/OSDMonitor: ENOENT on disabling non-existend app
so we don't bother to trigger an pool update, which is potentially
big stuff.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-25 13:19:29 +08:00
Sage Weil
71ea171604 qa: move ceph-helpers and misc src/test/*.sh tests to qa/standalone
- stop running via make check
- add teuthology yamls to run them
- disable ceph_objecstore_tool.py for now (too slow for make check, and
we can't use vstart in teuthology via a package install)
- drop cephtool tests since those are already covered by other teuthology
tests
- leave a handful of (fast!) ceph-helpers tests for make check for minimal
integration tests.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-24 22:11:49 -04:00
Sage Weil
f347ef54c2 qa/workunits/cephtool/test.sh: disable 'fs status' until bug is fixed
See http://tracker.ceph.com/issues/20761
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-24 16:54:13 -04:00
Sage Weil
fc8374b472 Merge pull request #16326 from liewegas/wip-weight-set
crush,mon: add weight-set introspection and manipulation commands

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com
2017-07-24 08:27:06 -05:00
Sage Weil
08bdc2c867 Merge pull request #16500 from liewegas/wip-compact-sudo
qa/workunits/cephtool/test.sh: add sudo for daemon compact

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-22 13:01:20 -05:00
xie xingguo
fa0e314cde test: s/osd_objectstore_type/osd_objectstore/
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-22 15:22:31 +08:00
Sage Weil
4e6487cad4 Merge pull request #15991 from dillaman/wip-rbd-auth-profile
mon,osd: new rbd-based cephx cap profiles

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-21 22:38:42 -05:00
Sage Weil
0429acda45 Merge pull request #16460 from liewegas/wip-mgr-metadata
mon: add mgr metdata commands, and overall 'versions' command for all daemon versions

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-21 22:36:09 -05:00
Sage Weil
2f272ab451 qa/workunits/cephtool/test.sh: add sudo for daemon compact
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-21 23:18:03 -04:00