Commit Graph

1982 Commits

Author SHA1 Message Date
Jason Dillaman
fee2ea1c1c Merge pull request #15757 from runsisi/wip-image-ts
librbd: add create timestamp metadata for image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-06-21 20:51:52 -04:00
Sage Weil
a6831381ad Merge pull request #15787 from liewegas/wip-19943-fix
ceph-objectstore-tool: do not populate snapmapper with missing clones

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2017-06-21 14:31:02 -05:00
David Zafman
dc8aff54c5 tools: Cleanup dead code in ceph-objectstore-tool
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-06-21 07:59:38 -07:00
Sage Weil
1e7cd3550c Merge pull request #13683 from liewegas/wip-crush-rulesets
crush: detect and (usually) fix ruleset != rule id

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-06-21 08:45:42 -05:00
John Spray
623e8b2a13 Merge pull request #15715 from jcsp/wip-jt-rmapply
tools/cephfs: remove `apply` mode of cephfs-journal-tool

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2017-06-21 07:30:53 -04:00
Sage Weil
867ada5bd5 ceph-objectstore-tool: do not populate snapmapper with missing clones
Cache pools may have clones represented in SnapSet that are not stored
locally.  This is fine as long as ceph-objectstore-tool doesn't go and
add them when it shouldn't.

Fixes: http://tracker.ceph.com/issues/19943
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-20 14:25:28 -04:00
runsisi
c79aab7b89 rbd: include create timestamp for info command
Signed-off-by: runsisi <runsisi@zte.com.cn>
2017-06-20 13:52:06 +08:00
Sage Weil
a52ad49362 crush/CrushWrapper: add_simple_ruleset[_at] -> add_simple_rule[_at]
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-19 19:09:06 -04:00
Sage Weil
3fac3c1a44 osd/OSDMap: some cosmetic cleanup (ruleset -> rule)
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-19 19:09:06 -04:00
Sage Weil
5c041258f7 Merge pull request #15685 from wjwithagen/wip-wjw-freebsd-ENODATA-2
core/common: Fix ENODATA for FreeBSD with compat.h

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-06-19 18:05:25 -05:00
John Spray
abb65803f7 Merge pull request #15614 from jcsp/wip-jt-help
tools/cephfs: fix cephfs-journal-tool --help

Reviewed-by: Douglas Fuller <dfuller@redhat.com>
2017-06-19 05:35:21 -04:00
Pan Liu
4c905cd27a rbd-nbd: support to display pool/image/snap information which mapped to
a nbd device.

Signed-off-by: Pan Liu <wanjun.lp@alibaba-inc.com>
2017-06-18 16:12:30 +08:00
Kefu Chai
53c04e5be5 Merge pull request #15618 from liupan1111/wip-fix-comment
tools/rados: fixed typo in help information

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-06-17 11:00:34 +08:00
Pan Liu
ef94eb520a rbd-nbd: remove global variables.
Signed-off-by: Pan Liu <wanjun.lp@alibaba-inc.com>
2017-06-17 00:52:09 +08:00
Jason Dillaman
ba220e4179 Merge pull request #15561 from zy751713126/add-create-rbd-default-info
rbd: add default note info to size (create and resize)

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-06-16 09:02:02 -04:00
John Spray
62a466dc50 tools/cephfs: remove apply mode of cephfs-journal-tool
This is undocumented and untested -- it was something
written before and superceded by the "recover_dentries"
subcommand.  While we're at it, also
s/scavenge_dentries/recover_dentries/
internally.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-06-15 18:06:17 -04:00
John Spray
80612a566e tools/cephfs: fix cephfs-journal-tool --help
The --alternate-pool option was in the wrong place.

This format is not beautiful, but I think it's accurate
in terms of where the option should sit to get parsed
correctly?

Signed-off-by: John Spray <john.spray@redhat.com>
2017-06-15 15:44:15 -04:00
Willem Jan Withagen
30b17881f5 core/common: Fix ENODATA for FreeBSD with compat.h
- When ENODATA used, compat.h needs to be include before any
   of the includes that could possibly define ENODATA by itself.
   Since otherwise xattr-tests will fail to detect that attributes
   are (not) there.

