]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agorbd-mirror: cluster-level asok commands need to support multiple pools 9409/head
Jason Dillaman [Fri, 27 May 2016 15:40:58 +0000 (11:40 -0400)]
rbd-mirror: cluster-level asok commands need to support multiple pools

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f4339ee8cb64d5f1a164e017fea942600ffb0ea9)

9 years agorbd-mirror: replayer should only handle a single pool
Jason Dillaman [Fri, 27 May 2016 03:26:20 +0000 (23:26 -0400)]
rbd-mirror: replayer should only handle a single pool

The pool watcher now only needs to scan a single pool for
its associated replayer since a peer is inherently tied to
a single pool.

Fixes: http://tracker.ceph.com/issues/16045
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit c5a8b780edeb9b62a601f0718459837f3d66e63d)

9 years agorbd-mirror: group peers by local pools
Jason Dillaman [Thu, 26 May 2016 20:03:59 +0000 (16:03 -0400)]
rbd-mirror: group peers by local pools

The peer structure is automatically unique per pool due to its
UUID, so grouping local pools by a single peer doesn't work.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 020f0282a0771c0d321732a62f53cee10a193715)

 Conflicts:
src/tools/rbd_mirror/ClusterWatcher.cc: trivial resolution

9 years agorbd-mirror: stop stale replayers before starting new replayers
Jason Dillaman [Wed, 25 May 2016 18:00:34 +0000 (14:00 -0400)]
rbd-mirror: stop stale replayers before starting new replayers

If the connection details are tweaked for a remote peer, stop
the existing replayer before potentially starting a new replayer
against the same remote.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 6a2adca2a47b384f64c20996b9fc77010a70bc22)

9 years agorbd-mirror: normalize debug log message prefix
Jason Dillaman [Thu, 26 May 2016 17:29:49 +0000 (13:29 -0400)]
rbd-mirror: normalize debug log message prefix

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit d52843190d84d533ab50a1702cf4a829b71ad68b)

9 years agoqa/workunits/rbd: create secondary replicated pool
Jason Dillaman [Thu, 26 May 2016 17:26:57 +0000 (13:26 -0400)]
qa/workunits/rbd: create secondary replicated pool

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 839544ee6446b959f01290667592e44fc5ee6991)

9 years agoMerge pull request #9373 from dillaman/wip-16055 9325/head
Jason Dillaman [Tue, 31 May 2016 15:51:05 +0000 (11:51 -0400)]
Merge pull request #9373 from dillaman/wip-16055

jewel: journal: support asynchronous shutdown

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9372 from dillaman/wip-15995
Jason Dillaman [Tue, 31 May 2016 15:49:39 +0000 (11:49 -0400)]
Merge pull request #9372 from dillaman/wip-15995

jewel: rbd-mirror: Delete local image mirror when remote image mirroring is disabled

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: image replay now uses asynchronous journal shutdown 9373/head
Jason Dillaman [Wed, 25 May 2016 06:31:11 +0000 (02:31 -0400)]
rbd-mirror: image replay now uses asynchronous journal shutdown

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit a1b0a1b1b9a237ae363a52c7b4038b19e87052a5)

9 years agolibrbd: integrate with async journaler shutdown API
Jason Dillaman [Wed, 25 May 2016 04:21:14 +0000 (00:21 -0400)]
librbd: integrate with async journaler shutdown API

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ad297850b1be8ed38f77b86913c6821748f3368b)

9 years agojournal: extend asynchronous shutdown to facade
Jason Dillaman [Tue, 24 May 2016 20:12:16 +0000 (16:12 -0400)]
journal: extend asynchronous shutdown to facade

Fixes: http://tracker.ceph.com/issues/14530
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f40c595255a6828e27abfe63b4209ebae03e237b)

9 years agojournal: trimmer now has asynchronous shutdown
Jason Dillaman [Tue, 24 May 2016 19:53:12 +0000 (15:53 -0400)]
journal: trimmer now has asynchronous shutdown

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 59ca9916ba2e2b144eff5ee471a314b9c4391936)

9 years agojournal: metadata init and shutdown now asynchronous
Jason Dillaman [Tue, 24 May 2016 19:36:17 +0000 (15:36 -0400)]
journal: metadata init and shutdown now asynchronous

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0543e1b29eb253bf1d9e9af7af6f22fa394dd854)

9 years agojournal: player shutdown is now handled asynchronously
Jason Dillaman [Tue, 24 May 2016 16:06:26 +0000 (12:06 -0400)]
journal: player shutdown is now handled asynchronously

Fixes: http://tracker.ceph.com/issues/15949
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 79b41346678b3acdeb547fe07e44d8d0543d37a7)

