]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
9 years agocmake: fix rbd compile errors 9076/head
Jason Dillaman [Wed, 11 May 2016 02:37:01 +0000 (22:37 -0400)]
cmake: fix rbd compile errors

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

9 years agocmake: add library cls_journal for target unittest_librbd
runsisi [Thu, 28 Apr 2016 02:22:07 +0000 (10:22 +0800)]
cmake: add library cls_journal for target unittest_librbd

otherwise if we want to generate target unittest_librbd we need to
(re)generate cls_journal manually

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

9 years agoMerge pull request #9063 from dachary/wip-15838-jewel
Kefu Chai [Wed, 11 May 2016 08:50:41 +0000 (16:50 +0800)]
Merge pull request #9063 from dachary/wip-15838-jewel

jewel: tests: make check fails on ext4

Reviewed-by: Kefu Chai <kchai@redhat.com>
9 years agotests: enable make check on ext4 (part 2) 9063/head
Loic Dachary [Mon, 2 May 2016 08:42:24 +0000 (10:42 +0200)]
tests: enable make check on ext4 (part 2)

Followup of 475cc08c330e639b226f2ab57dedbe4495f63022

Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit b0b3a068d4fcc7b739c5dd3d68297e2d517c378e)

9 years agoqa/workunits/ceph-helpers.sh: make ceph-osd behave on ext4
Sage Weil [Sat, 30 Apr 2016 21:12:05 +0000 (17:12 -0400)]
qa/workunits/ceph-helpers.sh: make ceph-osd behave on ext4

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 475cc08c330e639b226f2ab57dedbe4495f63022)

9 years agoMerge pull request #9052 from dillaman/wip-cmake-rbd-mirror-replay-status-jewel
Samuel Just [Tue, 10 May 2016 18:14:40 +0000 (11:14 -0700)]
Merge pull request #9052 from dillaman/wip-cmake-rbd-mirror-replay-status-jewel

jewel: cmake: add missing source file to rbd_mirror/image_replayer

Reviewed-by: Samuel Just <sjust@redhat.com>
9 years agocmake: add missing source file to rbd_mirror/image_replayer 9052/head
Casey Bodley [Fri, 29 Apr 2016 21:33:03 +0000 (17:33 -0400)]
cmake: add missing source file to rbd_mirror/image_replayer

fixes an undefined reference when linking librbd_mirror_internal.a

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2f3f56170ab47fc10d4232101ae2e85398a4c299)

9 years agoMerge pull request #9051 from athanatos/wip-15815-jewel
Sage Weil [Tue, 10 May 2016 18:10:05 +0000 (14:10 -0400)]
Merge pull request #9051 from athanatos/wip-15815-jewel

Wip 15815 jewel

Reviewed-by: Sage Weil <sage@redhat.com>
9 years agoceph_test_keyvaluedb: clean up test dir 9051/head
Sage Weil [Fri, 22 Apr 2016 20:38:14 +0000 (16:38 -0400)]
ceph_test_keyvaluedb: clean up test dir

Just like ceph_test_objectstore

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 2b075aa52d4475338c0f3cd3360e1ee4de8befa7)

9 years agoceph_test_keyvaluedb: fixup unit test for keyvaluedb
Allen Samuels [Fri, 22 Apr 2016 18:06:56 +0000 (14:06 -0400)]
ceph_test_keyvaluedb: fixup unit test for keyvaluedb

Fixes: http://tracker.ceph.com/issues/15435
Signed-off-by: Allen Samuels <allen.samuels@sandisk.com>
(cherry picked from commit 85c14de20936ff9ee224f9b6569a73f9bae75f19)

9 years agoMerge pull request #9050 from dillaman/wip-15821
Jason Dillaman [Tue, 10 May 2016 17:52:54 +0000 (13:52 -0400)]
Merge pull request #9050 from dillaman/wip-15821

