]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agotests: AioCompletion incorrectly freed 4566/head
Jason Dillaman [Mon, 27 Apr 2015 07:43:10 +0000 (03:43 -0400)]
tests: AioCompletion incorrectly freed

The AioCompletion should be released instead of directly
deleted.

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

10 years agolibrbd: update ref count when queueing AioCompletion
Jason Dillaman [Mon, 27 Apr 2015 07:42:24 +0000 (03:42 -0400)]
librbd: update ref count when queueing AioCompletion

If the client releases the AioCompletion while librbd is waiting
to acquire the exclusive lock, the memory associated with the
completion will be freed too early.

Fixes: #11478
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit fd7723a1e62e682ac5a5279231a9fd6f5682bf94)

10 years agoceph_json: add decode / encoder for multimap
Yehuda Sadeh [Mon, 13 Apr 2015 23:33:17 +0000 (16:33 -0700)]
ceph_json: add decode / encoder for multimap

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

10 years agocls_rgw: use multimap to keep pending operations in bucket index
Yehuda Sadeh [Tue, 31 Mar 2015 00:34:57 +0000 (17:34 -0700)]
cls_rgw: use multimap to keep pending operations in bucket index

Fixes: #11256
Multiple concurrent requests might be sent using the same tag, need the
entry map to be able to hold multiple entries.

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

10 years agorgw: generate new tag for object when setting object attrs
Yehuda Sadeh [Fri, 27 Mar 2015 23:32:48 +0000 (16:32 -0700)]
rgw: generate new tag for object when setting object attrs

Fixes: #11256
Backport: firefly, hammer

Beforehand we were reusing the object's tag, which is problematic as
this tag is used for bucket index updates, and we might be clobbering a
racing update (like object removal).

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

10 years agojava: libcephfs_jni.so is in /usr/lib64 on rhel
Noah Watkins [Sat, 28 Mar 2015 02:34:12 +0000 (19:34 -0700)]
java: libcephfs_jni.so is in /usr/lib64 on rhel

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
(cherry picked from commit aed3434dc7c5161c72c7d5655faa3bc693fc9777)

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMerge pull request #4498 from dachary/wip-11342-hammer
Loic Dachary [Mon, 4 May 2015 21:58:37 +0000 (23:58 +0200)]
Merge pull request #4498 from dachary/wip-11342-hammer

librbd notification race condition on snap_create

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4497 from dachary/wip-7385-hammer
Loic Dachary [Mon, 4 May 2015 21:58:18 +0000 (23:58 +0200)]
Merge pull request #4497 from dachary/wip-7385-hammer

Objectcacher setting max object counts too low

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4499 from dachary/wip-11363-hammer
Loic Dachary [Mon, 4 May 2015 21:57:48 +0000 (23:57 +0200)]
Merge pull request #4499 from dachary/wip-11363-hammer

ImageWatcher should cancel in-flight ops on watch error

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4496 from dachary/wip-5488-hammer
Loic Dachary [Mon, 4 May 2015 21:57:17 +0000 (23:57 +0200)]
Merge pull request #4496 from dachary/wip-5488-hammer

librbd: deadlock in image refresh

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
10 years agoMerge pull request #4505 from dachary/wip-11322-hammer
Loic Dachary [Mon, 4 May 2015 14:31:24 +0000 (16:31 +0200)]
Merge pull request #4505 from dachary/wip-11322-hammer

rgw - improve performance for large object (multiple chunks) GET

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #4501 from dachary/wip-11001-hammer
Loic Dachary [Mon, 4 May 2015 14:24:53 +0000 (16:24 +0200)]
Merge pull request #4501 from dachary/wip-11001-hammer

Improve rgw HEAD request by avoiding read the body of the first chunk

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #4500 from dachary/wip-11047-hammer
Loic Dachary [Mon, 4 May 2015 14:23:28 +0000 (16:23 +0200)]
Merge pull request #4500 from dachary/wip-11047-hammer

rgw : make quota/gc thread configurable for starting

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoMerge pull request #4504 from dachary/wip-10691-hammer
Loic Dachary [Mon, 4 May 2015 09:46:13 +0000 (11:46 +0200)]
Merge pull request #4504 from dachary/wip-10691-hammer

ceph-dencoder links to libtcmalloc, and shouldn't

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4503 from dachary/wip-10983-hammer
Loic Dachary [Mon, 4 May 2015 09:44:11 +0000 (11:44 +0200)]
Merge pull request #4503 from dachary/wip-10983-hammer

use a new disk as journal disk,ceph-disk prepare fail

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4507 from dachary/wip-11432-hammer
Loic Dachary [Mon, 4 May 2015 09:43:23 +0000 (11:43 +0200)]
Merge pull request #4507 from dachary/wip-11432-hammer

