]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agoos/bluestore: _do_write: fix _do_zero_tail_extent to handle shared extents 8193/head
Sage Weil [Wed, 30 Mar 2016 15:17:12 +0000 (11:17 -0400)]
os/bluestore: _do_write: fix _do_zero_tail_extent to handle shared extents

Also add a test case to reproduce this case.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_zero: simply truncate up if past eof
Sage Weil [Wed, 30 Mar 2016 15:12:05 +0000 (11:12 -0400)]
os/bluestore: _do_zero: simply truncate up if past eof

Avoid the _do_zero_tail_extent here; we're zeroing so this is no different
than a truncate up

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: prevent rename src from getting trimmed from lru
Sage Weil [Wed, 30 Mar 2016 14:26:18 +0000 (10:26 -0400)]
os/bluestore: prevent rename src from getting trimmed from lru

We were putting it at the end of the LRU *and* not holding a reference.

Fix by letting oldo carry a ref to the Onode.  This avoids a subsequent
lookup and also prevents it from getting trimmed.

Note that we could also put it at the front of the LRU, but given that it
is the rename source, I'm not sure that's appropriate.  For example,
temp recovery objects get renamed into place and we don't want to keep
negative onodes for those around.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_zero: handle unzeroed tail blocks
Sage Weil [Mon, 28 Mar 2016 19:36:47 +0000 (15:36 -0400)]
os/bluestore: _do_zero: handle unzeroed tail blocks

- _do_write_zero when handling tail extent if it is
  shared.
- handle tail extent we are also zeroing later (not in
  the tail handler).  THis mirrors how _do_write is
  structured.
- handle eof to offset zeroing if our offset starts in
  the tail extent.  just like _do_write's wal path.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_write_zero: preserve onode size
Sage Weil [Mon, 28 Mar 2016 19:36:38 +0000 (15:36 -0400)]
os/bluestore: _do_write_zero: preserve onode size

Instead of handling this in each caller, make the helper
keep onode.size intact.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_write: handle gap from eof to offset in wal path
Sage Weil [Mon, 28 Mar 2016 19:36:23 +0000 (15:36 -0400)]
os/bluestore: _do_write: handle gap from eof to offset in wal path

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_allocate: fix whitespace
Sage Weil [Mon, 28 Mar 2016 19:36:14 +0000 (15:36 -0400)]
os/bluestore: _do_allocate: fix whitespace

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_truncate: no need to zero trailing block on truncate down
Sage Weil [Mon, 28 Mar 2016 19:36:05 +0000 (15:36 -0400)]
os/bluestore: _do_truncate: no need to zero trailing block on truncate down

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_write: only use append case for aligned eof
Sage Weil [Mon, 28 Mar 2016 19:35:43 +0000 (15:35 -0400)]
os/bluestore: _do_write: only use append case for aligned eof

The append case here only works if the EOF was aligned
and there is thus no partial-block zeroing we need to
do.  If the condition fails, we fall through to the
generic WAL path below.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_zero_tail_extent: do not assume tail block is zeroed
Sage Weil [Mon, 28 Mar 2016 19:35:31 +0000 (15:35 -0400)]
os/bluestore: _do_zero_tail_extent: do not assume tail block is zeroed

We will change this shortly.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: _do_zero_tail_extent helper
Sage Weil [Mon, 28 Mar 2016 17:23:56 +0000 (13:23 -0400)]
os/bluestore: _do_zero_tail_extent helper

We do this from both _do_truncate and _do_write.  No
functional change here.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: break _do_zero out of _zero
Sage Weil [Mon, 28 Mar 2016 17:10:09 +0000 (13:10 -0400)]
os/bluestore: break _do_zero out of _zero