jewel: rbd-mirror: image sync needs to handle snapshot size and protection status

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agotest: add missing header dependency for MockJournaler 9050/head
Jason Dillaman [Mon, 9 May 2016 22:25:39 +0000 (18:25 -0400)]
test: add missing header dependency for MockJournaler

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

9 years agorbd-mirror: image sync object copy was not properly mapping snapshots
Jason Dillaman [Wed, 4 May 2016 14:23:49 +0000 (10:23 -0400)]
rbd-mirror: image sync object copy was not properly mapping snapshots

When the snapshot sequence is out-of-sync between remote and local
clusters (expected), the objects would not be written with the
correct snapshot context.

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

9 years agorbd-mirror: clean up image sync debug messages
Jason Dillaman [Wed, 4 May 2016 14:23:25 +0000 (10:23 -0400)]
rbd-mirror: clean up image sync debug messages

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

9 years agolibrbd: readahead should not read past end of image
Jason Dillaman [Wed, 4 May 2016 04:12:05 +0000 (00:12 -0400)]
librbd: readahead should not read past end of image

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

9 years agotest: randomize rbd-mirror test case IO
Jason Dillaman [Wed, 4 May 2016 03:17:12 +0000 (23:17 -0400)]
test: randomize rbd-mirror test case IO

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

9 years agorbd-mirror: don't set object map to nonexistent during image sync
Jason Dillaman [Wed, 4 May 2016 03:15:58 +0000 (23:15 -0400)]
rbd-mirror: don't set object map to nonexistent during image sync

The object maps are initialized to nonexistent at snapshot creation,
so this operation is unnecessary.

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

9 years agolibrbd: improve object map debug messages
Jason Dillaman [Wed, 4 May 2016 03:01:30 +0000 (23:01 -0400)]
librbd: improve object map debug messages

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

9 years agotest: snapshot stress test rbd-mirror image sync
Jason Dillaman [Wed, 4 May 2016 02:53:52 +0000 (22:53 -0400)]
test: snapshot stress test rbd-mirror image sync

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

9 years agorbd-mirror: allocate empty object map during snapshot create
Jason Dillaman [Wed, 4 May 2016 01:42:05 +0000 (21:42 -0400)]
rbd-mirror: allocate empty object map during snapshot create

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

9 years agolibrbd: optionally skip object map creation upon snapshot
Jason Dillaman [Fri, 29 Apr 2016 20:43:07 +0000 (16:43 -0400)]
librbd: optionally skip object map creation upon snapshot

This feature is used by rbd-mirror during image bootstrap since
it will directly create an empty object map.

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

9 years agorbd-mirror: refactor snapshot create into its own state machine
Jason Dillaman [Mon, 25 Apr 2016 19:11:28 +0000 (15:11 -0400)]
rbd-mirror: refactor snapshot create into its own state machine

Initial implementation will resize the image (if needed) and create
the snapshot.  It is stubbed out for future state machines for handling
object map and clones.

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

9 years agorbd-mirror: sync snapshot protection status during bootstrap
Jason Dillaman [Fri, 15 Apr 2016 01:47:19 +0000 (21:47 -0400)]
rbd-mirror: sync snapshot protection status during bootstrap

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

9 years agotest: stub test cases for rbd-mirror image bootstrap
Jason Dillaman [Sat, 9 Apr 2016 17:30:56 +0000 (13:30 -0400)]
test: stub test cases for rbd-mirror image bootstrap

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

9 years agotest: share journal::MockJournaler between librbd and rbd-mirror
Jason Dillaman [Tue, 5 Apr 2016 04:03:12 +0000 (00:03 -0400)]
test: share journal::MockJournaler between librbd and rbd-mirror

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

Conflicts:
src/test/librbd/test_mock_Journal.cc: MockJournaler moved to new file

9 years agoMerge pull request #9040 from dillaman/wip-15818
Jason Dillaman [Tue, 10 May 2016 17:40:32 +0000 (13:40 -0400)]
Merge pull request #9040 from dillaman/wip-15818