compilation error: No high-precision counter available (armhf, powerpc..)

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4515 from ceph/hammer-next
Sage Weil [Fri, 1 May 2015 00:10:29 +0000 (17:10 -0700)]
Merge pull request #4515 from ceph/hammer-next

rgw: critical fixes for hammer

10 years agoMerge pull request #4462 from liewegas/wip-11211-hammer
Samuel Just [Thu, 30 Apr 2015 16:23:53 +0000 (09:23 -0700)]
Merge pull request #4462 from liewegas/wip-11211-hammer

osd/ReplicatedPG: don't check order in finish_proxy_read

10 years agorgw-admin: a tool to fix object locator issue 4515/head
Yehuda Sadeh [Wed, 22 Apr 2015 22:39:05 +0000 (15:39 -0700)]
rgw-admin: a tool to fix object locator issue

Objects that start with underscore need to have an object locator,
this is due to an old behavior that we need to retain. Some objects
might have been created without the locator. This tool creates a new
rados object with the appropriate locator.

Syntax:

$ ./radosgw-admin bucket check --check-head-obj-locator \
                               --bucket=<bucket> [--fix]

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

10 years agorgw: set a special object locator if object starts with underscore
Yehuda Sadeh [Wed, 22 Apr 2015 00:31:41 +0000 (17:31 -0700)]
rgw: set a special object locator if object starts with underscore

Fixes: #11442
Backport: hammer

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

10 years agorgw: use correct oid when creating gc chains
Yehuda Sadeh [Thu, 23 Apr 2015 22:33:03 +0000 (15:33 -0700)]
rgw: use correct oid when creating gc chains

Fixes: #11447
Backport: hammer

When creating gc chain, use the appropriate oid, otherwise objects will
leak.

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

10 years agorgw: civetweb should use unique request id
Orit Wasserman [Thu, 23 Apr 2015 15:36:47 +0000 (17:36 +0200)]
rgw: civetweb should use unique request id

max_req_id was moved to RGWRados and changed to atomic64_t.

The same request id resulted in gc giving the same idtag to all objects
resulting in a leakage of rados objects. It only kept the last deleted object in
it's queue, the previous objects were never freed.

Fixes: 10295
Backport: Hammer, Firefly

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit c26225980c2fd018e70033a453d635533fcdefec)

10 years agoMerge pull request #4506 from dachary/wip-11381-hammer
Gregory Farnum [Wed, 29 Apr 2015 22:02:56 +0000 (15:02 -0700)]
Merge pull request #4506 from dachary/wip-11381-hammer

messenger: double clear of pipe in reaper

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoMove ceph-dencoder build to client 4504/head
Boris Ranto [Mon, 13 Apr 2015 10:38:58 +0000 (12:38 +0200)]
Move ceph-dencoder build to client

The patch simply moves the ceph-dencoder build from server part of the
Makefiles to client part of the Makefiles.

Refs: #10691

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit ef2164725f0b55ffa4b609d407eed5f3f3048b46)

10 years agoRework mds/Makefile.am to support a dencoder client build
Boris Ranto [Mon, 13 Apr 2015 13:07:03 +0000 (15:07 +0200)]
Rework mds/Makefile.am to support a dencoder client build

The patch adds all the mds sources to DENCODER_SOURCES to allow a
dencoder client build. The patch also splits the Makefile.am file to
better accomodate the change.

Refs: #10691

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit c2b3a35fb3cbf28d46a5427f32fbaff142c85f2a)

Conflicts:
        src/mds/Makefile-server.am
src/mds/Makefile.am
        because the mds/StrayManager.h file was added after hammer

10 years agoAdd support for PPC architecture, provide fallback 4507/head
James Page [Fri, 13 Mar 2015 19:46:04 +0000 (19:46 +0000)]
Add support for PPC architecture, provide fallback

Add high precision cpu cycles support for powerpc and powerpc64.

Provide a fallback for other architectures and warn during
compilation.

Signed-off-by: James Page <james.page@ubuntu.com>
(cherry picked from commit b2781fb5638afae7438b983a912ede126a8c5b85)

10 years agoFix clear_pipe after reaping progress 4506/head
Haomai Wang [Fri, 17 Apr 2015 14:07:00 +0000 (22:07 +0800)]
Fix clear_pipe after reaping progress

In pipe.cc:1353 we stop this connection and we will let reader and write threads stop. If now reader and writer quit ASAP and we call queue_reap to trigger the reap progress. Now we haven't call "connection_state->clear_pipe(this)" in pipe.cc:1379, so we may assert failure  here.