Seems useless now, but it maintains symmetry and we'll
need it later.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: do not do gift beyond the max ratio
Sage Weil [Sat, 26 Mar 2016 14:30:34 +0000 (10:30 -0400)]
os/bluestore: do not do gift beyond the max ratio

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoglobal/signal_handler: fix warning
Sage Weil [Fri, 25 Mar 2016 15:04:08 +0000 (11:04 -0400)]
global/signal_handler: fix warning

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: release wal_cleaning extents in order
Sage Weil [Fri, 25 Mar 2016 15:03:28 +0000 (11:03 -0400)]
os/bluestore: release wal_cleaning extents in order

We need to order the freelist updates so that they match the
commit order of the actual transactions.  Otherwise we might, say,
set a key here, delete it in the _txc_update_fm, but commit in
the wrong order and end up with the key surviving.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: avoid temp released interval_map for wal cleanup
Sage Weil [Fri, 25 Mar 2016 14:58:50 +0000 (10:58 -0400)]
os/bluestore: avoid temp released interval_map for wal cleanup

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/FreelistManager: detect overlapping extents on init
Sage Weil [Fri, 25 Mar 2016 14:58:59 +0000 (10:58 -0400)]
os/bluestore/FreelistManager: detect overlapping extents on init

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: trim onode_map when adding new items
Sage Weil [Mon, 21 Mar 2016 21:00:52 +0000 (17:00 -0400)]
os/bluestore: trim onode_map when adding new items

This ensures we maintain the cache size even for read workloads.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: keep onode_map max_size
Sage Weil [Mon, 21 Mar 2016 21:00:22 +0000 (17:00 -0400)]
os/bluestore: keep onode_map max_size

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: wait for wal op that wrote cached tail before using
Sage Weil [Mon, 21 Mar 2016 19:45:57 +0000 (15:45 -0400)]
os/bluestore: wait for wal op that wrote cached tail before using

If the cached tail is written by a WAL op, we need to wait for it to
apply before we use the cached tail.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: note txc seq for tail cache
Sage Weil [Mon, 21 Mar 2016 19:44:54 +0000 (15:44 -0400)]
os/bluestore: note txc seq for tail cache

We'll need this soon...

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: assign per-Sequencer seq to each TransContext
Sage Weil [Mon, 21 Mar 2016 18:09:35 +0000 (14:09 -0400)]
os/bluestore: assign per-Sequencer seq to each TransContext

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoceph_test_objectstore: add AppendWalVsTailCache test
Sage Weil [Mon, 21 Mar 2016 18:04:50 +0000 (14:04 -0400)]
ceph_test_objectstore: add AppendWalVsTailCache test

This specifically exercises a WAL overwrite racing with a subsequent
append that uses the previous writes cached tail.  We need to make sure
the use of the cached_tail waits for the previous WAL write or else our
update of tail block will be overwritten with the prior (WAL) value.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: fix fsck vs enodes
Sage Weil [Mon, 21 Mar 2016 17:55:47 +0000 (13:55 -0400)]
os/bluestore: fix fsck vs enodes

- fix used_blocks accounting for shared extents
- make sure enodes only exist when objects follow

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: bluestore_inject_wal_apply_delay
Sage Weil [Mon, 21 Mar 2016 17:51:43 +0000 (13:51 -0400)]
os/bluestore: bluestore_inject_wal_apply_delay

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: reorder onode_map vs enode_set ctor/dtor
Sage Weil [Mon, 21 Mar 2016 13:28:27 +0000 (09:28 -0400)]
os/bluestore: reorder onode_map vs enode_set ctor/dtor

The onode_map should get declared after the enode_set so that
the enode_set is empty when it is destroyed.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: only cache tail in _pad_tail if we have the whole block
Sage Weil [Thu, 17 Mar 2016 21:42:08 +0000 (17:42 -0400)]
os/bluestore: only cache tail in _pad_tail if we have the whole block

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: only use tail if tail_offset matches
Sage Weil [Thu, 17 Mar 2016 21:41:56 +0000 (17:41 -0400)]
os/bluestore: only use tail if tail_offset matches

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore: fix off-by-one on caching tail block
Sage Weil [Thu, 17 Mar 2016 21:33:53 +0000 (17:33 -0400)]
os/bluestore: fix off-by-one on caching tail block

