]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
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 )
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>
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>
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>
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 )
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 )
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 )
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 )
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 )
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>
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>
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>
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>
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 )
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>
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>
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>
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 )
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>
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>
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
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
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
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.
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
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
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
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
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
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
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 )
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 )
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 )
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
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
Yehuda Sadeh [Tue, 26 Apr 2016 22:59:33 +0000 (15:59 -0700)]
rgw: collect children after waiting for them
Otherwise we're going to busy loop there.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
806fb85d18653910863ba6b8cb56b8db1a0fa3d2 )
Yehuda Sadeh [Tue, 26 Apr 2016 22:29:41 +0000 (15:29 -0700)]
rgw: don't pass object context into async coroutines
Fixes: http://tracker.ceph.com/issues/15625
The async read data/attrs coroutines may outlive the callers. Instead
of introducing a complicated refcounting scheme, just don't pass it in.
Anyway, it was not thread safe, and the benefit of using it is not
clear.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
b225d1758057efc30721aad25447d54fa36e4cb2 )
Yehuda Sadeh [Fri, 22 Apr 2016 00:24:16 +0000 (17:24 -0700)]
rgw: check for status >= 0
Fixes: #15565
check only verified that status was > 0, so we ended not updating mtime for
the target object. This resulted in a continuous sync of objects.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
255f19d9ef964536f2db17f70749f489330262a6 )
Yehuda Sadeh [Fri, 22 Apr 2016 21:23:22 +0000 (14:23 -0700)]
rgw: don't try to delete object if does not exist
If we know that the object does not exist, no need to remove it.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
8d59a30d56b5f197a293f7fba6ebb1a630a33a05 )
Yehuda Sadeh [Fri, 22 Apr 2016 18:55:28 +0000 (11:55 -0700)]
rgw, cls/rgw: store removed object mtime in bi log
Store the mtime of the object that was removed in the bucket index log.
This will be used in data sync.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
80d64049937e1930ea8273fdad76a51493a5e14a )
Javier M. Mellid [Wed, 27 Apr 2016 18:28:08 +0000 (20:28 +0200)]
rgw: add AWS4 completion support for RGW_OP_SET_BUCKET_WEBSITE
Fixes: http://tracker.ceph.com/issues/15626
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit
05373354e4725c3fc675df652fbf97da26160bcb )
Casey Bodley [Wed, 27 Apr 2016 22:06:45 +0000 (18:06 -0400)]
radosgw-admin: update usage for zone[group] modify
the help strings indicated that only --master could be changed
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
410d432d11541a29c3fd4608a070cecf8dc2766e )
Casey Bodley [Fri, 6 May 2016 18:26:46 +0000 (14:26 -0400)]
test/rgw: add test_zonegroup_remove
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
e2b27c7266f0ace372dbf94e062598fd7a575795 )
Casey Bodley [Fri, 6 May 2016 18:26:23 +0000 (14:26 -0400)]
test/rgw: index zones by name instead of insertion order
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
6327ade12bf0255c3b35bd6407f1dd2bcc6936fa )
Casey Bodley [Mon, 2 May 2016 15:38:24 +0000 (11:38 -0400)]
radosgw-admin: add missing 'zonegroup remove'
Fixes: http://tracker.ceph.com/issues/15684
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
db0fa48ed5958d37928f893acd44cd66b6b9b990 )
Casey Bodley [Mon, 2 May 2016 15:36:58 +0000 (11:36 -0400)]
rgw: RGWZoneGroup::remove_zone() takes zone id
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
3a451511fb38a5f1cd83ca3610c91141e7279f63 )
Sage Weil [Mon, 9 May 2016 17:54:58 +0000 (13:54 -0400)]
Merge pull request #9006 from athanatos/wip-15655-jewel
OSDMonitor: avoid underflow in reweight-by-utilization if max_change=1
Reviewed-by: Sage Weil <sage@redhat.com>
YongQiang [Fri, 22 Apr 2016 15:20:31 +0000 (11:20 -0400)]
rbd:make a distinction of help message between ''rbd snap rollback" and "rbd snap revert"
Fixes: https://tracker.ceph.com/issues/15521
Signed-off-by: Yongqiang He <he.yongqiang@h3c.com>
(cherry picked from commit
1bf26509c6efd06a8facc0e45ab42255592ca74d )
xie xingguo [Tue, 26 Apr 2016 07:12:17 +0000 (15:12 +0800)]
osdc/Objecter: fix race condition for sortbitwise flag detection
During list_objects/list_nobjects(), we are checking osdmap's
sortbitwise flag setting without holding rwlock in hand, which
is a potential race condition.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit
7fb6be706be2454cc2a831df29808997f0aa5ab3 )
Jason Dillaman [Mon, 2 May 2016 19:06:51 +0000 (15:06 -0400)]
librbd: default clone operation to image format 2
Image format 1 doesn't support clones, so unless the user
overrode the setting, default to format 2.
Fixes: http://tracker.ceph.com/issues/15685
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
f24c70f54343aa6698af8ac1f0774282b0659968 )
Jason Dillaman [Mon, 2 May 2016 18:51:31 +0000 (14:51 -0400)]
librbd: add rbd_image_options_is_set helper method to API
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
2633b045e0b57827cc10c2e7707bd5a5e344e59a )
Abhishek Lekshmanan [Tue, 19 Apr 2016 13:20:53 +0000 (15:20 +0200)]
rgw_op: pass delete bucket op to master zone first
Basically first ask the master to process a delete bucket request before
we process it in the zone locally, otherwise we reach a situation where
we drop the bucket locally and master will still maintain an index
Fixes: http://tracker.ceph.com/issues/15540
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit
da6b44a6e47399493adae53ad3c36a029f1e2a23 )
Abhishek Lekshmanan [Tue, 19 Apr 2016 13:20:07 +0000 (15:20 +0200)]
rgw: add errno entry for -ENOTEMPTY
currently if master returns an -ENOTEMTPY, we return a -EIO as we dont
have an entry for this
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit
40c3bfef8cc3bce7d15fbb0e135c1a909ee59368 )
Alexandre Derumier [Thu, 28 Apr 2016 20:48:52 +0000 (22:48 +0200)]
fix deb package /etc/default/ceph location
commit
7384a14f243519547a61534d22e21e6069aae016 have introduce
the /etc/default/ceph file at a wrong location : /etc/default/ceph/ceph
(cherry picked from commit
13804fafd4c33068d8ed6d0480b594daec0f9341 )
xie xingguo [Tue, 26 Apr 2016 03:13:32 +0000 (11:13 +0800)]
mon/OSDMonitor: improve reweight_by_utilization() logic
By calling reweight_by_utilization() method, we are aiming at an evener result
of utilization among all osds. To achieve this, we shall decrease weights of
osds which are currently overloaded, and try to increase weights of osds which
are currently underloaded when it is possible.
However, we can't do this all at a time in order to avoid a massive pg migrations
between osds. Thus we introduce a max_osds limit to smooth the progress.
The problem here is that we have sorted the utilization of all osds in a descending
manner and we always try to decrease the weights of the most overloaded osds
since they are most likely to encounter a nearfull/full transition soon, but
we won't increase the weights from the most underloaded(least utilized by contrast)
at the same time, which I think is not quite reasonable.
Actually, the best thing would probably be to iterate over teh low and high osds
in parallel, and do the ones that are furthest from the average first.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit
e7a32534ebc9e27f955ff2d7a8d1db511383301e )
xie xingguo [Mon, 25 Apr 2016 07:43:03 +0000 (15:43 +0800)]
mon/OSDMonitor: avoid potential expensive grace calculation
The grace calculation during check_failure() is now very complicated
and time-consuming. Therefore we shall skip this when it is possible.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit
3557903d5d57642179b2ae137bedc389974b1956 )
Sage Weil [Sat, 30 Apr 2016 02:01:56 +0000 (22:01 -0400)]
mon/OSDMonitor: max_osds must be > 0 for reweight-by-*
Include a few test cases.
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
84bd0dce18f6dd0c35d7e6cfee91ce8c5a0f4db7 )
John Spray [Tue, 3 May 2016 13:05:23 +0000 (08:05 -0500)]
Merge pull request #8787 from xiaoxichen/wip-15631
jewel: CephFSVolumeClient should isolate volumes by RADOS namespace
Reviewed-by: John Spray <john.spray@redhat.com>
Samuel Just [Thu, 28 Apr 2016 20:47:48 +0000 (13:47 -0700)]
OSDMonitor: avoid underflow in reweight-by-utilization if max_change=1
Fixes: http://tracker.ceph.com/issues/15655
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit
c121bc51a5a877a49094cfbd3bd16af1f3ae5090 )
Jason Dillaman [Thu, 28 Apr 2016 19:53:59 +0000 (15:53 -0400)]
rbd: disk usage now includes all snapshots by default
Added a new "--from-snap" optional to restrict the calculation to
specific subsets of snapshots and the HEAD revision.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
1ccdcb5b6c1cfd176a86df4f115a88accc81b4d0 )
Jason Dillaman [Thu, 28 Apr 2016 16:48:59 +0000 (12:48 -0400)]
librbd: block RPC requests while updating features
Disabling the journal and object map require acquiring the exclusive
lock locally. We don't want to start executing long-running ops
for this quick process.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
db7aaff0f6d7a57e2b36d22b609f915f9b2b3893 )
Jason Dillaman [Thu, 28 Apr 2016 16:43:24 +0000 (12:43 -0400)]
librbd: return -ESHUTDOWN when a refresh is requested on a closed image
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
ed132a1eb10e6b2eb4bc465658eb0379daca3d67 )
Jason Dillaman [Thu, 28 Apr 2016 16:42:49 +0000 (12:42 -0400)]
librbd: synchronous block_writes should return possible error result
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
88e76cb3c9a74b4718ad39c827f2194666f5be2a )
Jason Dillaman [Thu, 28 Apr 2016 15:46:20 +0000 (11:46 -0400)]
librbd: refresh image before executing maint op
If a maint op is interrupted and restarted, it's possible that the
image will need to be refreshed.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
9cf6821bd9f58c181720a5c8156cec5ab33d35d4 )
Jason Dillaman [Thu, 28 Apr 2016 15:10:25 +0000 (11:10 -0400)]
librbd: reduce log level when lock owner not detected
This can happen under normal operating conditions and the
lock request is automatically retried.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
5a4893b7a7e50cc399696e1d0cb4d4f8785e723d )
Jason Dillaman [Thu, 28 Apr 2016 14:52:15 +0000 (10:52 -0400)]
librbd: reduce log level for interrupted maint ops
Fixes: http://tracker.ceph.com/issues/15572
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
1617328402345c68bf5d54828da6d687e51ef42b )
Mykola Golub [Sun, 24 Apr 2016 16:39:40 +0000 (19:39 +0300)]
qa/workunits/rbd: test mirror status in pool directory
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
f15cd51a1ddbd4079a8218bc2446a4bf68f95107 )
Mykola Golub [Thu, 21 Apr 2016 06:52:47 +0000 (09:52 +0300)]
rbd-mirror: in replay status store number of entries behind master
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
e4229d1d4b163f1003e68fef1db63f796393ba23 )
Mykola Golub [Fri, 15 Apr 2016 05:42:17 +0000 (08:42 +0300)]
librbd: API to retrieve image mirroring status
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
a2045d61874f9e418b5b3c3136af4482603c8e7f )
Mykola Golub [Wed, 6 Apr 2016 11:57:29 +0000 (14:57 +0300)]
test: MockJournaler: add get_cached_client method
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
7633407ab584ce8c7777a525554773c2a358ce5f )
Mykola Golub [Tue, 5 Apr 2016 11:42:09 +0000 (14:42 +0300)]
rbd: CLI to retrieve rbd mirror state for a pool / specific image
Fixes: #15144
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
fe5207278d884464c05d6808245a0c4df03c441c )
Mykola Golub [Tue, 5 Apr 2016 11:40:50 +0000 (14:40 +0300)]
rbd-mirror: store replay status in mirroring object
Fixes: #14420
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
52b2fe14cfc932b2aa53ce76a3150ce87ce4d377 )
Mykola Golub [Tue, 5 Apr 2016 11:25:11 +0000 (14:25 +0300)]
test: cls_rbd: methods to store/retrieve mirroring status
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
8aefad59813489cee112f46b3fe10331bb039b57 )
Mykola Golub [Tue, 5 Apr 2016 11:24:07 +0000 (14:24 +0300)]
cls::rbd:: methods to store/retrieve mirroring status
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
17dd40df4f4201cf0c0c6d58b1728177c5ee726b )
Mykola Golub [Fri, 1 Apr 2016 05:27:03 +0000 (08:27 +0300)]
objclass: add method to list watchers
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit
44a31d2b770ef016271f9285447c601921b9c838 )
Boris Ranto [Mon, 2 May 2016 06:35:09 +0000 (08:35 +0200)]
Merge pull request #8843 from SUSE/wip-msd-typo-fix-jewel
systemd: fix typo in preset file
Reviewed-by: Boris Ranto <branto@redhat.com>
Jason Dillaman [Wed, 27 Apr 2016 19:56:11 +0000 (15:56 -0400)]
librbd: propagate any image refresh errors back to caller
Previously, the saved error code was only propagated when an image
flush was required.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
105ef8a24aa6ac8719f68c5a9366129ddb41ee88 )
Jason Dillaman [Wed, 27 Apr 2016 19:45:25 +0000 (15:45 -0400)]
librbd: avoid second close attempt of invalid parent image
Fixes: http://tracker.ceph.com/issues/15574
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
e91e7f8d9ce10f0d19c48facfb6318d6b49798e8 )
Jason Dillaman [Wed, 27 Apr 2016 19:22:59 +0000 (15:22 -0400)]
rbd-mirror: interrupting image replay startup can cause crash
Properly shut down the journaler if a shut down has been requested
while start up is in-progress.
Fixes: http://tracker.ceph.com/issues/15630
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
3a71052a5b14af34ed81f6ee77f862f576a7a5cc )
runsisi [Thu, 28 Apr 2016 01:05:33 +0000 (09:05 +0800)]
librbd: fix potential assertion for object map invalidation
if update_flags fails we should not go any further, or the async request
will be removed from m_image_ctx.async_requests twice
Signed-off-by: runsisi <runsisi@zte.com.cn>
(cherry picked from commit
dd0eb719a50e9fb24eca5a840c2e8adb53be41b2 )
Nathan Cutler [Sat, 30 Apr 2016 14:21:13 +0000 (16:21 +0200)]
systemd: fix typo in preset file
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit
80be4a8cbf1d42232ff61494d035e7abd90c2c14 )
Nathan Cutler [Sat, 30 Apr 2016 14:21:13 +0000 (16:21 +0200)]
systemd: fix typo in preset file
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit
80be4a8cbf1d42232ff61494d035e7abd90c2c14 )
Boris Ranto [Fri, 29 Apr 2016 06:22:01 +0000 (08:22 +0200)]
Merge pull request #8801 from SUSE/wip-15633-jewel
jewel: ceph-{mds,mon,osd} packages need scriptlets with systemd code
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
runsisi [Thu, 21 Apr 2016 06:48:55 +0000 (14:48 +0800)]
librbd: fix potential double free of SetSnapRequest instance
if image feature EXCLUSIVE_LOCK is not enabled we should not try to
initialize the exclusive lock, or we may end with two async Contexts
to finish the same SetSnapRequest instance
Fixes: http://tracker.ceph.com/issues/15571
Signed-off-by: runsisi <runsisi@zte.com.cn>
(cherry picked from commit
0a6eaac12fe29762c3dd29068f9427840cfea100 )
Boris Ranto [Wed, 27 Apr 2016 16:10:51 +0000 (18:10 +0200)]
rpm: Add rpm scripts for ceph-rbd-mirror
We are currently missing the systemd scripts for the new ceph-rbd-mirror
daemons. This patch introduces them.
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit
14652f32165f72efde569a939179fc26584ab155 )
Boris Ranto [Wed, 27 Apr 2016 16:00:08 +0000 (18:00 +0200)]
rpm: Start all the targets in %post
We need to have the sub-targets active for the ceph.target to be able
to propagate its calls to the services. If the sub-target is inactive,
the main target won't propagate the stop/restart calls.
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit
73f457986753b504fd088c1fa064608aa9d340c9 )