Fixes: #11381
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
(cherry picked from commit 0ea0e011a6a6c6d6b40f5d97328bbad0e4568dd7)

10 years agorgw : Issue AIO for next chunk first before flush the (cached) data. 4505/head
Guang Yang [Fri, 3 Apr 2015 12:27:04 +0000 (12:27 +0000)]
rgw : Issue AIO for next chunk first before flush the (cached) data.

When handling GET request for large object (with multiple chunks), currently it will first flush the
cached data, and then issue AIO request for next chunk, this has the potential issue to make the retriving
from OSD and sending to client serialized. This patch switch the two operations.

Fixes: 11322
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit 366e8a85c0e9f00eed364eaebbfb6b672852eae9)

10 years agorgw/Makefile.am: Populate DENCODER_SOURCES properly
Boris Ranto [Mon, 13 Apr 2015 10:33:00 +0000 (12:33 +0200)]
rgw/Makefile.am: Populate DENCODER_SOURCES properly

Dencoder is built if ENABLE_CLIENT is set. However, the rgw/Makefile.am
populated DENCODER_SOURCES only if WITH_RADOSGW was set. The patch fixes
this and populates DENCODER_SOURES if ENABLE_CLIENT is set.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 0b264331f57b64880ce05fe3bd752e8df226d00c)

10 years agoDencoder should never be built with tcmalloc
Boris Ranto [Mon, 13 Apr 2015 10:32:30 +0000 (12:32 +0200)]
Dencoder should never be built with tcmalloc

The patch adds disabled perfglue stubs to DENCODER sources in order to
avoid tcmalloc-enabled ceph-dencoder builds.

Refs: #10691

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit fb11c74d1dc3843f2f5b6dca9c76278c5ceeca1c)

10 years agoceph-disk: more robust parted output parser 4503/head
Loic Dachary [Sun, 8 Mar 2015 14:15:35 +0000 (15:15 +0100)]
ceph-disk: more robust parted output parser

In some cases, depending on the implementation or the operating system,

   parted --machine -- /dev/sdh print

may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.

http://tracker.ceph.com/issues/10983 Fixes: #10983

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

10 years agorgw: do not pre-fetch data for HEAD requests 4501/head
Guang Yang [Tue, 3 Mar 2015 09:46:52 +0000 (09:46 +0000)]
rgw: do not pre-fetch data for HEAD requests

Backport: hammer

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit e32da3e7c880eaf7cb84d1c078447b28e1d8052b)

10 years agorgw - make starting quota/gc threads configurable 4500/head
Guang Yang [Wed, 4 Feb 2015 03:21:52 +0000 (03:21 +0000)]
rgw - make starting quota/gc threads configurable

Fixes: 11047
Backport: hammer

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit a88712aeb4e7cd4208b9a707aa3bd4d03340c3ff)

10 years agolibrbd: ImageWatcher should cancel in-flight ops on watch error 4499/head
Jason Dillaman [Fri, 20 Mar 2015 15:56:55 +0000 (11:56 -0400)]
librbd: ImageWatcher should cancel in-flight ops on watch error

Upon an watch error notification from librados, pending requests
should be canceled and in-flight IO should be flushed prior to
unlocking the image.

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

10 years agolibrbd: moved snap_create header update notification to initiator 4498/head
Jason Dillaman [Tue, 7 Apr 2015 19:39:13 +0000 (15:39 -0400)]
librbd: moved snap_create header update notification to initiator

When handling a proxied snap_create operation, the client which
invoked the snap_create should send the header update notification
to avoid a possible race condition where snap_create completes but
the client doesn't see the new snapshot (since it didn't yet receive
the notification).

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

10 years agolibrbd: updated cache max objects calculation 4497/head
Jason Dillaman [Wed, 22 Apr 2015 15:27:35 +0000 (11:27 -0400)]
librbd: updated cache max objects calculation

The previous calculation was based upon the image's object size.
Since the cache stores smaller bufferheads, the object size is not
a good indicator of cache usage and was resulting in objects being
evicted from the cache too often.  Instead, base the max number of
objects on the memory load required to store the extra metadata
for the objects.

Fixes: #7385
Backport: firefly, hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0b378942c4f1b79cb65967f2d3466728ca1c8d5b)

Conflicts:
src/librbd/ImageCtx.cc
        because hammer has cct->_conf->rbd_cache_size
        instead of cache_size

10 years agolibrbd: acquire cache_lock before refreshing parent 4496/head
Jason Dillaman [Mon, 16 Mar 2015 15:04:22 +0000 (11:04 -0400)]
librbd: acquire cache_lock before refreshing parent

cache_lock needs to be acquired before snap_lock to avoid
the potential for deadlock.