We can cache the tail as long as we overwrite all prior content;
we don't have to extent the size.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoos/bluestore/KernelDevice: print buffered flag in debug line
Sage Weil [Thu, 17 Mar 2016 20:37:53 +0000 (16:37 -0400)]
os/bluestore/KernelDevice: print buffered flag in debug line

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #8368 from tchaikov/wip-cmake-fix-rbd
Jason Dillaman [Wed, 30 Mar 2016 14:49:46 +0000 (10:49 -0400)]
Merge pull request #8368 from tchaikov/wip-cmake-fix-rbd

cmake: add StandardPolicy.cc to librbd

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8337 from jmunhoz/fix-15292
Sage Weil [Wed, 30 Mar 2016 13:56:37 +0000 (09:56 -0400)]
Merge pull request #8337 from jmunhoz/fix-15292

mon: remove unused variable

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
9 years agoMerge pull request #8352 from runsisi/wip-fix-missing-iter
Jason Dillaman [Wed, 30 Mar 2016 12:49:55 +0000 (08:49 -0400)]
Merge pull request #8352 from runsisi/wip-fix-missing-iter

rbd-mirror: fix missing increment for iterators

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8374 from trociny/fix-cls-rbd-read_peers
Jason Dillaman [Wed, 30 Mar 2016 12:27:22 +0000 (08:27 -0400)]
Merge pull request #8374 from trociny/fix-cls-rbd-read_peers

cls_rbd: read_peers: update last_read on next cls_cxx_map_get_vals

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #7062 from wonzhq/scrub-prio-pool
Sage Weil [Wed, 30 Mar 2016 12:24:43 +0000 (08:24 -0400)]
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>
9 years agoMerge pull request #8210 from liewegas/wip-12814
Sage Weil [Wed, 30 Mar 2016 12:23:05 +0000 (08:23 -0400)]
Merge pull request #8210 from liewegas/wip-12814

osd: add 'proxy' cache mode

Reviewed-by: Samuel Just <sjust@redhat.com>
9 years agoMerge pull request #8315 from mslovy/wip-clean-pg
Sage Weil [Wed, 30 Mar 2016 12:22:46 +0000 (08:22 -0400)]
Merge pull request #8315 from mslovy/wip-clean-pg

osd: duplicated clear for peer_missing

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #8330 from xiexingguo/xxg-wip-race
Sage Weil [Wed, 30 Mar 2016 12:22:30 +0000 (08:22 -0400)]
Merge pull request #8330 from xiexingguo/xxg-wip-race

common: fix race during optracker switches between enabled/disabled mode

Reviewed-by: David Zafman <dzafman@redhat.com>
9 years agoMerge pull request #8335 from liewegas/wip-13992
Sage Weil [Wed, 30 Mar 2016 12:21:47 +0000 (08:21 -0400)]
Merge pull request #8335 from liewegas/wip-13992

mon/MonClient: fix shutdown race

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agocls::rbd: read_peers: update last_read on next cls_cxx_map_get_vals 8374/head
Mykola Golub [Wed, 30 Mar 2016 11:39:37 +0000 (14:39 +0300)]
cls::rbd: read_peers: update last_read on next cls_cxx_map_get_vals

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
9 years agoMerge pull request #7857 from tchaikov/wip-14844
Kefu Chai [Wed, 30 Mar 2016 06:47:34 +0000 (14:47 +0800)]
Merge pull request #7857 from tchaikov/wip-14844

ceph.spec.in: enable lttng and babeltrace explicitly

thanks to ktdreyer, we have lttng and babel in EPEL-7 now.

Reviewed-by: Nathan Cutler <ncutler@suse.com>
9 years agocmake: add StandardPolicy.cc to librbd 8368/head
Kefu Chai [Wed, 30 Mar 2016 06:16:04 +0000 (14:16 +0800)]
cmake: add StandardPolicy.cc to librbd