jewel: librbd: potential concurrent event processing during journal replay

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9038 from dillaman/wip-15817
Jason Dillaman [Tue, 10 May 2016 17:39:46 +0000 (13:39 -0400)]
Merge pull request #9038 from dillaman/wip-15817

jewel: journal: incorrectly computed object offset within set

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9039 from dillaman/wip-15820
Jason Dillaman [Tue, 10 May 2016 17:39:06 +0000 (13:39 -0400)]
Merge pull request #9039 from dillaman/wip-15820

jewel: librbd: client-side handling for incompatible object map sizes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: guard object map against incompatible image sizes 9039/head
Jason Dillaman [Wed, 4 May 2016 21:00:59 +0000 (17:00 -0400)]
librbd: guard object map against incompatible image sizes

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

9 years agolibrbd: properly handle object map open returning error code
Jason Dillaman [Wed, 4 May 2016 19:16:17 +0000 (15:16 -0400)]
librbd: properly handle object map open returning error code

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

9 years agolibrbd: add client-side memory constraint when loading object map
Jason Dillaman [Wed, 4 May 2016 19:01:58 +0000 (15:01 -0400)]
librbd: add client-side memory constraint when loading object map

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

9 years agoMerge pull request #9048 from dillaman/wip-15819
Jason Dillaman [Tue, 10 May 2016 17:30:49 +0000 (13:30 -0400)]
Merge pull request #9048 from dillaman/wip-15819

jewel: librbd: constrain size of AioWriteEvent journal entries

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: split large AioWrite journal events 9048/head
Jason Dillaman [Fri, 6 May 2016 04:08:38 +0000 (00:08 -0400)]
librbd: split large AioWrite journal events

Ensure that AioWrite journal events fit within a single
journal object.

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

9 years agojournal: prohibit journal entries larger than the soft object size
Jason Dillaman [Fri, 6 May 2016 01:30:18 +0000 (21:30 -0400)]
journal: prohibit journal entries larger than the soft object size

This avoids complications like a librbd write event of 128MB trying
to fit within a 24MB journal object.

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

9 years agoMerge pull request #9036 from dillaman/wip-15814
Jason Dillaman [Tue, 10 May 2016 17:28:11 +0000 (13:28 -0400)]
Merge pull request #9036 from dillaman/wip-15814

jewel: librbd: fix get/list mirror image status API

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: fixup to get/list mirror image status API 9036/head
Mykola Golub [Tue, 10 May 2016 09:29:12 +0000 (12:29 +0300)]
rbd-mirror: fixup to get/list mirror image status API

- embed name and rbd_mirror_image_info_t into rbd_mirror_image_status_t;
- index image status list by image id to make 'start' work correctly;
- provide rbd_mirror_image_status_list_cleanup function.

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

9 years agoMerge pull request #9003 from dillaman/wip-15743
Jason Dillaman [Tue, 10 May 2016 17:15:23 +0000 (13:15 -0400)]
Merge pull request #9003 from dillaman/wip-15743

jewel: librbd: reduce log level for image format 1 warning

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9010 from dillaman/wip-15736
Jason Dillaman [Tue, 10 May 2016 17:13:27 +0000 (13:13 -0400)]
Merge pull request #9010 from dillaman/wip-15736

jewel: rbd-mirror: admin socket commands to start/stop/restart mirroring

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agorbd-mirror: admin socket commands to start/stop/restart mirroring 9010/head
Mykola Golub [Thu, 28 Apr 2016 06:32:33 +0000 (09:32 +0300)]
rbd-mirror: admin socket commands to start/stop/restart mirroring

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

9 years agoqa/workunits/rbd: fix rbd-mirror log file name
Mykola Golub [Sun, 1 May 2016 19:04:46 +0000 (22:04 +0300)]
qa/workunits/rbd: fix rbd-mirror log file name

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