Fixes: #5488
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 703ba377e3de4007920f2ed7d8a0780f68676fe2)

Conflicts:
src/librbd/internal.cc
        resolved by moving int r; in the scope of the block

10 years agolibrados_test_stub: AIO operation callbacks should be via Finisher
Jason Dillaman [Fri, 13 Mar 2015 22:08:47 +0000 (18:08 -0400)]
librados_test_stub: AIO operation callbacks should be via Finisher

librados will execute all AIO callbacks via a single finisher to
prevent blocking the Objecter.  Reproduce this behavior to avoid
deadlocks that only exist when using the test stub.

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

10 years agoMerge pull request #4463 from ceph/wip-11453-hammer-rgw-init-as-root
Sage Weil [Fri, 24 Apr 2015 23:13:56 +0000 (16:13 -0700)]
Merge pull request #4463 from ceph/wip-11453-hammer-rgw-init-as-root

rgw: init-radosgw: run RGW as root

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoinit-radosgw: run RGW as root 4463/head
Ken Dreyer [Wed, 22 Apr 2015 22:36:42 +0000 (16:36 -0600)]
init-radosgw: run RGW as root

The ceph-radosgw service fails to start if the httpd package is not
installed. This is because the init.d file attempts to start the RGW
process with the "apache" UID. If a user is running civetweb, there is
no reason for the httpd or apache2 package to be present on the system.

Switch the init scripts to use "root" as is done on Ubuntu.

http://tracker.ceph.com/issues/11453 Refs: #11453

Reported-by: Vickey Singh <vickey.singh22693@gmail.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit 47339c5ac352d305e68a58f3d744c3ce0fd3a2ac)

10 years agoosd/ReplicatedPG: don't check order in finish_proxy_read 4462/head
Zhiqiang Wang [Tue, 24 Mar 2015 08:00:16 +0000 (16:00 +0800)]
osd/ReplicatedPG: don't check order in finish_proxy_read

Read doesn't need to be ordered. So when proxy read comes back from base
tier, it's not necessarily at the front of the in progress list.

Fixes: #11211
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
(cherry picked from commit 560a5839c0d1852b5816937b845b60390777636c)

10 years agoFix ceph_test_async_driver failed
Haomai Wang [Sun, 22 Mar 2015 15:59:19 +0000 (23:59 +0800)]
Fix ceph_test_async_driver failed

This test will create 10000 sockets which will failed because of limited system fd. Actually we only need to create several hundreds sockets and it's enough to get the test's goal.

Fix bug #11198(cherry picked from commit cd11daa2d21b7b059df9877cad38432678bb6161)

10 years agorgw: remove meta file after deleting bucket
Orit Wasserman [Fri, 3 Apr 2015 11:43:31 +0000 (13:43 +0200)]
rgw: remove meta file after deleting bucket
The meta file is deleted only if the bucket meta data is not synced

Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Fixes: #11149
Backport: hammer, firefly
(cherry picked from commit dfdc7afb59cc8e32cf8bff55faa09076c853de06)

10 years agoMerge pull request #4332 from dachary/wip-11217-hammer
Loic Dachary [Tue, 14 Apr 2015 18:58:40 +0000 (20:58 +0200)]
Merge pull request #4332 from dachary/wip-11217-hammer

tests: TestFlatIndex.cc races with TestLFNIndex.cc

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4357 from dachary/wip-release-notes-hammer
Sage Weil [Tue, 14 Apr 2015 16:05:53 +0000 (09:05 -0700)]
Merge pull request #4357 from dachary/wip-release-notes-hammer

release-notes: backport Hammer release notes

10 years agorelease-notes: backport Hammer release notes 4357/head
Loic Dachary [Tue, 14 Apr 2015 09:30:43 +0000 (11:30 +0200)]
release-notes: backport Hammer release notes

Include the Hammer release notes in Hammer.

Cherry picking the Hammer release notes cannot be done cleanly, they are
copy/pasted instead. This will allow cherry-picking the release notes
for the next point releases. It should be undisturbed by the release
notes for other point releases because they modify parts of the file
that will not generate cherry-pick conflicts.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
10 years ago0.94.1 v0.94.1
Jenkins [Fri, 10 Apr 2015 19:04:50 +0000 (12:04 -0700)]
0.94.1

10 years agoMerge pull request #4328 from dachary/wip-11364-hammer
Loic Dachary [Fri, 10 Apr 2015 15:51:38 +0000 (17:51 +0200)]
Merge pull request #4328 from dachary/wip-11364-hammer