Tracker: http://tracker.ceph.com/issues/19883
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-06-15 10:52:27 +02:00
Kefu Chai
1e1b108bb6 Merge pull request #15376 from tchaikov/wip-remove-boost-submodule
cmake: build boost as an external project

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-06-15 00:40:28 +08:00
Kefu Chai
ddeb43840f cmake: move common/util.cc into ceph-common
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-14 23:53:50 +08:00
Kefu Chai
c27ccf6939 cmake: use boost target instead of libary path while linking against them
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-14 11:17:41 +08:00
Mykola Golub
b7d657d45e Merge pull request #15593 from chenfangxian/rbd-nbd-fix-unmap
rbd-nbd: ensure unmap returns error code

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Pan Liu <wanjun.lp@alibaba-inc.com>
2017-06-13 15:10:25 +03:00
chenfangxian
890adc605b rbd-nbd: fix nbd do_unmap error handling
when nbd disconnect failed, ensure do_unmap return error logic.

Signed-off-by: chenfangxian <chenfangxian@cmss.chinamobile.com>
Signed-off-by: guojiannan <guojiannan@cmss.chinamobile.com>
2017-06-13 11:05:51 +08:00
Pan Liu
0e733ec329 tools/rados: fixed redundant comment of help information
Signed-off-by: Pan Liu <wanjun.lp@alibaba-inc.com>
2017-06-12 14:32:53 +08:00
Ilya Dryomov
8cf0373374 rados: fix typo in 'df' column name
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-06-09 18:36:19 +02:00
Sage Weil
c2e346cf12 Merge pull request #15562 from tchaikov/wip-no-assert.h
common,osdc: remove atomic_t completely

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-08 20:38:23 -05:00
Mykola Golub
578468f38c Merge pull request #15532 from dillaman/wip-rbd-mirror-stress
rbd-mirror: lock loss during sync should wait for in-flight copies

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-06-08 14:42:29 +03:00
Kefu Chai
2b427198de tools/rbd_mirror: do not include ununsed header
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-08 12:23:01 +08:00
zhengyin
0974691ab6 add default note info to size (create and resize)
Signed-off-by: Zheng Yin <zhengyin@chinac.com>
2017-06-08 11:00:55 +08:00
Jason Dillaman
e1cfaedc43 rbd: removed hardcoded default rbd pool name
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-07 16:26:25 -04:00
Jason Dillaman
708d7bb0c5 rbd-nbd: removed default rbd pool name
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-07 16:26:24 -04:00
Jason Dillaman
21d19325f3 rbd-mirror: narrowed scope of exclusive lock op tracking
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-07 16:09:10 -04:00
Jason Dillaman
02f9ea4b3f rbd-mirror: partial revert of 649b29d
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-07 15:33:51 -04:00
Jason Dillaman
7bda34ea3b Merge pull request #14745 from trociny/wip-18789
rbd-mirror: coordinate image syncs with leader

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-06-06 20:56:49 -04:00
Mykola Golub
e5c46aa878 Merge pull request #15492 from dillaman/wip-20185
rbd: properly decode features when using image name optional

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-06-06 13:49:29 +03:00
Mykola Golub
4db1ee39c0 rbd-mirror A/A: coordinate image syncs with leader
Fixes: http://tracker.ceph.com/issues/18789
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-06-06 10:49:42 +02:00
Mykola Golub
55f9c625bd rbd-mirror: resolve potential recursive lock
Would have been possible when release_image had lead to cancel
sync (i.e. cancel_sync_request).

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-06-06 10:42:25 +02:00
Mykola Golub
def50d0479 rbd-mirror: make sync throttler per pool
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-06-06 10:42:25 +02:00
Mykola Golub
7ce058fb12 Merge pull request #15415 from dillaman/wip-rbd-valgrind
librbd: fix valgrind errors and ensure tests detect future leaks

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-06-06 10:38:34 +03:00
Mykola Golub
9c0dbfa25d Merge pull request #15140 from dillaman/wip-18963
rbd-mirror: permit release of local image exclusive lock after force promotion

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-06-06 10:37:56 +03:00
Jason Dillaman
f1b05a2b06 rbd: properly decode features when using image name optional
Fixes: http://tracker.ceph.com/issues/20185
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-05 13:17:19 -04:00
Kefu Chai
62a478cb5f tools/ceph-monstore-update-crush.sh: switch from xmlstarlet to jq
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-02 13:02:52 -04:00
Sage Weil
87a993a93f ceph-kvstore-tool: implement 'rm' and 'rm-prefix' commands
Signed-off-by: Sage Weil <sage@redhat.com>
2017-06-02 13:02:50 -04:00
Sage Weil
b735c5a939 Merge pull request #15011 from xiexingguo/wip-crush-tool
tools/crushtool: replicated-rule API support