9 years agorbd-mirror: make image replayer asok commands available when not started
Mykola Golub [Thu, 28 Apr 2016 06:23:35 +0000 (09:23 +0300)]
rbd-mirror: make image replayer asok commands available when not started

Initially the asok commands were registered only after the image
replayer start (and unregistered on stop) because their names were
built using remote pool and image names, which became known only after
start.

Now, the asok commands are registered on the image replayer construction
using the temporary name "remote_pool_name/global_image_id". They are
re-registered using "remote_pool_name/remote_image_name" when the
image replayer is started.  Also the commands are not unregistered on
the image replayer stop.

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

9 years agoqa/workunits/rbd: add env vars to adapt rbd_mirror.sh to teuthology
Josh Durgin [Sat, 2 Apr 2016 01:15:33 +0000 (18:15 -0700)]
qa/workunits/rbd: add env vars to adapt rbd_mirror.sh to teuthology

With these set, this script can work in teuthology, where we want to
control the how daemons run and their log locations, valgrind
settings, etc. The workunit task always sets CEPH_ID, and allows
other env vars to be configured optionally.

The RBD_MIRROR_USE_EXISTING_CLUSTER option can also speed up local testing.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit dcd11a1f262e0c56bb1b37d54283cda06abbf4c7)

9 years agoqa: rbd_mirror.sh: change parameters to cluster rather than daemon name
Josh Durgin [Thu, 7 Apr 2016 23:57:14 +0000 (16:57 -0700)]
qa: rbd_mirror.sh: change parameters to cluster rather than daemon name

Daemon name is only useful to differentiate asok and pid filenames, so
just inline its use there. Everywhere else replace the 'daemon'
parameter with cluster or local_cluster as appropriate.

Remove the CLUSTER{1,2}_DAEMON vars as well, since they are no longer
used.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit 5fe64fa806f3bbdbdb950a5643238cc2508814b0)

9 years agoMerge pull request #9005 from dillaman/wip-15716
Jason Dillaman [Tue, 10 May 2016 17:04:09 +0000 (13:04 -0400)]
Merge pull request #9005 from dillaman/wip-15716

jewel: rbd-nbd: fix rbd-nbd aio callback error handling

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agojewel: librbd: unlock image if journal error encountered during lock
Jason Dillaman [Tue, 10 May 2016 17:03:38 +0000 (13:03 -0400)]
jewel: librbd: unlock image if journal error encountered during lock

jewel: librbd: unlock image if journal error encountered during lock

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9009 from dillaman/wip-15713
Jason Dillaman [Tue, 10 May 2016 17:02:24 +0000 (13:02 -0400)]
Merge pull request #9009 from dillaman/wip-15713

jewel: librbd: possible race condition leads to use-after-free

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: possible race condition leads to use-after-free 9009/head
Jason Dillaman [Tue, 3 May 2016 11:41:30 +0000 (07:41 -0400)]
librbd: possible race condition leads to use-after-free

The invoke async operation state machine can complete before the
owner lock is released.  Use a stack reference to prevent
use-after-free.

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

9 years agoMerge pull request #9004 from dillaman/wip-15708
Jason Dillaman [Tue, 10 May 2016 16:53:30 +0000 (12:53 -0400)]
Merge pull request #9004 from dillaman/wip-15708

jewel: rbd: help message distinction between commands and aliases

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8972 from Abhishekvrshny/wip-15697-jewel
Jason Dillaman [Tue, 10 May 2016 16:53:00 +0000 (12:53 -0400)]
Merge pull request #8972 from Abhishekvrshny/wip-15697-jewel

jewel: python: clone operation will fail if config overridden with "rbd default format = 1"

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9008 from dillaman/wip-15698
Jason Dillaman [Tue, 10 May 2016 16:50:43 +0000 (12:50 -0400)]
Merge pull request #9008 from dillaman/wip-15698