fixes the librbd build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
9 years agorbd-mirror: fix missing increment of iterators 8352/head
runsisi [Tue, 29 Mar 2016 12:26:21 +0000 (20:26 +0800)]
rbd-mirror: fix missing increment of iterators

Signed-off-by: runsisi <runsisi@hust.edu.cn>
9 years agoMerge pull request #8287 from dillaman/wip-15232
Josh Durgin [Wed, 30 Mar 2016 01:25:05 +0000 (18:25 -0700)]
Merge pull request #8287 from dillaman/wip-15232

rbd-mirror: initial failover / failback support

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agotest/pybind/test_rados: force setting readonly cache mode 8210/head
Sage Weil [Wed, 30 Mar 2016 01:08:31 +0000 (21:08 -0400)]
test/pybind/test_rados: force setting readonly cache mode

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #7712 from vitek/listbucket_encoding_type_fix
Sage Weil [Wed, 30 Mar 2016 01:07:41 +0000 (21:07 -0400)]
Merge pull request #7712 from vitek/listbucket_encoding_type_fix

rgw: S3: set EncodingType in ListBucketResult

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
9 years agoMerge pull request #8363 from cbodley/wip-cmake-vstart
Orit Wasserman [Tue, 29 Mar 2016 21:24:28 +0000 (23:24 +0200)]
Merge pull request #8363 from cbodley/wip-cmake-vstart

vstart: fix up cmake paths when VSTART_DEST is given
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
9 years agoMerge pull request #8362 from jdurgin/wip-ceph-python-path
Sage Weil [Tue, 29 Mar 2016 19:46:52 +0000 (15:46 -0400)]
Merge pull request #8362 from jdurgin/wip-ceph-python-path

ceph.in: fix python libpath for automake as well

9 years agoMerge pull request #8364 from liewegas/wip-fix-update-op
Samuel Just [Tue, 29 Mar 2016 19:46:14 +0000 (12:46 -0700)]
Merge pull request #8364 from liewegas/wip-fix-update-op

os/ObjectStore: fix _update_op for split dest_cid

Reviewed-by: Samuel Just <sjust@redhat.com>
9 years agovstart: fix up cmake paths when VSTART_DEST is given 8363/head
Casey Bodley [Tue, 29 Mar 2016 19:11:26 +0000 (15:11 -0400)]
vstart: fix up cmake paths when VSTART_DEST is given

mstart.sh uses VSTART_DEST to tell vstart.sh where to create the
cluster. in the cmake case, it needs to get a relative path from there
to the built binaries and libraries - update these paths to use the new
'lib' and 'bin' directories

Signed-off-by: Casey Bodley <cbodley@redhat.com>
9 years agoos/ObjectStore: fix _update_op for split dest_cid 8364/head
Sage Weil [Tue, 29 Mar 2016 19:24:34 +0000 (15:24 -0400)]
os/ObjectStore: fix _update_op for split dest_cid

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoqa/workunits/rbd: add basic failover/fallback test case 8287/head
Jason Dillaman [Mon, 28 Mar 2016 19:57:58 +0000 (15:57 -0400)]
qa/workunits/rbd: add basic failover/fallback test case

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: use 32bit image creation bid to avoid overflow
Jason Dillaman [Mon, 28 Mar 2016 19:39:00 +0000 (15:39 -0400)]
rbd-mirror: use 32bit image creation bid to avoid overflow

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: initial support for primary/non-primary handling
Jason Dillaman [Mon, 28 Mar 2016 17:05:48 +0000 (13:05 -0400)]
rbd-mirror: initial support for primary/non-primary handling

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: accessor for journal tag data
Jason Dillaman [Mon, 28 Mar 2016 15:53:26 +0000 (11:53 -0400)]
librbd: accessor for journal tag data

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: link primary mirror uuid to non-primary journal tag
Jason Dillaman [Mon, 28 Mar 2016 15:23:17 +0000 (11:23 -0400)]
librbd: link primary mirror uuid to non-primary journal tag

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: update mirror peer sync state after completion
Jason Dillaman [Mon, 28 Mar 2016 14:48:02 +0000 (10:48 -0400)]
rbd-mirror: update mirror peer sync state after completion

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: track mirror peer replay state
Jason Dillaman [Mon, 28 Mar 2016 14:40:46 +0000 (10:40 -0400)]
librbd: track mirror peer replay state