Reviewed-by: Sage Weil <sage@redhat.com>
2017-06-02 10:20:44 -05:00
Jason Dillaman
72785bb568 rbd-mirror: fix valgrind memcheck errors
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-02 09:16:49 -04:00
Jason Dillaman
649b29d3d0 rbd-mirror: ensure exclusive lock cannot be released with in-flight IO
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-01 13:01:51 -04:00
Jason Dillaman
5f1f51238b librbd: guard journal replay from losing exclusive lock
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-01 12:26:06 -04:00
Jason Dillaman
62cce4738a rbd-mirror: permit release of exclusive lock if promoted
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-01 12:22:47 -04:00
Jason Dillaman
8ca85fc019 rbd-mirror: close local image before stopping remote journaler
Fixes: http://tracker.ceph.com/issues/18963
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-06-01 12:22:47 -04:00
Kefu Chai
30ce5e5546 install-deps.sh: workaround setuptools' dependency on six
see also https://github.com/pypa/setuptools/issues/1042

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-01 14:52:44 +08:00
Sage Weil
8554158574 Merge pull request #15325 from liewegas/wip-redirect
osd,librados: add manifest, redirect

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-05-29 14:48:33 -05:00
Sage Weil
10b32aa501 Merge pull request #15326 from xiexingguo/fix-kvtool-tip
tools/ceph_kvstore_tool: add "bluestore-kv" to usage

Reviewed-by: Sage Weil <sage@redhat.com>
2017-05-29 14:48:10 -05:00
xie xingguo
5cace1935b tools/ceph_kvstore_tool: add "bluestore-kv" to usage
We are soon going to use BlueStore as the default OS, and
hence "bluestore-kv" shall be the preferred option.

By applying this patch, the help message shall be slightly
nicer to newcomers to this tool now.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-05-27 11:06:56 +08:00
Sage Weil
a4247dd594 Merge branch 'wip-extensible_tier-redirect' of git://github.com/myoungwon/ceph into wip-redirect 2017-05-26 22:50:14 -04:00
Sage Weil
622c09ccd3 Merge pull request #15247 from liewegas/wip-upmap-save
osdmaptool: require --upmap-save before modifying input osdmap

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-05-26 09:20:05 -05:00
Sage Weil
e03edc587d osdmaptool: require --upmap-save before modifying input osdmap
IMO it is dangerous to modify the provided osdmap in this case unless the
user explicitly asks for it.  This was super annoying while I was testing
this code.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-23 17:56:14 -04:00
Igor Fedotov
4f178b2a56 rbd/bench: fixes write gaps when doing sequential writes with io-threads > 1
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
Signed-off-by: Mykola Golub mgolub@mirantis.com
2017-05-23 06:27:30 -07:00
xie xingguo
2a7bb175f6 tools/crushtool: replicated-rule API support
This patch adds two interfaces to operate replicated crush rules,
namely "--create-simple-rule" and "--remove-rule".

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-05-20 11:21:41 +08:00
Jason Dillaman
d93955997a blkin: rbd object map update traces
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-05-18 18:13:28 -04:00
runsisi
6d991c5c51 rbd: remove unnecessary -ENOENT check for rbd cli
Signed-off-by: runsisi <runsisi@zte.com.cn>
2017-05-17 23:14:21 +08:00
Mykola Golub
cd71ffce19 rbd-mirror: resolve admin socket path names collision
If global admin_socket parameter is set, for PoolReplayer admin
sockets generate and use unique paths in $run_dir. Provide the socket
paths in output of PoolReplayer's "rbd mirror status" admin socket
command.

A possible use case:

1) run "rbd mirror status $pool_replayer" command using global admin
   socket (known from configuration) and obtain socket paths for the
   PoolReplayer local and remote context sockets.
2) Use these paths to run commands provides by the contexts.