jewel: rbd-mirror: lockdep error during bootstrap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: disable automatic refresh of image upon lock message 9008/head
Jason Dillaman [Mon, 2 May 2016 14:33:50 +0000 (10:33 -0400)]
librbd: disable automatic refresh of image upon lock message

There is no need to refresh the image upon request/release/acquire
of the exclusive lock.  The next IO or maintenance op will kick off
the refresh.  This is interfering with the refresh state machine
unit test case (since two concurrent refreshes shouldn't be possible).

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

9 years agolibrbd: update_features should release lock if acquired
Jason Dillaman [Mon, 2 May 2016 14:26:29 +0000 (10:26 -0400)]
librbd: update_features should release lock if acquired

There is a small window where requests are unblocked and before
the image is shut down where new requests can be accepted.  These
are correctly canceled during the shut down, but it can lead to
warning messages.

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

9 years agolibrbd: avoid applying refreshed image config within librados callback
Jason Dillaman [Mon, 2 May 2016 13:27:29 +0000 (09:27 -0400)]
librbd: avoid applying refreshed image config within librados callback

There is a potential that a synchronous API call could deadlock a
image refresh.

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

9 years agorbd-mirror: don't use temporary string for snap operation
Jason Dillaman [Mon, 2 May 2016 12:42:35 +0000 (08:42 -0400)]
rbd-mirror: don't use temporary string for snap operation

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

9 years agolibrbd: avoid recursive locking within operation state machine
Jason Dillaman [Mon, 2 May 2016 12:31:54 +0000 (08:31 -0400)]
librbd: avoid recursive locking within operation state machine

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

9 years agoMerge pull request #8869 from Abhishekvrshny/wip-15669-jewel
Jason Dillaman [Tue, 10 May 2016 16:47:01 +0000 (12:47 -0400)]
Merge pull request #8869 from Abhishekvrshny/wip-15669-jewel

jewel: Errors encountered disabling object-map while flatten is in-progress

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8870 from Abhishekvrshny/wip-15668-jewel
Jason Dillaman [Tue, 10 May 2016 16:46:12 +0000 (12:46 -0400)]
Merge pull request #8870 from Abhishekvrshny/wip-15668-jewel

jewel: rbd disk-usage CLI command should support calculating full image usage

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8868 from Abhishekvrshny/wip-15666-jewel
Jason Dillaman [Tue, 10 May 2016 16:35:41 +0000 (12:35 -0400)]
Merge pull request #8868 from Abhishekvrshny/wip-15666-jewel

jewel: rbd CLI to retrieve rbd mirror state for a pool / specific image

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

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9046 from dillaman/wip-fix-snapc-validation-jewel
Jason Dillaman [Tue, 10 May 2016 16:33:33 +0000 (12:33 -0400)]
Merge pull request #9046 from dillaman/wip-fix-snapc-validation-jewel

jewel: librbd: put the validation of image snap context earlier

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: put the validation of image snap context earlier 9046/head
runsisi [Wed, 20 Apr 2016 01:55:39 +0000 (09:55 +0800)]
librbd: put the validation of image snap context earlier

we'd better validate the snap context right after we got the mutable
metadata before we could go any further

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

9 years agoMerge pull request #8867 from Abhishekvrshny/wip-15661-jewel
Jason Dillaman [Tue, 10 May 2016 16:31:10 +0000 (12:31 -0400)]
Merge pull request #8867 from Abhishekvrshny/wip-15661-jewel

jewel: Parent image is closed twice if error encountered while opening

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8866 from Abhishekvrshny/wip-15660-jewel
Jason Dillaman [Tue, 10 May 2016 16:30:12 +0000 (12:30 -0400)]
Merge pull request #8866 from Abhishekvrshny/wip-15660-jewel

jewel: rbd-mirror can crash if start up is interrupted

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #9044 from dillaman/wip-librbd-bad-header-jewel
Jason Dillaman [Tue, 10 May 2016 16:29:02 +0000 (12:29 -0400)]
Merge pull request #9044 from dillaman/wip-librbd-bad-header-jewel

jewel: librbd: does not crash if image header is too short

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: does not crash if image header is too short 9044/head
Kefu Chai [Wed, 27 Apr 2016 16:59:34 +0000 (00:59 +0800)]
librbd: does not crash if image header is too short

if something goes wrong with the object, and returns a chunk shorter
than expected, don't panic

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7b52183addda83f98c8b1f37d3de20ca0fc4687b)