This new state will protect against the case of an rbd-mirror crash
between registering with the remote and starting the image sync.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: allocate local journal tags from mirror remote peer tags
Jason Dillaman [Mon, 28 Mar 2016 03:00:33 +0000 (23:00 -0400)]
rbd-mirror: allocate local journal tags from mirror remote peer tags

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agojournal: helper method for retrieving tag struct
Jason Dillaman [Mon, 28 Mar 2016 00:30:44 +0000 (20:30 -0400)]
journal: helper method for retrieving tag struct

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd: use consistent "non-primary" verbiage for image mirroring
Jason Dillaman [Fri, 25 Mar 2016 15:15:18 +0000 (11:15 -0400)]
rbd: use consistent "non-primary" verbiage for image mirroring

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: image demotion should record new demote journal event
Jason Dillaman [Fri, 25 Mar 2016 15:03:35 +0000 (11:03 -0400)]
librbd: image demotion should record new demote journal event

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: blacklist journal error while attempting to acquire lock
Jason Dillaman [Fri, 25 Mar 2016 15:01:01 +0000 (11:01 -0400)]
librbd: blacklist journal error while attempting to acquire lock

The journal policy will return -EPERM if attempting to acquire the
exclusive lock when the image is non-primary.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: new demote journal event
Jason Dillaman [Fri, 25 Mar 2016 13:46:50 +0000 (09:46 -0400)]
librbd: new demote journal event

This event will be used as a placeholder to ensure that the demotion journal
tag is properly processed by rbd-mirror.  Without an event associated with
the demotion journal tag, the demotion event will be missed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: framework for replay allocating tags in local journal
Jason Dillaman [Thu, 24 Mar 2016 19:56:46 +0000 (15:56 -0400)]
rbd-mirror: framework for replay allocating tags in local journal

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: journal reset should re-register the local client
Jason Dillaman [Thu, 24 Mar 2016 16:33:50 +0000 (12:33 -0400)]
librbd: journal reset should re-register the local client

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: cleanup debug log messages
Jason Dillaman [Thu, 24 Mar 2016 16:07:49 +0000 (12:07 -0400)]
rbd-mirror: cleanup debug log messages

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: cross-reference local image via global image id
Jason Dillaman [Thu, 24 Mar 2016 14:56:35 +0000 (10:56 -0400)]
rbd-mirror: cross-reference local image via global image id

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agocls_rbd: mirroring directory reverse lookup from global id to image id
Jason Dillaman [Thu, 24 Mar 2016 14:43:44 +0000 (10:43 -0400)]
cls_rbd: mirroring directory reverse lookup from global id to image id

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: bootstrap requires the global image id
Jason Dillaman [Thu, 24 Mar 2016 13:40:58 +0000 (09:40 -0400)]
rbd-mirror: bootstrap requires the global image id

The global image id can be used to cross-reference images that
have been replicated amongst peers.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: fix state output stream formatter
Jason Dillaman [Thu, 24 Mar 2016 03:07:12 +0000 (23:07 -0400)]
rbd-mirror: fix state output stream formatter

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: support creating images with non-primary journals
Jason Dillaman [Thu, 24 Mar 2016 02:28:55 +0000 (22:28 -0400)]
librbd: support creating images with non-primary journals