Fixes: http://tracker.ceph.com/issues/19907
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-05-12 20:28:16 +02:00
Kefu Chai
6fbcac46a3 Merge pull request #15012 from tchaikov/wip-byteswap
byteorder: use gcc intrinsics for byteswap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-05-12 19:40:02 +08:00
Sage Weil
d0a73ec955 Merge pull request #13610 from liewegas/wip-snapset
osd: eliminate snapdir objects and move clone snaps vector into SnapSet

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-05-11 21:18:11 -05:00
Kefu Chai
b7a194eb65 byteorder: use gcc intrinsics for byteswap
* use gcc intrinsics for byteswap
* use template to wrap them.
* add the modeline for emacs/vim
* update the caller of the mswab/swab accordingly

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-05-10 23:12:30 +08:00
Jason Dillaman
2a616ddbc3 Merge pull request #15030 from chardan/jfw-wip-halflife_atomic_t-fix-compare_exchange_weak
tools: change compare_exchange_weak to compare_exchange_strong

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-05-10 10:04:45 -04:00
Sage Weil
696f061670 Merge pull request #15003 from badone/wip-redundant-headers
common: Remove redundant includes

Reviewed-by: Sage Weil <sage@redhat.com>
2017-05-10 08:13:50 -05:00
Jesse Williamson
e573245cf4 tools: change compare_exchange_weak to compare_exchange_strong
On non x86 platforms without a dedicated compare-exchange instruction, std::compare_exchange_weak()
could fail.

Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2017-05-10 04:04:25 -07:00
Brad Hubbard
766528ee9c common: Remove redundant includes
Fixes: http://tracker.ceph.com/issues/19883 (Partially)

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2017-05-09 09:54:30 +10:00
Jason Dillaman
41dd93d740 Merge pull request #14976 from trociny/wip-19871
rbd-nbd: relax size check for newer kernel versions

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-05-08 19:41:40 -04:00
Jesse Williamson
40762b8985 rbd_mirror: migrate std::atomic<unsigned> to std::atomic<bool>
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2017-05-08 07:14:04 -07:00
Jesse Williamson
93621f5cb8 tools (rbd*): migrate atomic_t to std::atomic<>
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2017-05-08 07:13:57 -07:00
myoungwon oh
6f6677910d osd: a rados op to create a redirect
Signed-off-by: Myoungwon Oh omwmw@sk.com
2017-05-06 14:58:53 +09:00
Sage Weil
aed09380ca ceph-objectstore-tool: handle both new and legacy SnapSet format
If we encounter legacy snaps, add to snapmapper then; otherwise, use the
clone_snaps field in SnapSet to add all clones to snapmapper when we
process the head object.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:39:13 -04:00
Sage Weil
bdaf7740da osd/osd_types: rename object_info_t::snaps -> legacy_snaps
This will make it easier to identify users of this field that need to
conditionally use either the old legacy_snaps or the new
SnapSet::clone_snaps vector.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-05 13:38:12 -04:00
Mykola Golub
8e912b9a05 rbd-nbd: relax size check for newer kernel versions
Fixes: http://tracker.ceph.com/issues/19871
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-05-05 16:44:51 +02:00
Jason Dillaman
3f179bf862 rbd-mirror: prevent infinite loop when computing replay status
If the image had a non-primary predecessor epoch whose tag tid
duplicates an epoch within its own journal, an infinite loop
would result.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-05-04 18:00:48 -04:00
Mykola Golub
2a71c8f9da Merge pull request #14945 from dillaman/wip-19811
rbd-mirror: ensure missing images are re-synced when detected

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-05-04 20:47:49 +03:00
Jason Dillaman
74bd4f230a rbd-mirror: ensure missing images are re-synced when detected
Fixes: http://tracker.ceph.com/issues/19811
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-05-03 21:36:21 -04:00
Jason Dillaman
6d42133cf3 rbd: removed spurious error message from mirror pool commands
If the pool was empty, the rbd CLI would report the error
"rbd: failed to list images within pool".

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-05-03 10:49:09 -04:00
Mykola Golub
1698b8f13b Merge pull request #14875 from dillaman/wip-rbd-trash-parent
rbd: info command should indicate if parent is in trash

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-05-03 15:24:30 +03:00
Sage Weil
fcd64d75ab Merge pull request #14444 from liewegas/wip-past-intervals
osd: simplify past_intervals representation

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-05-02 10:51:37 -05:00
Sage Weil
732ad1364e kv: move 'bluestore-kv' hackery out of KeyValueDB into ceph-kvstore-tool
This avoids contaminating libkv with ObjectStore/BlueStore.  It also makes
the blustore kv startup slightly less weird (no need to skip the open
step).