9 years agoMerge pull request #8803 from SUSE/wip-15605-jewel
Jason Dillaman [Tue, 10 May 2016 16:26:48 +0000 (12:26 -0400)]
Merge pull request #8803 from SUSE/wip-15605-jewel

jewel: Potential double free of SetSnapRequest instance

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agoMerge pull request #8865 from Abhishekvrshny/wip-15649-jewel
Jason Dillaman [Tue, 10 May 2016 16:16:09 +0000 (12:16 -0400)]
Merge pull request #8865 from Abhishekvrshny/wip-15649-jewel

jewel: possible double-free of object map invalidation request upon error

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
9 years agolibrbd: assertion to ensure no concurrent processing of replay events 9040/head
Jason Dillaman [Fri, 6 May 2016 15:16:37 +0000 (11:16 -0400)]
librbd: assertion to ensure no concurrent processing of replay events

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

9 years agojournal: suppress notifications if client still in try_pop_front loop
Jason Dillaman [Fri, 6 May 2016 15:05:50 +0000 (11:05 -0400)]
journal: suppress notifications if client still in try_pop_front loop

One such example is popping the last entry from an object.  The next
object will be automatically prefetched.  When that object is received,
we do not want to alert the user that entries are available since
try_pop_front already indicated more records were available.

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

9 years agolibrbd: delay processing of next journal entry until flush in-progress
Jason Dillaman [Fri, 6 May 2016 13:47:01 +0000 (09:47 -0400)]
librbd: delay processing of next journal entry until flush in-progress

When replaying a journal flush event, do not start processing the next
journal entry until after the flush is in progress to ensure the barrier
is correctly guarding against future writes.

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

9 years agoMerge pull request #8930 from theanalyst/wip-15707-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:31:02 +0000 (08:31 -0700)]
Merge pull request #8930 from theanalyst/wip-15707-jewel

jewel: multisite: Issues with Deleting Buckets

9 years agoMerge pull request #9029 from theanalyst/wip-15680
Yehuda Sadeh [Tue, 10 May 2016 15:30:52 +0000 (08:30 -0700)]
Merge pull request #9029 from theanalyst/wip-15680

jewel: rgw: radosgw-admin zone set cuts pool names short if name starts with a period

9 years agoMerge pull request #9022 from yehudasa/wip-rgw-leak-3-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:30:03 +0000 (08:30 -0700)]
Merge pull request #9022 from yehudasa/wip-rgw-leak-3-jewel

jewel: rgw: leak fixes

9 years agoMerge pull request #9021 from yehudasa/wip-rgw-xstorageurl-fix-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:29:52 +0000 (08:29 -0700)]
Merge pull request #9021 from yehudasa/wip-rgw-xstorageurl-fix-jewel

jewel: rgw: fix printing wrong X-Storage-Url in Swift's TempAuth.

9 years agoMerge pull request #9020 from yehudasa/wip-15597-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:29:27 +0000 (08:29 -0700)]
Merge pull request #9020 from yehudasa/wip-15597-jewel

jewel: rgw: fix issue #15597

9 years agoMerge pull request #9019 from yehudasa/wip-rgw-admin-zonegroup-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:29:18 +0000 (08:29 -0700)]
Merge pull request #9019 from yehudasa/wip-rgw-admin-zonegroup-jewel