v4 bucket feature detection

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agocrush: fix has_v4_buckets() 4328/head
Sage Weil [Fri, 10 Apr 2015 15:43:45 +0000 (08:43 -0700)]
crush: fix has_v4_buckets()

alg, not type!

This bug made us incorrectly think we were using v4 features when user type
5 was being used.  That's currently 'rack' with recent crush maps, but
was other types for clusters that were created with older versions.  This
is clearly problematic as it will lock out non-hammer clients incorrectly,
breaking deployments on upgrade.

Fixes: #11364
Backport: hammer
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 38b35ab9d17eb84ac178c4cd3ebcf2ec0f66d8b6)

10 years agocrush: fix dump of has_v4_buckets
Sage Weil [Fri, 10 Apr 2015 00:17:59 +0000 (17:17 -0700)]
crush: fix dump of has_v4_buckets

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

10 years agobug fix: test case for lfn index 4332/head
Xinze Chi [Tue, 24 Mar 2015 10:42:04 +0000 (18:42 +0800)]
bug fix: test case for lfn index

tests: TestFlatIndex.cc races with TestLFNIndex.cc
Both use the same PATH and when run in parallel they sometime conflict.

Fixes: #11217
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>
(cherry picked from commit 791c3879d62b848616972f9c6d921aac30ac4925)

10 years agocrush/mapper: fix divide-by-0 in straw2
Sage Weil [Thu, 9 Apr 2015 21:42:34 +0000 (14:42 -0700)]
crush/mapper: fix divide-by-0 in straw2

If the item weight is 0 we don't want to divide; instead draw a minimal
value.

Fixes: #11357
Reported-by: Yann Dupont <yd@objoo.org>
Tested-by: Yann Dupont <yd@objoo.org>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 64d1e900ec4f5831972ec80e8d0129604669f5bb)

10 years agoosd: fix negative degraded objects during backfilling
Guang Yang [Thu, 26 Feb 2015 08:13:12 +0000 (08:13 +0000)]
osd: fix negative degraded objects during backfilling

When there is deleting requests during backfilling, the reported number of degraded
objects could be negative, as the primary's num_objects is the latest (locally) but
the number for replicas might not reflect the deletings. A simple fix is to ignore
the negative subtracted value.

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
(cherry picked from commit 14d7e36d3c978844da73d0e1c8a3a1ec863bac15)

10 years ago0.94 v0.94
Jenkins [Tue, 7 Apr 2015 17:05:41 +0000 (10:05 -0700)]
0.94

10 years agodebian: remove lttng checking from rules
Josh Durgin [Mon, 6 Apr 2015 18:08:33 +0000 (11:08 -0700)]
debian: remove lttng checking from rules

This can be done better in a separate script, which puts these in
CEPH_EXTRA_CONFIGURE_ARGS. In particular, this lets us enable
lttng for gitbuilder builds, but not release builds.

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

10 years agoMerge pull request #4246 from ceph/wip-11113-hammer
Sage Weil [Mon, 6 Apr 2015 15:55:51 +0000 (08:55 -0700)]
Merge pull request #4246 from ceph/wip-11113-hammer

librbd: snap_remove should ignore -ENOENT errors

10 years agoMerge pull request #4250 from athanatos/wip-11265
Sage Weil [Mon, 6 Apr 2015 15:07:28 +0000 (08:07 -0700)]
Merge pull request #4250 from athanatos/wip-11265

ECTransaction: write out the hinfo key on touch as well

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4251 from athanatos/wip-11284
Sage Weil [Mon, 6 Apr 2015 15:07:15 +0000 (08:07 -0700)]
Merge pull request #4251 from athanatos/wip-11284

ReplicatedPG::promote_object: do not create obc if not promoting

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4167 from dzafman/wip-11184
Samuel Just [Thu, 2 Apr 2015 04:03:37 +0000 (21:03 -0700)]
Merge pull request #4167 from dzafman/wip-11184

Fix 11184 by filtering the log

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agolibrbd: snap_remove should ignore -ENOENT errors 4246/head
Jason Dillaman [Mon, 16 Mar 2015 22:40:49 +0000 (18:40 -0400)]
librbd: snap_remove should ignore -ENOENT errors

If the attempt to deregister the snapshot from the parent
image fails with -ENOENT, ignore the error as it is safe
to assume that the child is not associated with the parent.

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

10 years agolibrbd: get_parent_info should protect against invalid parent
Jason Dillaman [Mon, 16 Mar 2015 22:35:07 +0000 (18:35 -0400)]
librbd: get_parent_info should protect against invalid parent

get_parent_info should return -ENOENT if the image does not
have an associated parent image.

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

10 years agoMerge pull request #4230 from athanatos/wip-11244
Samuel Just [Tue, 31 Mar 2015 16:47:10 +0000 (09:47 -0700)]
Merge pull request #4230 from athanatos/wip-11244