When rbd-mirror initially creates a replicated image in the
local pool, the journal should be flagged as non-primary to
(1) prevent local ops againsts the image and (2) provide a
clean chain of replicated tags.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: don't acquire lock for primary local images
Jason Dillaman [Wed, 23 Mar 2016 22:00:52 +0000 (18:00 -0400)]
rbd-mirror: don't acquire lock for primary local images

Abort the image replay for any local images that are marked as primary.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: tweaks to support creating mock test cases
Jason Dillaman [Wed, 23 Mar 2016 21:28:22 +0000 (17:28 -0400)]
rbd-mirror: tweaks to support creating mock test cases

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: bootstrap now has initial support for existing images
Jason Dillaman [Tue, 22 Mar 2016 22:52:45 +0000 (18:52 -0400)]
rbd-mirror: bootstrap now has initial support for existing images

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: properly initialize image copy start/end objects
Jason Dillaman [Tue, 22 Mar 2016 22:51:34 +0000 (18:51 -0400)]
rbd-mirror: properly initialize image copy start/end objects

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: only delete ImageCtx after open failure
Jason Dillaman [Tue, 22 Mar 2016 22:50:43 +0000 (18:50 -0400)]
rbd-mirror: only delete ImageCtx after open failure

The image is already closed -- it just needs to be destroyed
in a thread context outside of librbd.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agocls_journal: disallow client registration against missing journal
Jason Dillaman [Tue, 22 Mar 2016 20:50:18 +0000 (16:50 -0400)]
cls_journal: disallow client registration against missing journal

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agojournal: added helper to query single client record from disk
Jason Dillaman [Tue, 22 Mar 2016 20:28:59 +0000 (16:28 -0400)]
journal: added helper to query single client record from disk

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: convert ImageReplayer into templated class
Jason Dillaman [Tue, 22 Mar 2016 15:28:53 +0000 (11:28 -0400)]
rbd-mirror: convert ImageReplayer into templated class

This will facilitate create mock test cases.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: helper methods to allocate tags associated to remote journals
Jason Dillaman [Tue, 22 Mar 2016 02:01:05 +0000 (22:01 -0400)]
librbd: helper methods to allocate tags associated to remote journals

Allocating tags for the local journal will always be based off the local
commit position.  For remote journals, the local commit position doesn't
reflect actual events replayed by rbd-mirror, so it needs to provide the
remote journal commit position.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: initial integration with librbd lock/journal policies
Jason Dillaman [Wed, 23 Mar 2016 21:46:43 +0000 (17:46 -0400)]
rbd-mirror: initial integration with librbd lock/journal policies

For the first stage, acquiring the exclusive-lock will no longer
automatically result in the allocation of a journal tag.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: basic policy for journal handling
Jason Dillaman [Tue, 22 Mar 2016 01:13:38 +0000 (21:13 -0400)]
librbd: basic policy for journal handling

This will allow rbd-mirror to override the allocation of a new
tag and to restart rbd-mirror's image replayer when a watch error
forces the loss of the exclusive lock.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: optional 'force' parameter for request lock payload
Jason Dillaman [Tue, 22 Mar 2016 00:12:55 +0000 (20:12 -0400)]
librbd: optional 'force' parameter for request lock payload

This will be used when force promoting an image to primary -- when
rbd-mirror receives the forced request, it will immediately abort
playback.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: basic policy for controlling the release of the exclusive lock
Jason Dillaman [Mon, 21 Mar 2016 21:50:10 +0000 (17:50 -0400)]
librbd: basic policy for controlling the release of the exclusive lock

The rbd-mirror daemon will need to interlock with the request for the lock
from another client with the successful sync of remote journal events.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: journal type traits should be standalone
Jason Dillaman [Mon, 21 Mar 2016 20:52:07 +0000 (16:52 -0400)]
librbd: journal type traits should be standalone

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8332 from rjfd/wip-15267
Jason Dillaman [Tue, 29 Mar 2016 19:12:09 +0000 (15:12 -0400)]
Merge pull request #8332 from rjfd/wip-15267