jewel: radosgw-admin: add missing --zonegroup-id to usage

9 years agoMerge pull request #9018 from yehudasa/wip-15626-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:29:03 +0000 (08:29 -0700)]
Merge pull request #9018 from yehudasa/wip-15626-jewel

rgw: add AWS4 completion support for RGW_OP_SET_BUCKET_WEBSITE

9 years agoMerge pull request #9017 from yehudasa/wip-15625-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:28:50 +0000 (08:28 -0700)]
Merge pull request #9017 from yehudasa/wip-15625-jewel

jewel: rgw: segfault at RGWAsyncGetSystemObj

9 years agoMerge pull request #9016 from yehudasa/wip-rgw-admin-modify-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:28:37 +0000 (08:28 -0700)]
Merge pull request #9016 from yehudasa/wip-rgw-admin-modify-jewel

jewel: radosgw-admin: update usage for zone[group] modify

9 years agoMerge pull request #9015 from yehudasa/wip-rgw-zonegroup-remove-jewel
Yehuda Sadeh [Tue, 10 May 2016 15:27:56 +0000 (08:27 -0700)]
Merge pull request #9015 from yehudasa/wip-rgw-zonegroup-remove-jewel

jewel: radosgw-admin: zonegroup remove command

9 years agojournal: incorrectly computed object offset within set 9038/head
Jason Dillaman [Mon, 9 May 2016 15:22:48 +0000 (11:22 -0400)]
journal: incorrectly computed object offset within set

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

9 years agotest: update rbd integration cram test to remove format 1 warning 9003/head
Jason Dillaman [Tue, 10 May 2016 12:33:03 +0000 (08:33 -0400)]
test: update rbd integration cram test to remove format 1 warning

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

9 years agorgw: fix suffix in RGWZoneParams::fix_pool_names() 9029/head
Yehuda Sadeh [Mon, 25 Apr 2016 22:09:47 +0000 (15:09 -0700)]
rgw: fix suffix in RGWZoneParams::fix_pool_names()

Fixes: http://tracker.ceph.com/issues/15598
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 6f6b0c925994b0369eda390a6b3fd20005e70c9b)

9 years agorgw: code cleanup 9020/head
Yehuda Sadeh [Mon, 9 May 2016 21:23:03 +0000 (14:23 -0700)]
rgw: code cleanup

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

9 years agorgw: upgrade default zonegroup and set correct zone[group] id
Yehuda Sadeh [Tue, 26 Apr 2016 18:31:43 +0000 (11:31 -0700)]
rgw: upgrade default zonegroup and set correct zone[group] id

Fixes: http://tracker.ceph.com/issues/15597
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 27806c71922eef2f4cde360d7ba40dee9d5bd4bd)

9 years agorgw: RGWHTTPClient requests can unregister themselves early 9022/head
Yehuda Sadeh [Thu, 5 May 2016 17:57:05 +0000 (10:57 -0700)]
rgw: RGWHTTPClient requests can unregister themselves early

No need to wait for req_state to complete anymore.

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

Conflicts:
src/rgw/rgw_http_client.cc

9 years agorgw: move around sync_env.init()
Yehuda Sadeh [Thu, 5 May 2016 01:08:38 +0000 (18:08 -0700)]
rgw: move around sync_env.init()

call sync_env.init() even if we're initalized in RGWRemoteDataLog::init()

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

9 years agorgw: rados crs, explicit cleanup
Yehuda Sadeh [Tue, 3 May 2016 19:01:55 +0000 (12:01 -0700)]
rgw: rados crs, explicit cleanup

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

9 years agorgw: RGWHTTPManager, avoid referring to req_data->client when completing
Yehuda Sadeh [Tue, 3 May 2016 19:00:46 +0000 (12:00 -0700)]
rgw: RGWHTTPManager, avoid referring to req_data->client when completing