ReplicatedPG::cancel_pull: requeue waiters as well

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4219 from liewegas/wip-scrub-mtime
Samuel Just [Tue, 31 Mar 2015 16:45:46 +0000 (09:45 -0700)]
Merge pull request #4219 from liewegas/wip-scrub-mtime

osd: do not update mtime when recording digest

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4229 from athanatos/wip-scrub-hitsets
Sage Weil [Tue, 31 Mar 2015 16:39:32 +0000 (09:39 -0700)]
Merge pull request #4229 from athanatos/wip-scrub-hitsets

ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4228 from athanatos/wip-11280
Sage Weil [Tue, 31 Mar 2015 16:38:48 +0000 (09:38 -0700)]
Merge pull request #4228 from athanatos/wip-11280

Wip 11280

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4207 from ceph/wip-11177
Samuel Just [Tue, 31 Mar 2015 16:26:56 +0000 (09:26 -0700)]
Merge pull request #4207 from ceph/wip-11177

common: fix logging default channel to be 'cluster' not 'default' (11177)

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoReplicatedPG::cancel_pull: requeue waiters as well 4230/head
Samuel Just [Thu, 26 Mar 2015 17:26:48 +0000 (10:26 -0700)]
ReplicatedPG::cancel_pull: requeue waiters as well

If we are in recovery_wait, we might not recover that object as part of
recover_primary for some time.  Worse, if we are waiting on a backfill
which is blocked waiting on a copy_from on the missing object in
question, it can become a dead lock.

Fixes: 11244
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoReplicatedPG: don't write hitset while scrubbing, update scrub_cstat 4229/head
Samuel Just [Sun, 29 Mar 2015 22:30:52 +0000 (15:30 -0700)]
ReplicatedPG: don't write hitset while scrubbing, update scrub_cstat

Fixes: 11263
Fixes: 11262
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoReplicatedPG: in do_op, requeue op if we requeue waiters in agent_choose_mode 4228/head
Samuel Just [Mon, 30 Mar 2015 21:04:29 +0000 (14:04 -0700)]
ReplicatedPG: in do_op, requeue op if we requeue waiters in agent_choose_mode

The current op might be ordered after a waiter.

Fixes: 11280
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoReplicatedPG: requeue waiting_for_active before waiting_for_cache_not_full
Samuel Just [Mon, 30 Mar 2015 20:22:26 +0000 (13:22 -0700)]
ReplicatedPG: requeue waiting_for_active before waiting_for_cache_not_full

The waiting_for_cache_not_full waiters must be dequeued first.

Fixes: 11267
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoReplicatedPG::promote_object: do not create obc if not promoting 4251/head
Samuel Just [Tue, 31 Mar 2015 15:41:09 +0000 (08:41 -0700)]
ReplicatedPG::promote_object: do not create obc if not promoting

Otherwise, we can leave an incorrect cached obc around.

Introduced: 65bb4df599541cd2e0f195b905f24f529e255c00
Fixes: 11284
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoECTransaction: write out the hinfo key on touch as well 4250/head
Samuel Just [Sun, 29 Mar 2015 22:46:59 +0000 (15:46 -0700)]
ECTransaction: write out the hinfo key on touch as well

This way, even empty objects have the hinfo key written.  That way,
touch and touch->append->truncate end up with the same state.

Fixes: 11265
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoosd: drop unused utime_t now arg to issue_repop 4219/head
Sage Weil [Mon, 30 Mar 2015 14:13:43 +0000 (07:13 -0700)]
osd: drop unused utime_t now arg to issue_repop

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: do not update mtime when recording digest
Jianpeng Ma [Mon, 30 Mar 2015 14:17:40 +0000 (07:17 -0700)]
osd: do not update mtime when recording digest

The user mtime and local_mtime are normally set in finish_ctx based on the
value of ctx->mtime; clear that to avoid this update.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
[Sage: simplified]
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4131 from t-miyamae/wip-mshec-documentation-h2
Loic Dachary [Mon, 30 Mar 2015 12:37:08 +0000 (14:37 +0200)]
Merge pull request #4131 from t-miyamae/wip-mshec-documentation-h2

erasure code: add shec's documentation / change default layout

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agotest: Add testing for PGLog::filter_log() 4167/head
David Zafman [Fri, 27 Mar 2015 05:32:25 +0000 (22:32 -0700)]
test: Add testing for PGLog::filter_log()

Indirectly tests pg_log_t::filter_log()

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoosd: Create a filter_log for PGLog
David Zafman [Thu, 26 Mar 2015 22:49:16 +0000 (15:49 -0700)]
osd: Create a filter_log for PGLog