9 years agotest: use randomized write sizes for rbd-mirror stress test
Jason Dillaman [Tue, 24 May 2016 02:26:05 +0000 (22:26 -0400)]
test: use randomized write sizes for rbd-mirror stress test

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit b9edff2174ff04bb8b6353dd2d2218c64757aae1)

9 years agojournal: eliminate watch delay for object refetches
Jason Dillaman [Tue, 24 May 2016 02:21:33 +0000 (22:21 -0400)]
journal: eliminate watch delay for object refetches

The randomized write sizes of the modified rbd-mirror stress
test results in a lot of journal object with few entries.
Immediately fetch objects when performing a refetch check prior
to closing an empty object.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit d7b511b854c8ab633dcdb1c935014218b83f4e09)

9 years agojournal: keep active tag to assist with pruning watched objects
Jason Dillaman [Mon, 23 May 2016 18:57:03 +0000 (14:57 -0400)]
journal: keep active tag to assist with pruning watched objects

It's possible that there might be additional entries to prune in
objects that haven't been prefetched yet. Keep the active tag
to allow these entries to be pruned after they have been loaded.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0fb730e6be632e25d76695e1f37eba542162d620)

9 years agojournal: update commit entry object number upon overflow
Jason Dillaman [Mon, 23 May 2016 16:15:49 +0000 (12:15 -0400)]
journal: update commit entry object number upon overflow

Otherwise the recorded object positions might point to an older
object that doesn't contain the actual entry.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5fbf5f82de8214c5c676d38feae7682a006fcab1)

9 years agojournal: cleanup watch refetch flag handling
Jason Dillaman [Mon, 23 May 2016 15:01:05 +0000 (11:01 -0400)]
journal: cleanup watch refetch flag handling

Clear the refetch required flag while scheduling the watch
and remove the stale object after the watch completes if still
empty. Previously, it was possible for the flag to become
out-of-sync with whether or not it was actually refreshed
and pruned.

Fixes: http://tracker.ceph.com/issues/15993
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ff2cc27ae592646b495bf1b614d35bd50c091a3d)

9 years agorbd-mirror: test: added image-deleter test case when mirroring is disabled 9372/head
Ricardo Dias [Fri, 13 May 2016 15:47:25 +0000 (16:47 +0100)]
rbd-mirror: test: added image-deleter test case when mirroring is disabled

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit d85e312ead1da7c35d5ee4fe4be3d6e69a68b572)

9 years agorbd-mirror: Unregister clients from non-primary images journal
Ricardo Dias [Fri, 13 May 2016 15:44:53 +0000 (16:44 +0100)]
rbd-mirror: Unregister clients from non-primary images journal

A non-primary image may have registered clients on its journal
(for instance a primary image that was later demoted). We must
unregister the clients when disabling image mirroring with the
force option.

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit 9cb0b180bc8a12ea2ebb0d7e32279b696ddd127e)

9 years agorbd-mirror: test: Added unit test for testing image-deleter thread
Ricardo Dias [Tue, 19 Apr 2016 11:35:49 +0000 (12:35 +0100)]
rbd-mirror: test: Added unit test for testing image-deleter thread

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit ac9514941b0accb6c738ce4aa0953c36cdcf69a6)

9 years agorbd-mirror: test: Fixed test_PoolWatcher to support the new changes in PoolWatcher...
Ricardo Dias [Mon, 18 Apr 2016 11:22:19 +0000 (12:22 +0100)]
rbd-mirror: test: Fixed test_PoolWatcher to support the new changes in PoolWatcher class

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit e3677f115e1f369a49227fba51a1d34505d487ac)

9 years agorbd-mirror: Replayer: bootstrap existing mirrored images
Ricardo Dias [Tue, 5 Apr 2016 08:47:32 +0000 (09:47 +0100)]
rbd-mirror: Replayer: bootstrap existing mirrored images

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit 3c2615aa6da837bfef2365f701f56a34c49b536f)

9 years agorbd-mirror: replayer: Added image-deleter thread to replayer
Ricardo Dias [Thu, 28 Apr 2016 10:49:43 +0000 (11:49 +0100)]
rbd-mirror: replayer: Added image-deleter thread to replayer

Fixes: http://tracker.ceph.com/issues/14421
Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit a6d698829d925894e4afcdec0ee42b1fc1205db0)

9 years agorbd-mirror: Added image-deleter thread to rbd-mirror
Ricardo Dias [Thu, 28 Apr 2016 10:48:05 +0000 (11:48 +0100)]
rbd-mirror: Added image-deleter thread to rbd-mirror

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit 011984d40bce448fe0febfc6a9fcf57d2c7b4768)

9 years agorbd-mirror: Added implementation of image-deleter thread
Ricardo Dias [Wed, 13 Apr 2016 14:17:40 +0000 (15:17 +0100)]
rbd-mirror: Added implementation of image-deleter thread