rbd-mirror: prevent enabling/disabling an image's mirroring when not in image mode

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoceph.in: fix python libpath for automake as well 8362/head
Josh Durgin [Tue, 29 Mar 2016 18:18:26 +0000 (11:18 -0700)]
ceph.in: fix python libpath for automake as well

Follow-on to a041e5c9413fd816bc2858509319fa469fa233e5
due to confusion from .pyc files hanging around.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge remote-tracking branch 'gh/jewel'
Sage Weil [Tue, 29 Mar 2016 19:04:16 +0000 (15:04 -0400)]
Merge remote-tracking branch 'gh/jewel'

9 years agoMerge pull request #8320 from dachary/wip-virtualenv-jewel
Sage Weil [Tue, 29 Mar 2016 19:08:54 +0000 (15:08 -0400)]
Merge pull request #8320 from dachary/wip-virtualenv-jewel

Makefile-env.am: set a default for CEPH_BUILD_VIRTUALENV (part 2)

Reviewed-by: Dan Mick <dmick@redhat.com>
9 years agoMerge pull request #8360 from jdurgin/wip-ceph-python-path
Sage Weil [Tue, 29 Mar 2016 19:06:56 +0000 (15:06 -0400)]
Merge pull request #8360 from jdurgin/wip-ceph-python-path

ceph.in: correct dev python path for automake builds

Tested-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #8361 from liewegas/wip-test-port
Josh Durgin [Tue, 29 Mar 2016 18:34:54 +0000 (11:34 -0700)]
Merge pull request #8361 from liewegas/wip-test-port

test/test_pool_create.sh: fix port

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agoMerge remote-tracking branch 'origin/jewel'
Josh Durgin [Tue, 29 Mar 2016 18:32:39 +0000 (11:32 -0700)]
Merge remote-tracking branch 'origin/jewel'

9 years agoMerge pull request #8356 from ceph/wip-cython-build-dir
Josh Durgin [Tue, 29 Mar 2016 18:27:10 +0000 (11:27 -0700)]
Merge pull request #8356 from ceph/wip-cython-build-dir

pybind/Makefile.am: Prevent race creating CYTHON_BUILD_DIR

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
9 years agotest/test_pool_create.sh: fix port 8361/head
Sage Weil [Tue, 29 Mar 2016 18:23:28 +0000 (14:23 -0400)]
test/test_pool_create.sh: fix port

17108 is used by test/mon/test_pool_quota.sh

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #8359 from athanatos/wip-15205
Sage Weil [Tue, 29 Mar 2016 18:22:51 +0000 (14:22 -0400)]
Merge pull request #8359 from athanatos/wip-15205

os/ObjectStore: try_move_rename in transaction append and add coverage to store_test

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoceph.in: correct dev python path for automake builds 8360/head
Josh Durgin [Tue, 29 Mar 2016 18:18:26 +0000 (11:18 -0700)]
ceph.in: correct dev python path for automake builds

Accidentally broken by ad2e6f442df0fe302c09fc751fc9e12237789511

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
9 years agostore_test: apply an appended transaction half the time 8359/head
Samuel Just [Fri, 18 Mar 2016 19:21:32 +0000 (12:21 -0700)]
store_test: apply an appended transaction half the time

Signed-off-by: Samuel Just <sjust@redhat.com>
9 years agoTransaction: handle OP_TRY_RENAME in dump
Samuel Just [Fri, 18 Mar 2016 19:04:51 +0000 (12:04 -0700)]
Transaction: handle OP_TRY_RENAME in dump

Signed-off-by: Samuel Just <sjust@redhat.com>
9 years agostore_test: add a TryMoveRename test
Samuel Just [Fri, 18 Mar 2016 18:22:00 +0000 (11:22 -0700)]
store_test: add a TryMoveRename test

Signed-off-by: Samuel Just <sjust@redhat.com>