This could be tested as a way to test pg_log_t::filter_log()

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoceph-objectstore-tool, osd: Filter the pg_log_t for objects no longer in pg
David Zafman [Thu, 26 Mar 2015 22:53:42 +0000 (15:53 -0700)]
ceph-objectstore-tool, osd: Filter the pg_log_t for objects no longer in pg

Fixes: #11184
Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agocommon: send cluster log messages to 'cluster' channel by default 4207/head
Sage Weil [Fri, 27 Mar 2015 22:35:21 +0000 (15:35 -0700)]
common: send cluster log messages to 'cluster' channel by default

The CLOG_CHANNEL_DEFAULT constant was being abused for two purposes:

 - the default channel to log messages to
 - the name of the config option key in the key/value pair string that is
   used for the default option, e.g. "default=true foo=false bar=false"

Fix this by making the config option key CLOG_CONFIG_DEFAULT_KEY and
replacing throughout, and changing CLOG_CHANNEL_DEFAULT to "cluster" (as
it should be and has been historically).

Fixes: #11177
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4194 from athanatos/wip-11199
Sage Weil [Fri, 27 Mar 2015 15:15:29 +0000 (08:15 -0700)]
Merge pull request #4194 from athanatos/wip-11199

ReplicatedPG: trim backfill intervals based on peer's last_backfill_star...

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4195 from athanatos/wip-11197
Sage Weil [Fri, 27 Mar 2015 15:10:20 +0000 (08:10 -0700)]
Merge pull request #4195 from athanatos/wip-11197

PG: set/clear CREATING in Primary state entry/exit

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4196 from athanatos/wip-move-code
Kefu Chai [Fri, 27 Mar 2015 02:24:22 +0000 (10:24 +0800)]
Merge pull request #4196 from athanatos/wip-move-code

osd: Wip move code

Reviewed-by: Kefu Chai <kchai@redhat.com>
10 years agoceph-objectstore-tool: Fix message and make it debug only to stderr
David Zafman [Tue, 24 Mar 2015 22:12:31 +0000 (15:12 -0700)]
ceph-objectstore-tool: Fix message and make it debug only to stderr

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoceph-objectstore-tool: Remove bogus comment and eliminate a debug message
David Zafman [Thu, 26 Mar 2015 22:54:48 +0000 (15:54 -0700)]
ceph-objectstore-tool: Remove bogus comment and eliminate a debug message

Signed-off-by: David Zafman <dzafman@redhat.com>
10 years agoosd/: Move ReplicatedBackend methods into ReplicatedBackend.cc 4196/head
Samuel Just [Thu, 26 Mar 2015 17:50:19 +0000 (10:50 -0700)]
osd/: Move ReplicatedBackend methods into ReplicatedBackend.cc

Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoReplicatedPG: remove unused C_OnPushCommit
Samuel Just [Thu, 26 Mar 2015 17:44:00 +0000 (10:44 -0700)]
ReplicatedPG: remove unused C_OnPushCommit

Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoPG: set/clear CREATING in Primary state entry/exit 4195/head
Samuel Just [Tue, 24 Mar 2015 17:48:02 +0000 (10:48 -0700)]
PG: set/clear CREATING in Primary state entry/exit

Previously, we did not actually set it when we got a pg creation message from
the mon.  It would actually get set on the first start_peering_interval after
that point.  If we don't get that far, but do send a stat update to the mon, we
can end up with 11197.  Instead, let's just set it and clear it upon entry into
and exit from the Primary state.

Fixes: 11197
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4128 from dzafman/wip-11139-hammer
Samuel Just [Wed, 25 Mar 2015 15:29:31 +0000 (08:29 -0700)]
Merge pull request #4128 from dzafman/wip-11139-hammer

ceph-objectstore-tool: Use exit status 11 for incompatible import attemp...

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4124 from ceph/wip-omap-clear
Samuel Just [Wed, 25 Mar 2015 15:27:59 +0000 (08:27 -0700)]
Merge pull request #4124 from ceph/wip-omap-clear

osd: fix omap_clear handling

Reviewed-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4170 from ceph/hammer-11205
Gregory Farnum [Wed, 25 Mar 2015 04:35:29 +0000 (21:35 -0700)]
Merge pull request #4170 from ceph/hammer-11205

qa/workunits/fs/misc: fix filelock_interrupt.py

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
10 years agoqa/workunits/fs/misc: fix filelock_interrupt.py 4170/head
Yan, Zheng [Mon, 2 Mar 2015 13:04:25 +0000 (21:04 +0800)]
qa/workunits/fs/misc: fix filelock_interrupt.py