image-deleter thread will handle the deletion of local images that have
been disabled for mirroring by the primary site.

Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit 6cc6e663ed2ec336a9475d93ab2cb605644e6ee0)

9 years agorbd-mirror: librbd::mirror_peer_list never returns -ENOENT
runsisi [Wed, 11 May 2016 12:42:37 +0000 (20:42 +0800)]
rbd-mirror: librbd::mirror_peer_list never returns -ENOENT

no need to check -ENOENT specially

Signed-off-by: runsisi <runsisi@zte.com.cn>
(cherry picked from commit 81ff42253369a9f57118bd26b29115c86a1748c5)

9 years agorbd-mirror: fix typo
runsisi [Wed, 11 May 2016 12:52:38 +0000 (20:52 +0800)]
rbd-mirror: fix typo

Signed-off-by: runsisi <runsisi@zte.com.cn>
(cherry picked from commit 25bfd4c786d0701fe6ae06e3d120098bd82f8aa0)

9 years agorbd-mirror: calculate behind_master only if mirror tag is not newer than master
Mykola Golub [Wed, 18 May 2016 07:07:55 +0000 (10:07 +0300)]
rbd-mirror: calculate behind_master only if mirror tag is not newer than master

Fixes: http://tracker.ceph.com/issues/15916
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit cbd8d526f94523c9de3c575d426063e63d7e1802)

9 years agoMerge pull request #9377 from dillaman/wip-16063
Jason Dillaman [Tue, 31 May 2016 15:48:06 +0000 (11:48 -0400)]
Merge pull request #9377 from dillaman/wip-16063

jewel: test: failure in journal.sh workunit test

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agotest: workaround failure in journal.sh 9377/head
Mykola Golub [Wed, 25 May 2016 18:54:16 +0000 (21:54 +0300)]
test: workaround failure in journal.sh

With the changes to ensure that the commit position of a new
client is initialized to the minimum position of other clients,
the 'journal inspect/export' commands return zero records because
the master client has committed all of its entries.

Workaround this by restoring the initial commit position after
writing to the image.

Fixes: http://tracker.ceph.com/issues/16011
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit e9ed8ac33b1884c6ed5cdfb23023094ec790b116)

9 years agocls::journal: treat empty commit position as minimal
Mykola Golub [Wed, 25 May 2016 11:51:43 +0000 (14:51 +0300)]
cls::journal: treat empty commit position as minimal

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 16846e8085b0c594f065322a768e6dfcbd5d2444)

9 years agoMerge pull request #9376 from dillaman/wip-15994
Jason Dillaman [Tue, 31 May 2016 15:46:30 +0000 (11:46 -0400)]
Merge pull request #9376 from dillaman/wip-15994

jewel: cls_journal: initialize empty commit position upon client register

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agojewel: librbd: write-after-write might result in an inconsistent replicated image
Jason Dillaman [Tue, 31 May 2016 15:45:43 +0000 (11:45 -0400)]
jewel: librbd: write-after-write might result in an inconsistent replicated image

jewel: librbd: write-after-write might result in an inconsistent replicated image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9318 from Abhishekvrshny/wip-15957-jewel
Jason Dillaman [Tue, 31 May 2016 15:30:47 +0000 (11:30 -0400)]
Merge pull request #9318 from Abhishekvrshny/wip-15957-jewel

jewel: Metadata config overrides are applied synchronously

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9317 from Abhishekvrshny/wip-15956-jewel
Jason Dillaman [Tue, 31 May 2016 15:29:45 +0000 (11:29 -0400)]
Merge pull request #9317 from Abhishekvrshny/wip-15956-jewel

jewel: rbd-mirror should disable the rbd cache for local images

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9403 from dachary/wip-16088-jewel
Kefu Chai [Tue, 31 May 2016 10:48:58 +0000 (18:48 +0800)]
Merge pull request #9403 from dachary/wip-16088-jewel