this is past calling req_data->finish(), client can be destroyed by now

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

9 years agorgw: civetweb_callback() refer to store inside lock
Yehuda Sadeh [Tue, 3 May 2016 18:59:11 +0000 (11:59 -0700)]
rgw: civetweb_callback() refer to store inside lock

pe->store might change when reconfiguring

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

9 years agorgw: RGWPeriodPusher, stop http manager explicitly
Yehuda Sadeh [Tue, 3 May 2016 17:03:14 +0000 (10:03 -0700)]
rgw: RGWPeriodPusher, stop http manager explicitly

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

9 years agorgw: RGWHTTPManager, can call stop() more than once
Yehuda Sadeh [Tue, 3 May 2016 17:02:02 +0000 (10:02 -0700)]
rgw: RGWHTTPManager, can call stop() more than once

destructor calls stop(), but it can be also called explicitly, if caller
wants to ensure requests are not being handled anymore.

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

9 years agorgw: RGWReadRESTResourceCR, fix refcounting
Yehuda Sadeh [Tue, 3 May 2016 17:01:33 +0000 (10:01 -0700)]
rgw: RGWReadRESTResourceCR, fix refcounting

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

9 years agorgw: RGWReadRemoteDataLogShardCR fix destructor
Yehuda Sadeh [Tue, 3 May 2016 16:59:47 +0000 (09:59 -0700)]
rgw: RGWReadRemoteDataLogShardCR fix destructor

was missing destructor, constructor was broken

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

9 years agorgw: RGWDataSyncStatusManager, cleanup if failing init
Yehuda Sadeh [Tue, 3 May 2016 01:13:17 +0000 (18:13 -0700)]
rgw: RGWDataSyncStatusManager, cleanup if failing init

init can be called more than once, ended up with leaking some resources

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

9 years agorgw: rest crs, explicitly call cleanup
Yehuda Sadeh [Fri, 29 Apr 2016 20:04:13 +0000 (13:04 -0700)]
rgw: rest crs, explicitly call cleanup

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

9 years agorgw: more leaks fixes
Yehuda Sadeh [Fri, 29 Apr 2016 00:03:21 +0000 (17:03 -0700)]
rgw: more leaks fixes

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

9 years agorgw: drop a reference to http op
Yehuda Sadeh [Wed, 27 Apr 2016 23:39:36 +0000 (16:39 -0700)]
rgw: drop a reference to http op

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

9 years agorgw: fix printing wrong X-Storage-Url in Swift's TempAuth. 9021/head
Radoslaw Zarzynski [Sun, 24 Apr 2016 15:41:55 +0000 (17:41 +0200)]
rgw: fix printing wrong X-Storage-Url in Swift's TempAuth.

If the option "rgw_swift_account_in_url" is being set to true,
both user and subuser IDs will be present in the X-Storage-Url
header generated by the implementation of Swift API's TempAuth.
This patch rectifies this behavior and makes that only the user
identifier will be placed there.

Fixes: http://tracker.ceph.com/issues/15667
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 88f4c67d822388d2038454a25ead7e9a11f404b5)

9 years agoradosgw-admin: add missing --zonegroup-id to usage 9019/head
Casey Bodley [Tue, 26 Apr 2016 19:20:45 +0000 (15:20 -0400)]
radosgw-admin: add missing --zonegroup-id to usage

also clarified that --rgw-zone takes the zone by name

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Reported-by: John Wilkins <jowilkin@redhat.com>
(cherry picked from commit 97fad754565b262529073e1b9f8d1799bfdfe0de)

9 years agorgw: don't allow any concurrent sync requests on the same key 9017/head
Yehuda Sadeh [Wed, 27 Apr 2016 22:09:55 +0000 (15:09 -0700)]
rgw: don't allow any concurrent sync requests on the same key

We used to allow concurrent requests, as long as these had different op,
which wasn't correct.

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