Fixes: http://tracker.ceph.com/issues/19778
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-01 10:24:03 -04:00
Jason Dillaman
0f7b5d4ee6 rbd: info command should indicate if parent is in trash
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-05-01 10:10:16 -04:00
Samuel Just
aeee4bc8ce RadosDump: accommodate new past_intervals encoding
Signed-off-by: Samuel Just <sjust@redhat.com>
2017-04-28 11:30:38 -04:00
Samuel Just
065bb89ca6 osd/: refactor past_intervals logic into PastIntervals
Signed-off-by: Samuel Just <sjust@redhat.com>
2017-04-28 11:30:38 -04:00
Jason Dillaman
cbe469f3c9 rbd-mirror: provide image status updates without remotes
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 15:54:13 -04:00
Jason Dillaman
68a10a3b8b rbd-mirror: new state machine for preparing local image
This state machine will be invoked before the bootstrap state machine
and will be responsible for detecting if the local image is already
primary or if it needs to be deleted.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 15:54:13 -04:00
Jason Dillaman
c7aa9a818b librbd: remove duplicative journal helper functions
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 15:54:13 -04:00
Jason Dillaman
717af7caa9 rbd-mirror: forward initial pool image deletions to instance
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 15:54:13 -04:00
Jason Dillaman
2cfe02452b rbd-mirror: deletions should be scheduled using global ids
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 15:54:12 -04:00
Jason Dillaman
0a8788d364 rbd-mirror: pass pool watcher image ids by rvalue
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 15:54:12 -04:00
Jason Dillaman
b67c5c7aa4 Merge pull request #14754 from trociny/wip-19128
rbd: import needs to sanity check auto-generated image name

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-27 14:40:51 -04:00
Ilya Dryomov
9038074796 Merge pull request #14785 from idryomov/wip-krbd-exclusive-option
rbd: recognize exclusive option

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-04-26 16:25:31 +02:00
Sage Weil
3608a00970 Merge pull request #14780 from liewegas/wip-osdmap-mempool
osd: put osdmap in mempool

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-26 08:33:05 -05:00
Ilya Dryomov
c72d8b0409 rbd: recognize exclusive map option
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-04-25 20:15:41 +02:00
Sage Weil
0d31587d41 Merge pull request #14718 from liewegas/wip-bluestore-tool
ceph-kvstore-tool: allow 'bluestore-kv' as kvdb type; add escaping, compaction

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2017-04-25 09:43:56 -05:00
Sage Weil
b3b86254a1 osd/OSDMap: use auto where possible
Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-25 09:11:49 -04:00
zy751713126
79b6695689 rbd/bench: add notes of default values, it's more easy to use
Signed-off-by: Zheng Yin <zhengyin@chinac.com>
2017-04-25 18:08:43 +08:00
Mykola Golub
40de8f1183 rbd: import needs to sanity check auto-generated image name
Fixes: http://tracker.ceph.com/issues/19128
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-24 20:29:36 +02:00
Sage Weil
852f4da3b1 ceph-kvstore-tool: compact{,-prefix,-range}
Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-24 10:20:29 -04:00
Sage Weil
d7f74d86e9 ceph-kvstore-tool: (url) escape prefixes and keys
Escape output; unescape input.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-24 10:20:28 -04:00
Sage Weil
331ee3e859 ceph-kvstore-tool: tabs instead of : as delimiter
Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-24 10:04:00 -04:00
Sage Weil
b05b018f6c ceph-kvstore-tool: nicer failure message on open failure
I have been hating this assert for a long time.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-24 10:04:00 -04:00
Sage Weil
d764b56822 Merge pull request #10893 from yonghengdexin735/wip-zzz-1
rados: check for negative return value of rados_create_with_context() as its comment put

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-23 15:47:58 -05:00
Mykola Golub
44cd43d579 Merge pull request #14712 from dillaman/wip-rbd-mirror-watch
rbd-mirror: remove tracking of image names from pool watcher

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-04-23 19:32:43 +03:00
Sage Weil
b2a8207582 Merge pull request #14644 from liewegas/wip-rados-df-json
rados: out json 'df' values as numbers, not strings