Handle the case that kernel does not support fcntl.F_OFD_SETLK.
Also fix the code that checks if fnctl fails with errno == EINTR.

Fixes: 11205
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 4ececa3dc4a21b98f61a592da9e2be60a0d71625)

10 years agoReplicatedPG: trim backfill intervals based on peer's last_backfill_started 4194/head
Samuel Just [Tue, 24 Mar 2015 22:14:34 +0000 (15:14 -0700)]
ReplicatedPG: trim backfill intervals based on peer's last_backfill_started

Otherwise, we fail to trim the peer's last_backfill_started and get bug 11199.

1) osd 4 backfills up to 31bccdb2/mira01213209-286/head (henceforth: foo)

2) Interval change happens

3) osd 0 now finds itself backfilling to 4 (lb=foo) and osd.5
(lb=b6670ba2/mira01213209-160/snapdir//1, henceforth: bar)

4) recover_backfill causes both 4 and 5 to scan forward, so 4 has an interval
starting at foo, 5 has an interval starting at bar.

5) Once those have come back, recover_backfill attempts to trim off the
last_backfill_started, but 4's interval starts after that, so foo remains in
osd 4's interval (this is the bug)

7) We serve a copyfrom on foo (sent to 4 as well).

8) We eventually get to foo in the backfilling. Normally, they would have the
same version, but of course we don't update osd.4's interval from the log since
it should not have received writes in that interval. Thus, we end up trying to
recover foo on osd.4 anyway.

9) But, an interval change happens between removing foo from osd.4 and
completing the recovery, leaving osd.4 without foo, but with lb >= foo

Fixes: #11199
Backport: firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4162 from athanatos/wip-11156
Sage Weil [Tue, 24 Mar 2015 19:15:21 +0000 (12:15 -0700)]
Merge pull request #4162 from athanatos/wip-11156

ReplicatedPG::promote_object: check scrubber and block if necessary

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4163 from athanatos/wip-revert-degraded-writes
Samuel Just [Tue, 24 Mar 2015 16:31:13 +0000 (09:31 -0700)]
Merge pull request #4163 from athanatos/wip-revert-degraded-writes

Wip revert degraded writes

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #4152 from ceph/wip-11145
Sage Weil [Tue, 24 Mar 2015 01:11:08 +0000 (18:11 -0700)]
Merge pull request #4152 from ceph/wip-11145

rgw: shut down timer before erroring out

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agorgw: shut down timer before erroring out 4152/head
Yehuda Sadeh [Mon, 23 Mar 2015 23:21:14 +0000 (16:21 -0700)]
rgw: shut down timer before erroring out

Fixes: #11145
Backport: hammer

Clean up initialization timer, otherwise if we error out, we'll assert.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoReplicatedPG::promote_object: check scrubber and block if necessary 4162/head
Samuel Just [Fri, 20 Mar 2015 22:28:15 +0000 (15:28 -0700)]
ReplicatedPG::promote_object: check scrubber and block if necessary

Otherwise, we might attempt to promote into an in-progress scrub
interval causing 11156.  I would have added a return value to
promote_object(), but could not find an existing user which
cared to distinguish the cases, even with a null op passed.
All existing users are in maybe_handle_cache.  The ones which
pass a null op are for promoting the object in parallel
with a proxy -- a case where not actually performing the promote
does not really matter.

Fixes: #11156
Signed-off-by: Samuel Just <sjust@redhat.com>
10 years agoMerge pull request #4125 from dzafman/wip-11176-hammer
Loic Dachary [Mon, 23 Mar 2015 19:37:14 +0000 (20:37 +0100)]
Merge pull request #4125 from dzafman/wip-11176-hammer

ceph-objectstore-tool: Output only unsupported features when incomatible

Reviewed-by: Loic Dachary <ldachary@redhat.com>
10 years agoMerge pull request #4145 from ceph/wip-hammer-rgw
Sage Weil [Mon, 23 Mar 2015 19:30:47 +0000 (12:30 -0700)]
Merge pull request #4145 from ceph/wip-hammer-rgw

Wip hammer rgw

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoosd/: s/is_degraded_object/is_degraded_or_backfilling_object 4163/head
Samuel Just [Tue, 17 Feb 2015 18:16:57 +0000 (10:16 -0800)]
osd/: s/is_degraded_object/is_degraded_or_backfilling_object

Currently, this method also returns true if the object is backfilling.
This commit was reverted earlier in the branch in order to make the
other reverts clean.  It's actually a nice rename though, so I'm
re-cherry-picking it.

Signed-off-by: Samuel Just <sjust@redhat.com>
Conflicts:
src/osd/ReplicatedPG.cc