jewel: tests: rm -fr /tmp/*virtualenv*

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agotests: rm -fr /tmp/*virtualenv* 9403/head
Loic Dachary [Fri, 20 May 2016 11:19:07 +0000 (13:19 +0200)]
tests: rm -fr /tmp/*virtualenv*

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 8f0eefba00d1c6ad656302a608217fc3395d0401)

9 years agoMerge pull request #8968 from Abhishekvrshny/wip-15728-jewel
Kefu Chai [Tue, 31 May 2016 05:46:31 +0000 (13:46 +0800)]
Merge pull request #8968 from Abhishekvrshny/wip-15728-jewel

jewel: osd: acting_primary not updated on split

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #9100 from Abhishekvrshny/wip-15856-jewel
Kefu Chai [Tue, 31 May 2016 05:42:28 +0000 (13:42 +0800)]
Merge pull request #9100 from Abhishekvrshny/wip-15856-jewel

jewel: Hammer (0.94.3) OSD does not delete old OSD Maps in a timely fashion (maybe at all?)

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agoMerge pull request #9245 from dreamhost/wip-15974-jewel
Yehuda Sadeh [Mon, 30 May 2016 10:53:45 +0000 (13:53 +0300)]
Merge pull request #9245 from dreamhost/wip-15974-jewel

rgw: fix manager selection when APIs customized

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
9 years agoMerge pull request #9239 from yehudasa/wip-15886-jewel
Orit Wasserman [Mon, 30 May 2016 09:15:18 +0000 (11:15 +0200)]
Merge pull request #9239 from yehudasa/wip-15886-jewel

rgw: keep track of written_objs correctly
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
9 years agocls_journal: Select min commit position for new clients 9376/head
Venky Shankar [Thu, 19 May 2016 17:15:34 +0000 (22:45 +0530)]
cls_journal: Select min commit position for new clients

When a new client registers, its commit position is initialized
to the least commit position of all other clients.

Fixes: http://tracker.ceph.com/issues/15757
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit dd2e3dae8adb3778e7e381db5dbfca0948571c55)

9 years agocls_journal: remove duplicated key generation
runsisi [Mon, 9 May 2016 07:15:31 +0000 (15:15 +0800)]
cls_journal: remove duplicated key generation

Signed-off-by: runsisi <runsisi@zte.com.cn>
(cherry picked from commit 715e99c83e1ebc01ceb9eff0f66da8e2b598766a)

9 years agorgw: fix manager selection when APIs customized 9245/head
Robin H. Johnson [Fri, 20 May 2016 23:00:33 +0000 (16:00 -0700)]
rgw: fix manager selection when APIs customized

When modifying rgw_enable_apis per RGW instance, such as for staticsites, you
can end up with RESTManager instance being null in some cases, which returns a
HTTP 405 MethodNotAllowed to all requests.

Example configuration to trigger the bug:
rgw_enable_apis = s3website

Backport: jewel
X-Note: Patch from Yehuda in private IRC discussion, 2016/05/20.
Fixes: http://tracker.ceph.com/issues/15973
Fixes: http://tracker.ceph.com/issues/15974
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
(cherry picked from commit 7c7a465b55f7100eab0f140bf54f9420abd1c776)

9 years agoosd/OpRequest: reset connection upon unregister 9100/head
Kefu Chai [Fri, 13 May 2016 03:26:31 +0000 (11:26 +0800)]
osd/OpRequest: reset connection upon unregister

this helps to free the resources referenced by the connection, among
other things, in the case of MOSDOp, the OSD::Session and OSDMap. this
helps to free the resource earlier and trim the osdmaps in time.

Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 87850e96ea6fa45a8368bacabee50f9e95b40ae9)

9 years agoosd: reset session->osdmap if session is not waiting for a map anymore
Kefu Chai [Thu, 12 May 2016 12:28:11 +0000 (20:28 +0800)]
osd: reset session->osdmap if session is not waiting for a map anymore

we should release the osdmap reference once we are done with it,
otherwise we might need to wait very long to update that reference with
a newer osdmap ref. this appears to be an OSDMap leak: it is held by an
quiet OSD::Session forever.

the osdmap is not reset in OSD::session_notify_pg_create(), because its
only caller is wake_pg_waiters(), which will call
dispatch_session_waiting() later. and dispatch_session_waiting() will
check the session->osdmap, and will also reset the osdmap if
session->waiting_for_pg.empty().

Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 82b0af7cedc3071cd83ee53479f834c23c62b7d0)

9 years agolibrbd: metadata retrieval added to open image state machine 9318/head
Jason Dillaman [Wed, 18 May 2016 23:19:24 +0000 (19:19 -0400)]
librbd: metadata retrieval added to open image state machine

Fixes: http://tracker.ceph.com/issues/15928
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit b64cb31f8e7796175b4709929c017b3236649462)

9 years agocls_rbd: async version of metadata_list helper method
Jason Dillaman [Wed, 18 May 2016 21:50:07 +0000 (17:50 -0400)]
cls_rbd: async version of metadata_list helper method

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 985cb38211c51c95d84479df231c4f53847cb2ec)

9 years agorbd-mirror: disable librbd caching for replicated images 9317/head
Jason Dillaman [Thu, 19 May 2016 00:53:26 +0000 (20:53 -0400)]
rbd-mirror: disable librbd caching for replicated images

Each image has its own cache and each cache uses its own thread. With
a large replicated cluster, this could result in thousands of extra
threads and gigabytes of extra memory.

Fixes: http://tracker.ceph.com/issues/15930
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ea35f148257282fe3f3ae02fe7a26cf245cda952)

9 years agojournal: replay position might change after pruning stale tags 9269/head
Jason Dillaman [Thu, 19 May 2016 19:52:16 +0000 (15:52 -0400)]
journal: replay position might change after pruning stale tags

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0f5f1c375d8ef7b301cfd20b6848bdc81a761746)

9 years agolibrbd: delay commit of overwritten journal event
Jason Dillaman [Thu, 19 May 2016 19:50:04 +0000 (15:50 -0400)]
librbd: delay commit of overwritten journal event

With the cache enabled and write-after-write IOs to the same
object extents, it was possible for the overwritten journal event
to be committed before the overwriter journal event was written
to disk.  If a client crash occurs before the event is written,
the image will be inconsistent on replay.

Fixes: http://tracker.ceph.com/issues/15938
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit e8bf64cc85ffe3d2dda23eab1834f7a5f104f6fe)

9 years agoObjectCacher: pass new journal tid when overwriting extent
Jason Dillaman [Thu, 19 May 2016 18:13:46 +0000 (14:13 -0400)]
ObjectCacher: pass new journal tid when overwriting extent

librbd needs to ensure the new journal event has been safely
committed to disk before it can mark an overwritten journal
event as committed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0051316effe0b25804378975b117691d7ad08a3b)

9 years agoqa/workunits/rbd: record rbd CLI debug messages during mirror stress
Jason Dillaman [Thu, 19 May 2016 17:48:22 +0000 (13:48 -0400)]
qa/workunits/rbd: record rbd CLI debug messages during mirror stress

The debug messages from 'rbd bench-write' and 'rbd snap create',
in addition to the existing debug messages from rbd-mirror, make
it possible to determine the source of any image inconsistency.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 714ed5e64e65fed9ac886537becf3a85ae6ae7fd)

9 years agorgw: keep track of written_objs correctly 9239/head
Yehuda Sadeh [Mon, 16 May 2016 21:35:12 +0000 (14:35 -0700)]
rgw: keep track of written_objs correctly

Fixes: http://tracker.ceph.com/issues/15886
Only add a rados object to the written_objs list if the write
was successful. Otherwise if the write will be canceled for some
reason, we'd remove an object that we didn't write to. This was
a problem in a case where there's multiple writes that went to
the same part. The second writer should fail the write, since
we do an exclusive write. However, we added the object's name
to the written_objs list anyway, which was a real problem when
the old processor was disposed (as it was clearing the objects).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 8fd74d11682f9d0c9085d2dc445fc3eb5631f6e0)

9 years agoMerge pull request #9232 from jdurgin/wip-mirror-workunit-jewel
Jason Dillaman [Fri, 20 May 2016 18:57:00 +0000 (14:57 -0400)]
Merge pull request #9232 from jdurgin/wip-mirror-workunit-jewel

jewel: qa/workunits/rbd: fixed rbd_mirror teuthology runtime errors

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoqa/workunits/rbd: fixed rbd_mirror teuthology runtime errors 9232/head
Jason Dillaman [Wed, 18 May 2016 18:17:13 +0000 (14:17 -0400)]
qa/workunits/rbd: fixed rbd_mirror teuthology runtime errors

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8ef09c4d8d3c7c6fbc9b6f7ef17cca0179e73468)

9 years agoMerge pull request #9226 from dillaman/wip-15950
Jason Dillaman [Fri, 20 May 2016 13:02:51 +0000 (09:02 -0400)]
Merge pull request #9226 from dillaman/wip-15950

jewel: rbd-mirror: potential crash during image status update

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9069 from dillaman/fixup-mirror_image_status_list-jewel
Jason Dillaman [Fri, 20 May 2016 13:02:06 +0000 (09:02 -0400)]
Merge pull request #9069 from dillaman/fixup-mirror_image_status_list-jewel

jewel: cls::rbd: mirror_image_status_list returned max 64 items

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agojournal: reset watch step after pruning expired tag 9226/head
Jason Dillaman [Thu, 19 May 2016 14:11:12 +0000 (10:11 -0400)]
journal: reset watch step after pruning expired tag

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 48c2f4e079000021b6ebe807bb1dba0dc1a6a11d)

9 years agorbd-mirror: additional debug messages during image replayer start/stop
Jason Dillaman [Wed, 18 May 2016 15:01:22 +0000 (11:01 -0400)]
rbd-mirror: additional debug messages during image replayer start/stop

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit afc891f7fcb000d106b1d722386f6d81ddeddab6)

9 years agorbd-mirror: ensure proper handling of status updates during shutdown
Jason Dillaman [Wed, 18 May 2016 04:55:01 +0000 (00:55 -0400)]
rbd-mirror: ensure proper handling of status updates during shutdown

Previously, several shutdown race conditions could occur due to the
use of the async work queue for scheduling updates.

Fixes: http://tracker.ceph.com/issues/15909
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 9ae4edc05660665c3a135536a7c51d4070d28a40)

9 years agorbd-mirror: track bootstrap state within image status
Jason Dillaman [Wed, 18 May 2016 03:31:02 +0000 (23:31 -0400)]
rbd-mirror: track bootstrap state within image status

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit e5dd97b4bf4a993911febf34dce90470a2a91d59)

9 years agorbd-mirror: combine ImageReplayer stopped and uninitialized states
Jason Dillaman [Wed, 18 May 2016 03:25:25 +0000 (23:25 -0400)]
rbd-mirror: combine ImageReplayer stopped and uninitialized states

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit a8f6dde4dbae8039380f31e026030a22a89fb4bd)

9 years agorbd-mirror: lock ordering issue in status update callback
Jason Dillaman [Tue, 17 May 2016 20:14:42 +0000 (16:14 -0400)]
rbd-mirror: lock ordering issue in status update callback

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5c04c1361074ca9e9df1bc1c2dd82dfafc2a1304)

9 years agorbd-mirror: don't unregister asok commands if image replayer start failed
Mykola Golub [Wed, 4 May 2016 12:23:11 +0000 (15:23 +0300)]
rbd-mirror: don't unregister asok commands if image replayer start failed

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 2fd6fdd3dc9ecb915362f5e3aa8a224210273540)

9 years agorbd-mirror: avoid potential deadlock
Mykola Golub [Wed, 4 May 2016 12:25:04 +0000 (15:25 +0300)]
rbd-mirror: avoid potential deadlock

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 46bf727d43af4975beeb514630a99d59cfb0a406)

9 years agoMerge pull request #9217 from dillaman/wip-15945
Jason Dillaman [Fri, 20 May 2016 13:01:50 +0000 (09:01 -0400)]
Merge pull request #9217 from dillaman/wip-15945

jewel: journal: live replay might skip entries from previous object set

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoqa/workunits/rbd: rbd-mirror daemon stress test 9217/head
Jason Dillaman [Tue, 17 May 2016 01:17:09 +0000 (21:17 -0400)]
qa/workunits/rbd: rbd-mirror daemon stress test

This test repeatedly runs rbd bench-write, kills the process
randomly to create an unclean journal shutdown, and verifies
that the image content replicates correctly.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit e2ab3128a37f4f36c9a1de6ddf2c0fe2e48aa7e2)

9 years agojournal: helper method to detect newer tags
Jason Dillaman [Mon, 16 May 2016 22:08:35 +0000 (18:08 -0400)]
journal: helper method to detect newer tags

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0a8a6126ea35344e85af7eb64ffc490938edba51)

9 years agojournal: skip partially complete tag entries during playback
Jason Dillaman [Sun, 15 May 2016 13:52:41 +0000 (09:52 -0400)]
journal: skip partially complete tag entries during playback

If a journal client does not fully write out its buffered entries
before quiting, replay should skip over all remaining out-of-
sequence entries for the tag.

Fixes: http://tracker.ceph.com/issues/15864
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 9454f7e4c62437b1c288f371009feba1fd374584)

9 years agojournal: close, advance, and open object set ordering
Jason Dillaman [Sat, 14 May 2016 22:58:41 +0000 (18:58 -0400)]
journal: close, advance, and open object set ordering

Flush in-flight appends to open objects before advancing the
active object set.  Additionally, don't start recording to the
new objects until after advancing the active set.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit de830057d0f7286914e019540c6263423cb60428)

9 years agojournal: new ObjectRecorder closed callback
Jason Dillaman [Sat, 14 May 2016 22:13:38 +0000 (18:13 -0400)]
journal: new ObjectRecorder closed callback

The callback will be invoked if there were in-flight appends
when the close was requested.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit bba91437dbe3b7a9b6da8a61ccc4c597858c8efc)

9 years agojournal: do not flag append as full if already known to be full
Jason Dillaman [Fri, 13 May 2016 20:34:44 +0000 (16:34 -0400)]
journal: do not flag append as full if already known to be full

Once an object has overflowed or a close is in-progress, re-attempting
to close the object is not needed since the async process is already
underway.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 45620dc312ca2aeaf084638144aaa4783b622c4a)

9 years agojournal: delay object overflow event until in-flight appends settled
Jason Dillaman [Fri, 13 May 2016 20:28:50 +0000 (16:28 -0400)]
journal: delay object overflow event until in-flight appends settled

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ee8d311a1fcdf7a85cdc168e1740fbaa252e87d3)

9 years agojournal: ignore flush on closed/overflowed object
Jason Dillaman [Fri, 13 May 2016 20:17:37 +0000 (16:17 -0400)]
journal: ignore flush on closed/overflowed object

The journal would be in-progress on transitioning to a new
object recorder in a newer object set.  Once the records
re-attach to the new object player they will automatically
flush.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit a13cb821f71b6b1b3378464bcc2d8318eb0da48a)

9 years agojournal: implicitly detach future's flush handler on append
Jason Dillaman [Fri, 13 May 2016 20:10:11 +0000 (16:10 -0400)]
journal: implicitly detach future's flush handler on append

If the future is already in-flight, there is no purpose served
by requesting the future be flushed to disk.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 1cb9b1a1b25d0f4c2d9a9e22661636e195fc70a0)

9 years agojournal: async callback for advancing the active object set
Jason Dillaman [Fri, 13 May 2016 19:22:30 +0000 (15:22 -0400)]
journal: async callback for advancing the active object set

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit ca89abfd9e6f0e8edc3234afea387757ef694826)

9 years agojournal: re-fetch active object before advancing set during replay
Jason Dillaman [Fri, 13 May 2016 18:49:07 +0000 (14:49 -0400)]
journal: re-fetch active object before advancing set during replay

During a live replay, it's possible that an append and and overflow
into the next object could race with the live playback of the same
object.  Re-fetch an "empty" object at least once before advancing
to next set to ensure all records have been read.

Fixes: http://tracker.ceph.com/issues/15665
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 6056f8c45c99bd37cb18933a37cc238c7e9a7c7d)

9 years agoMerge pull request #9210 from yehudasa/wip-15926-jewel
Yehuda Sadeh [Thu, 19 May 2016 20:08:00 +0000 (13:08 -0700)]
Merge pull request #9210 from yehudasa/wip-15926-jewel

radosgw-admin: fix 'period push' handling of --url

9 years agoradosgw-admin: fix 'period push' handling of --url 9210/head
Casey Bodley [Mon, 16 May 2016 13:37:05 +0000 (09:37 -0400)]
radosgw-admin: fix 'period push' handling of --url

was calling send_to_remote_gateway(), but passing 'url' instead of
'remote'. now uses send_to_remote_or_url() to accept either

Fixes: http://tracker.ceph.com/issues/15926
Signed-off-by: Casey Bodley <cbodley@redhat.com>
9 years agoMerge pull request #9194 from ceph/wip-jewel-no-lttng-global-link
Boris Ranto [Thu, 19 May 2016 10:56:15 +0000 (12:56 +0200)]
Merge pull request #9194 from ceph/wip-jewel-no-lttng-global-link

Do not link lttng into libglobal

Reviewed-by: Boris Ranto <branto@redhat.com>
9 years agoglobal: don't link lttng into libglobal 9194/head
Karol Mroz [Mon, 2 May 2016 12:01:27 +0000 (14:01 +0200)]
global: don't link lttng into libglobal

Rely on dynamic initialization instead. Linking lttng in this way had
the unfortunate side effect of causing radosgw to segfault (when
daemonized) during sigterm processing (ie. during lttng_ust_exit()).

This was originally removed in 638738f, but accidentally re-added via
5f61d36.

Signed-off-by: Karol Mroz <kmroz@suse.com>
9 years agoMerge pull request #9180 from dillaman/wip-15746-jewel
Jason Dillaman [Wed, 18 May 2016 17:23:39 +0000 (13:23 -0400)]
Merge pull request #9180 from dillaman/wip-15746-jewel

jewel: doc: update mirroring guide to include pool/image status commands

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agodoc: update mirroring guide to include pool/image status commands 9180/head
Mykola Golub [Thu, 12 May 2016 08:15:34 +0000 (11:15 +0300)]
doc: update mirroring guide to include pool/image status commands

Fixes: http://tracker.ceph.com/issues/15746
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 4381e341c435c80793b847115eed616b8359c4e6)

9 years agodoc: fixup: "rbd-mirror daemon" instead of "rbd-daemon"
Mykola Golub [Thu, 12 May 2016 08:11:55 +0000 (11:11 +0300)]
doc: fixup: "rbd-mirror daemon" instead of "rbd-daemon"

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit ddd6345f8f7edcff638ed435aef316ba3e0e40dd)

9 years agoMerge pull request #8815 from ktdreyer/wip-15646-jewel-system-targets
Sage Weil [Wed, 18 May 2016 09:11:55 +0000 (05:11 -0400)]
Merge pull request #8815 from ktdreyer/wip-15646-jewel-system-targets

jewel: debian: install systemd target files

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agodebian/control: dh_systemd_start is in the dh-systemd package 8815/head
Sage Weil [Thu, 28 Apr 2016 13:13:50 +0000 (09:13 -0400)]
debian/control: dh_systemd_start is in the dh-systemd package

Fixes: http://tracker.ceph.com/issues/15573
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 89154d1e01dbc58dc92f37741031f7ddb0448d2e)

9 years agodebian: install systemd target files
Kefu Chai [Fri, 22 Apr 2016 13:07:58 +0000 (21:07 +0800)]
debian: install systemd target files

* enable it using dh_systemd_enable
* start the target using dh_systemd_start
* move the dh_installinit, dh_systemd_enable, dh_systemd_start calls
  down, so they can identify the service files if they care about them.

Fixes: http://tracker.ceph.com/issues/15573
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f950a0a7f5b35e13668379bc69dcb5d98a2dfc1f)

9 years ago10.2.1 v10.2.1
Jenkins Build Slave User [Thu, 12 May 2016 21:48:00 +0000 (21:48 +0000)]
10.2.1

9 years agoosd: remove all stale osdmaps in handle_osd_map()
Kefu Chai [Mon, 9 May 2016 06:15:36 +0000 (14:15 +0800)]
osd: remove all stale osdmaps in handle_osd_map()

in a large cluster, there are better chances that the OSD fails to trim
the cached osdmap in a timely manner. and sometimes, it is just unable
to keep up with the incoming osdmap if skip_maps, so the osdmap cache
can keep building up to over 250GB in size. in this change

* publish_superblock() before trimming the osdmaps, so other osdmap
  consumers of OSDService.superblock won't access the osdmaps being
  removed.
* trim all stale osdmaps in batch of conf->osd_target_transaction_size
  if skip_maps is true. in my test, it happens when the osd only
  receives the osdmap from monitor occasionally because the osd happens
  to be chosen when monitor wants to share a new osdmap with a random
  osd.
* always use dedicated transaction(s) for trimming osdmaps. so even in
  the normal case where we are able to trim all stale osdmaps in a
  single batch, a separated transaction is used. we can piggy back
  the commits for removing maps, but we keep it this way for simplicity.
* use std::min() instead MIN() for type safety

Fixes: http://tracker.ceph.com/issues/13990
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 369db9930887d75b498927da9c97733bff4472b6)

9 years agoMerge pull request #8853 from ceph/wip-jewel-backports 9113/head
Loic Dachary [Thu, 12 May 2016 15:30:14 +0000 (17:30 +0200)]
Merge pull request #8853 from ceph/wip-jewel-backports

jewel: several backports

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #9041 from vshankar/jewel-15721-backport
Ilya Dryomov [Thu, 12 May 2016 14:50:33 +0000 (16:50 +0200)]
Merge pull request #9041 from vshankar/jewel-15721-backport

jewel: rbd: helpful error message on map failure

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
9 years agoMerge pull request #9081 from yehudasa/wip-rgw-period-commit-jewel
Yehuda Sadeh [Wed, 11 May 2016 19:33:50 +0000 (12:33 -0700)]
Merge pull request #9081 from yehudasa/wip-rgw-period-commit-jewel

rgw: period commit fix

9 years agoMerge pull request #8969 from Abhishekvrshny/wip-15731-jewel
Gregory Farnum [Wed, 11 May 2016 19:24:23 +0000 (12:24 -0700)]
Merge pull request #8969 from Abhishekvrshny/wip-15731-jewel

jewel: MDSAuthCap parse no longer fails on paths with hyphens

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
9 years agoMerge pull request #8970 from Abhishekvrshny/wip-15732-jewel
Gregory Farnum [Wed, 11 May 2016 19:23:28 +0000 (12:23 -0700)]
Merge pull request #8970 from Abhishekvrshny/wip-15732-jewel

jewel: MDS incarnation no longer gets lost after remove filesystem

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
9 years agoMerge pull request #8971 from Abhishekvrshny/wip-15738-jewel
Gregory Farnum [Wed, 11 May 2016 19:20:03 +0000 (12:20 -0700)]
Merge pull request #8971 from Abhishekvrshny/wip-15738-jewel

jewel: handle standby-replay nodes properly in upgrades

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
9 years agoMerge pull request #9054 from yehudasa/wip-rgw-admin-output-jewel
Yehuda Sadeh [Wed, 11 May 2016 17:38:30 +0000 (10:38 -0700)]
Merge pull request #9054 from yehudasa/wip-rgw-admin-output-jewel

jewel: rgw admin output

9 years agoMerge pull request #9053 from yehudasa/wip-15745-jewel
Yehuda Sadeh [Wed, 11 May 2016 17:38:17 +0000 (10:38 -0700)]
Merge pull request #9053 from yehudasa/wip-15745-jewel

jewel: rgw: handle stripe transition when flushing final pending_data_bl