Reviewed-by: David Zafman <dzafman@redhat.com>
2017-04-21 08:37:46 -05:00
Sage Weil
4c1d59c549 Merge pull request #14648 from gregsfortytwo/wip-17916-master
osd: pglog: with config, don't assert in the presence of stale diverg…

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-21 08:37:18 -05:00
Jason Dillaman
528790781b rbd-mirror: remove image name retrieval from pool watcher
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-20 22:38:19 -04:00
Jason Dillaman
5363ad5c74 rbd-mirror: eliminate use of image name during bootstrap
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-20 22:38:19 -04:00
Jason Dillaman
19dd5a82bb rbd-mirror: supply image id of new images to bootstrap state machine
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-20 22:38:18 -04:00
Jason Dillaman
eae3169539 librbd: specify image id for create and clone operations
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-20 22:38:18 -04:00
Jason Dillaman
ec1f3bbaa2 rbd-mirror: removed unused pool name from cluster watcher
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-20 22:38:18 -04:00
Jason Dillaman
9795f125d6 rbd-mirror: renamed Replayer to PoolReplayer
This is a stepping stone to support multiple peers within a single
pool.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-20 22:38:18 -04:00
Sage Weil
630e778951 rados: out json 'df' values as numbers, not strings
Fixes: http://tracker.ceph.com/issues/15546
Signed-off-by: Sage Weil <sage@redhat.com
2017-04-20 16:54:33 -04:00
Mykola Golub
99c6958288 rbd-mirror A/A: proxy InstanceReplayer APIs via InstanceWatcher RPC
Fixes: http://tracker.ceph.com/issues/18787
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-20 14:29:14 +02:00
Mykola Golub
9365ea07f6 rbd-mirror: possible lockdep false positive
(when InstanceWatcher::remove_instance is called)

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-20 14:29:14 +02:00
Mykola Golub
3cb90ebed4 rbd-mirror: remove recently added public peer image types
They were supposed to be used to pass a list of peer images.
It has turned out unnecessary.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-20 14:29:14 +02:00
Greg Farnum
3a4d5ec81b osd: pglog: with config, don't assert in the presence of stale divergent_priors
Fixes: http://tracker.ceph.com/issues/17916

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2017-04-19 17:57:52 -07:00
Sage Weil
ee1bb01a54 Merge pull request #14556 from liewegas/wip-pgupmap
osd: pg-remap -> pg-upmap

Reviewed-by: David Zafman <dzafman@redhat.com>
2017-04-19 17:07:01 -05:00
Sage Weil
ce188e8fdf osd: pg-remap -> pg-upmap
'remap' is to non-specific a name.  In particular, it
sounds like it is related to the 'remapped' PG state
but in reality it is not related.

'upmap' or 'pg-upmap' is more specific: it maps a pgid
to the 'up' set value (or item)

Signed-off-by: Sage Weil <sage@redhat.com>
2017-04-18 12:59:40 -04: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
David Zafman
3a66f1fbf6 ceph-objectstore-tool: cleanup comment
Signed-off-by: David Zafman <dzafman@redhat.com>
2017-04-17 07:58:30 -07:00
John Spray
b81e4b70a4 Merge pull request #14234 from jcsp/wip-19406-dirhash
tools/cephfs: set dir_layout when injecting inodes

Reviewed-by: Yan, Zheng <zyan@redhat.com>
2017-04-13 12:01:28 +01:00
John Spray
7d6d542885 tools/cephfs: set dir_layout when injecting inodes
When we left this as zero, the MDS would interpret it was HASH_LINUX
rather than the default HASH_RJENKINS.  Potentially that
could cause problems if there perhaps were already dirfrags in
the metadata pool that were set up using rjenkins.  Mainly
it just seems more appropriate to explicitly set this field
rather than hit the fallback behaviour.

Related: http://tracker.ceph.com/issues/19406
Signed-off-by: John Spray <john.spray@redhat.com>
2017-04-12 16:30:51 -04:00
Jason Dillaman
f682d26e6d rbd: import-diff should discard any zeroed extents
Sparse (zeroed) extents cannot be safely skipped. Instead, the
zeroed extent should be discarded from the image to ensure
the import remains consistent with the export.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-12 09:00:54 -04:00
Ricardo Dias
3138bdfba3
rbd: added image-id optional to Info command
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
cad8952bed
rbd: Added image-id optional to Snap commands
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
dba8eb7e3c
rbd: added image_id param to Utils::init_and_open_image
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
46de06ebb2
rbd: added group image remove by id to CLI
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
0a25ea0036
rbd: added CLI support for trash operations
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Sage Weil
a320d62cf6 Merge pull request #14235 from nvedant07/bug_fix_3
rados: more info added to pool deletion error

Reviewed-by: Sage Weil <sage@redhat.com>
2017-04-10 16:23:18 -05:00
Sage Weil
5adc257715 Merge pull request #14292 from joscollin/wip-radosacl-warning
tools: warning, ‘%.16x’ directive output truncated writing 16 bytes into a region of size 9.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-04-10 16:22:37 -05:00
Mykola Golub
712e7e9677 Merge pull request #14401 from dillaman/wip-rbd-import-fixes
rbd: correct issues with image importing

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-04-10 22:23:53 +03:00
John Spray
d529121b60 Merge pull request #10636 from fullerdj/wip-djf-15069
cephfs: Permit recovering metadata into a new RADOS pool

Reviewed-by: John Spray <john.spray@redhat.com>
2017-04-10 13:52:04 +01:00
Jason Dillaman
2188a7b23b rbd: import-diff was attempting to write empty chunks
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-07 21:06:29 -04:00
Jason Dillaman
24ba996513 rbd: corrected typo in rbd export v2 section header
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-07 21:06:16 -04:00
Mykola Golub
4931e31ec1 rbd-mirror A/A: separate ImageReplayer handling from Replayer
Fixes: http://tracker.ceph.com/issues/18785
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-07 15:58:52 +02:00
Mykola Golub
7558df5810 rbd-mirror A/A: InstanceReplayer class to acquire and release images
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-07 15:58:52 +02:00
Mykola Golub
8dca9f024a rbd-mirror: add set_remote_images method to ImageReplayer
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-04-07 14:15:07 +02:00
Sage Weil
092aa00654 Merge pull request #14210 from liewegas/wip-osd-dup
os: allow offline conversion of filestore -> bluestore (or anything else)

Reviewed-by: David Zafman <dzafman@redhat.com>
2017-04-06 09:51:18 -05:00
Mykola Golub
af80ee62d6 Merge pull request #14240 from dillaman/wip-rbd-mirror-peer-uuids
rbd-mirror: pool watcher should track mirror uuid

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-04-06 11:02:26 +03:00
Jason Dillaman
184df4abcf Merge pull request #13957 from wangzhengyong/import
rbd: error out if import image format failed

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-05 20:11:33 -04:00
Jason Dillaman
d271e8c279 Merge pull request #13836 from gaurav36/bug-14535-rbd-snap-pool-name-validatation
rbd: validate pool and snap name optionals

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-05 20:10:20 -04:00
Sage Weil
c618d22d25 Merge pull request #14258 from liewegas/wip-bluestore-tool
ceph-bluestore-tool: rename from bluefs-tool; improve usage
2017-04-05 08:55:36 -05:00
Jason Dillaman
6be45f804b Merge pull request #12883 from mslovy/wip-rbd-import
rbd: import real thin-provision image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-04 16:12:05 -04:00
Douglas Fuller
cb86740a5f cephfs: Permit recovering metadata into a new RADOS pool
Add a procedure that permits reconstructing metadata in a potentially
damaged cephfs metadata pool and writing the results into a
freshly-initialized pool that refers to the same data pool. Add option
flags to override checks that would ordinarily prevent this and add
options to the recovery tools to write output to a separate pool instead of
the one selected for recovery. See docs/cephfs/disaster-recovery.rst for
details.

Fixes: http://tracker.ceph.com/issues/15068
Fixes: http://tracker.ceph.com/issues/15069
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-04-04 12:29:01 -07:00
Jason Dillaman
b1f1df4f37 Merge pull request #14072 from trociny/wip-notify
librbd: Notifier::notify API improvement

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-04-04 14:06:05 -04:00
yaoning
a7dd9f1816 librbd: add sparse copy support
Fixes: fix issue #15648
http://tracker.ceph.com/issues/15648

Signed-off-by: yaoning <yaoning@unitedstack.com>
2017-04-04 03:18:52 +00:00
yaoning
f60b2d0cba rbd: import/import-diff real thin-provision image
currently, import/import-diff check whether object is zero based on the whole object
therefore, holes inside object will be filled with zero

Signed-off-by: yaoning <yaoning@unitedstack.com>
2017-04-04 03:18:52 +00:00
yaoning
8a83a2d611 rbd: add sparse size support in rbd
add --sparse_size in rbd command options
add calc_sparse_extent in rbd utils

Signed-off-by: yaoning <yaoning@unitedstack.com>
2017-04-04 03:18:52 +00:00