]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agoFileStore: Introduced a RLock instead of WLock 2070/head
Somnath Roy [Thu, 31 Jul 2014 22:03:53 +0000 (15:03 -0700)]
FileStore: Introduced a RLock instead of WLock

While calling index->collection_version, there is no need to
hold WLock at the index level. RLock should be sufficient.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoFileStore: No need to hold Index lock during omap calls
Somnath Roy [Thu, 31 Jul 2014 21:56:42 +0000 (14:56 -0700)]
FileStore: No need to hold Index lock during omap calls

The Index lock is held during all the omap calls which is
not necessary.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoFileStore: FDCache lookup is rearranged
Somnath Roy [Mon, 30 Jun 2014 08:54:36 +0000 (01:54 -0700)]
FileStore: FDCache lookup is rearranged

In lfn_open() there is no point of building the Index if the
cache lookup is successful and caller is not asking for Index.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoFileStore: Index caching is introduced for performance improvement
Somnath Roy [Mon, 30 Jun 2014 08:28:07 +0000 (01:28 -0700)]
FileStore: Index caching is introduced for performance improvement

IndexManager now has a Index caching. Index will only be created if not
found in the cache. Earlier, each op is creating an Index object and other
ops requesting the same index needed to wait till previous op is done.
Also, after finishing lookup, this Index object was destroyed.
Now, a Index cache is been implemented to persists these Indexes since
there is a major performance hit because each op is creating and destroying
these. A RWlock is been introduced in the CollectionIndex class and that is
responsible for sync between lookup and create.
Also, since these Index objects are persistent there is no need to use
smart pointers. So, Index is a wrapper class of CollecIndex* now.
It is the responsibility of the users of Index now to lock explicitely
before using them. Index object is sufficient now for locking and no need
to hold IndexPath for locking. The function interfaces of lfn_open,lfn_find
are changed accordingly.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoshared_cache: pass key (K) by const ref in interface methods
Somnath Roy [Mon, 30 Jun 2014 07:24:39 +0000 (00:24 -0700)]
shared_cache: pass key (K) by const ref in interface methods

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoFileStore: remove the fdcache_lock
Greg Farnum [Thu, 30 Jan 2014 22:27:04 +0000 (14:27 -0800)]
FileStore: remove the fdcache_lock

With the changes to the shared_cache, we no longer need the fdcache_lock
to prevent us from inserting a second fd for the same hobject into the cache.

Signed-off-by: Greg Farnum <greg@inktank.com>
Merged conflict fixed.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Conflicts:
src/os/FileStore.cc

10 years agoFDCache: implement a basic sharding of the FDCache
Greg Farnum [Mon, 3 Feb 2014 22:36:02 +0000 (14:36 -0800)]
FDCache: implement a basic sharding of the FDCache

This is just a basic sharding. A more sophisticated implementation would
rely on something other than luck for keeping the distribution equitable.
The minimum FDCache shard size is 1.

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoshared_cache: expose prior existence when inserting an element
Greg Farnum [Thu, 30 Jan 2014 22:21:52 +0000 (14:21 -0800)]
shared_cache: expose prior existence when inserting an element

The LRU now handles you attempting to insert multiple values for the
same key, by telling you that you've done so and returning the
existing value before it manages to muck up existing data.
The param 'existed' is not mandatory, default value is NULL.

Signed-off-by: Greg Farnum <greg@inktank.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
10 years agoshared_cache: use a single lookup for lookup() too
Greg Farnum [Thu, 30 Jan 2014 21:47:22 +0000 (13:47 -0800)]
shared_cache: use a single lookup for lookup() too

We didn't convert this one to use iterators before.

Signed-off-by: Greg Farnum <greg@inktank.com>
10 years agoqa/workunits/cephtool: verify setmaxosd doesn't let you clobber osds
Sage Weil [Thu, 14 Aug 2014 20:18:07 +0000 (13:18 -0700)]
qa/workunits/cephtool: verify setmaxosd doesn't let you clobber osds

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoOSDMonitor: Do not allow OSD removal using setmaxosd
Anand Bhat [Thu, 14 Aug 2014 04:22:56 +0000 (09:52 +0530)]
OSDMonitor: Do not allow OSD removal using setmaxosd

Description: Currently setmaxosd command allows removal of OSDs by providing
a number less than current max OSD number. This causes abrupt removal of
OSDs causing data loss as well as kernel panic when kernel RBDs are involved.
Fix is to avoid removal of OSDs if any of the OSDs in the range between
current max OSD number and new max OSD number is part of the cluster.

Fixes: #8865
Signed-off-by: Anand Bhat <anand.bhat@sandisk.com>
10 years agoMerge pull request #2251 from ceph/wip-9102
Sage Weil [Thu, 14 Aug 2014 15:36:29 +0000 (08:36 -0700)]
Merge pull request #2251 from ceph/wip-9102

ceph-disk: linter cleanup

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2255 from ceph/wip-9062
Sage Weil [Thu, 14 Aug 2014 13:50:07 +0000 (06:50 -0700)]
Merge pull request #2255 from ceph/wip-9062

msg/PipeConnection: make methods behave on 'anon' connection

Reviewed-by: John Spray <john.spray@redhat.com>
10 years agoMerge remote-tracking branch 'origin/next'
John Spray [Thu, 14 Aug 2014 13:44:06 +0000 (14:44 +0100)]
Merge remote-tracking branch 'origin/next'

10 years agoMerge pull request #2254 from ceph/wip-8725
John Spray [Thu, 14 Aug 2014 13:29:40 +0000 (14:29 +0100)]
Merge pull request #2254 from ceph/wip-8725

mds: fix MDSMap encoding to be backward-compatible

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: John Spray <john.spray@redhat.com>
10 years agodoc: update kernel recommendations (avoid 3.15!)
Sage Weil [Thu, 14 Aug 2014 13:09:50 +0000 (06:09 -0700)]
doc: update kernel recommendations (avoid 3.15!)

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomsg/PipeConnection: make methods behave on 'anon' connection 2255/head
Sage Weil [Thu, 14 Aug 2014 00:52:25 +0000 (17:52 -0700)]
msg/PipeConnection: make methods behave on 'anon' connection

The monitor does a create_anon_connection() to create a pseudo Connection
object for forwarded messages.  If we try to call mark_down or similar
on one of these we should silently ignore the operation, not crash.

If we try to send a message, still crash (explicitly assert); the caller
should probably know better.

Fixes: #9062
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomds/MDSMap: fix incompat version for encoding 2254/head
Sage Weil [Wed, 13 Aug 2014 22:05:05 +0000 (15:05 -0700)]
mds/MDSMap: fix incompat version for encoding

Back in 8f7900a09c8e490c9cd3a6f92ed1f0eb1f47f2a9 we added the new fields
before the 'extended' section, which made the encoding incompatible.
Instead, add them at the end--old clients don't care whether the enabled
flag is set or what the 'fs name' is.

Fixes: #8725
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomds/MDSMap: drop trailing else in favor of early return
Sage Weil [Wed, 13 Aug 2014 22:03:03 +0000 (15:03 -0700)]
mds/MDSMap: drop trailing else in favor of early return

This keeps the old-version special cases in one place and make it obvious
what the current/forward-looking path is.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'upstream/next'
Samuel Just [Wed, 13 Aug 2014 21:11:12 +0000 (14:11 -0700)]
Merge remote-tracking branch 'upstream/next'

10 years agoMerge pull request #2252 from ceph/wip-9087
Samuel Just [Wed, 13 Aug 2014 21:10:45 +0000 (14:10 -0700)]
Merge pull request #2252 from ceph/wip-9087

test/system/systest_runnable.cc: debugging on start and end

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 13 Aug 2014 21:10:31 +0000 (14:10 -0700)]
Merge remote-tracking branch 'gh/next'

10 years agotest/system/systest_runnable.cc: debugging on start and end 2252/head
Samuel Just [Wed, 13 Aug 2014 20:57:13 +0000 (13:57 -0700)]
test/system/systest_runnable.cc: debugging on start and end

Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoceph-disk: linter cleanup 2251/head
Alfredo Deza [Wed, 13 Aug 2014 19:50:20 +0000 (15:50 -0400)]
ceph-disk: linter cleanup

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agomon: fix divide by zero when pg_num adjusted and no osds
Sage Weil [Wed, 13 Aug 2014 20:31:10 +0000 (13:31 -0700)]
mon: fix divide by zero when pg_num adjusted and no osds

Fixes: #9052
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: fix potential divide by zero on can_mark_{down,out}
Sage Weil [Wed, 13 Aug 2014 20:15:04 +0000 (13:15 -0700)]
mon: fix potential divide by zero on can_mark_{down,out}

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: fix divide by zero when pg_num adjusted and no osds
Sage Weil [Wed, 13 Aug 2014 20:15:36 +0000 (13:15 -0700)]
mon: fix divide by zero when pg_num adjusted and no osds

Fixes: #9101
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon: fix potential divide by zero on can_mark_{down,out}
Sage Weil [Wed, 13 Aug 2014 20:15:04 +0000 (13:15 -0700)]
mon: fix potential divide by zero on can_mark_{down,out}

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2236 from ceph/wip-9055
Sage Weil [Wed, 13 Aug 2014 19:54:40 +0000 (12:54 -0700)]
Merge pull request #2236 from ceph/wip-9055

ceph_test_rados_api_tier: fix cache pool cleanup during test

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2222 from ceph/wip-9029
Sage Weil [Wed, 13 Aug 2014 19:40:58 +0000 (12:40 -0700)]
Merge pull request #2222 from ceph/wip-9029

mds: Make min/max UID configurable for who is allowed to create a snapsh...

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomds: Revert from mds_mksnap_ setting to mds_snap_ settings 2222/head
Wido den Hollander [Wed, 13 Aug 2014 19:07:59 +0000 (21:07 +0200)]
mds: Revert from mds_mksnap_ setting to mds_snap_ settings

10 years agoMerge pull request #2249 from ceph/wip-9096
Samuel Just [Wed, 13 Aug 2014 17:48:32 +0000 (10:48 -0700)]
Merge pull request #2249 from ceph/wip-9096

osd: fix require_same_peer_instance from fast_dispatch

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agoosd/ReplicatedPG: only do agent mode calculations for positive values
Sage Weil [Wed, 13 Aug 2014 17:34:53 +0000 (10:34 -0700)]
osd/ReplicatedPG: only do agent mode calculations for positive values

After a split we can get negative values here.  Only do the arithmetic if
we have a valid (positive) value that won't through the floating point
unit for a loop.

Fixes: #9082
Tested-by: Karan Singh <karan.singh@csc.fi>
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: fix some line wrapping 2249/head
Sage Weil [Wed, 13 Aug 2014 16:38:07 +0000 (09:38 -0700)]
osd: fix some line wrapping

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: fix require_same_peer_instance from fast_dispatch
Sage Weil [Wed, 13 Aug 2014 15:30:25 +0000 (08:30 -0700)]
osd: fix require_same_peer_instance from fast_dispatch

The mark-down of old peers needs to take the session_dispatch_lock in order
to safely clear the Session ref cycle.  However, for fast dispatch callers,
that lock is already held.  Pass a flag down from the callers indicating
whether we need to take the additional lock.

Fixes: #9096
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: inline require_osd_up_peer
Sage Weil [Wed, 13 Aug 2014 15:20:42 +0000 (08:20 -0700)]
osd: inline require_osd_up_peer

There is only one caller.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2233 from majianpeng/fix1
Sage Weil [Wed, 13 Aug 2014 04:22:25 +0000 (21:22 -0700)]
Merge pull request #2233 from majianpeng/fix1

os/chain_xattr: Remove all old xattr entry when overwrite the xattr.

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2230 from ceph/wip-fsx-flatten
Sage Weil [Wed, 13 Aug 2014 04:17:12 +0000 (21:17 -0700)]
Merge pull request #2230 from ceph/wip-fsx-flatten

test_librbd_fsx: also flatten as part of randomize_parent_overlap

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2234 from kevincox/net-docs
Sage Weil [Wed, 13 Aug 2014 04:14:10 +0000 (21:14 -0700)]
Merge pull request #2234 from kevincox/net-docs

doc: Initial network docs.

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2237 from ceph/wip-8560
Sage Weil [Wed, 13 Aug 2014 04:06:16 +0000 (21:06 -0700)]
Merge pull request #2237 from ceph/wip-8560

mon: instrument paxos

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
10 years agomon/Paxos: add perfcounters for most paxos operations 2237/head
Sage Weil [Sun, 10 Aug 2014 21:41:19 +0000 (14:41 -0700)]
mon/Paxos: add perfcounters for most paxos operations

I'm focusing primarily on the ones that result in IO here.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2242 from majianpeng/fix4
Sage Weil [Wed, 13 Aug 2014 04:01:09 +0000 (21:01 -0700)]
Merge pull request #2242 from majianpeng/fix4

utime: Because class Clock didn't exist,so remove the declaration in class utime_t

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoRevert "ReplicatedPG: do not pass cop into C_Copyfrom"
Samuel Just [Tue, 12 Aug 2014 23:34:30 +0000 (16:34 -0700)]
Revert "ReplicatedPG: do not pass cop into C_Copyfrom"

The ref was introduced in 589b639af7c8834a1e6293d58d77a9c440107bc3
and is actually necessary to keep the buffers around.

This reverts commit 300b5e8ecbb7526b55e2cb5eeba81fd501a8b652.

10 years agoReplicatedPG: do not pass cop into C_Copyfrom
Samuel Just [Tue, 12 Aug 2014 19:20:28 +0000 (12:20 -0700)]
ReplicatedPG: do not pass cop into C_Copyfrom

We do not know when the objecter will finally let go of this Context.  Thus, we
cannot know whether it will happen before the flush, at which point the
object_context held by the cop must have been released.

Also, we simply don't need it, process_copy_chunk alrady works in terms of the
tid!

Fixes: #8894
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2246 from ceph/wip-9064
Sage Weil [Tue, 12 Aug 2014 22:50:59 +0000 (15:50 -0700)]
Merge pull request #2246 from ceph/wip-9064

ReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered 2246/head
Samuel Just [Tue, 12 Aug 2014 22:24:26 +0000 (15:24 -0700)]
ReplicatedPG::maybe_handle_cache: do not skip promote for write_ordered

We cannot redirect a RW ordered read.

Fixes: #9064
Introduced: 0ed3adc1e0a74bf9548d1d956aece11f019afee0
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2245 from dachary/wip-9085-isa-link
Sage Weil [Tue, 12 Aug 2014 21:37:28 +0000 (14:37 -0700)]
Merge pull request #2245 from dachary/wip-9085-isa-link

erasure-code: isa plugin must link with ErasureCode.cc

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoerasure-code: isa plugin must link with ErasureCode.cc 2245/head
Loic Dachary [Tue, 12 Aug 2014 16:46:29 +0000 (18:46 +0200)]
erasure-code: isa plugin must link with ErasureCode.cc

Otherwise it will not get the methods it needs. A test is added to check
the plugin loads as expected, from the command line. The test is not run
if the isa plugin is not found, which happens on platforms that are not
supported.

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agoMerge pull request #2239 from ceph/wip-8912
Sage Weil [Tue, 12 Aug 2014 19:41:31 +0000 (12:41 -0700)]
Merge pull request #2239 from ceph/wip-8912

librbd: fix error path cleanup for opening an image

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc/changelog: v0.67.10 notes
Sage Weil [Tue, 12 Aug 2014 19:36:47 +0000 (12:36 -0700)]
doc/changelog: v0.67.10 notes

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge branch 'wip-8860'
Sage Weil [Tue, 12 Aug 2014 19:22:31 +0000 (12:22 -0700)]
Merge branch 'wip-8860'

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoinit-ceph: conditionally update after argparsing
Alfredo Deza [Fri, 8 Aug 2014 14:16:20 +0000 (10:16 -0400)]
init-ceph: conditionally update  after argparsing

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agodoc/release-notes: v0.67.10
Sage Weil [Tue, 12 Aug 2014 18:30:48 +0000 (11:30 -0700)]
doc/release-notes: v0.67.10

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 12 Aug 2014 16:35:08 +0000 (09:35 -0700)]
Merge remote-tracking branch 'gh/next'

Conflicts:
PendingReleaseNotes

10 years agoMerge pull request #2243 from ceph/wip-log-client
Loic Dachary [Tue, 12 Aug 2014 15:08:37 +0000 (17:08 +0200)]
Merge pull request #2243 from ceph/wip-log-client

common/LogClient: fix sending dup log items

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agocommon/LogClient: fix sending dup log items 2243/head
Sage Weil [Tue, 12 Aug 2014 14:05:34 +0000 (07:05 -0700)]
common/LogClient: fix sending dup log items

We need to skip even the most recently sent item in order to get to the
ones we haven't sent yet.

Fixes: #9080
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2232 from dachary/wip-9044-use-ruleset
Loic Dachary [Tue, 12 Aug 2014 13:00:02 +0000 (15:00 +0200)]
Merge pull request #2232 from dachary/wip-9044-use-ruleset

erasure-code: ErasureCodeJerasure::create_ruleset must return a ruleset

Reviewed-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
Reviewed-by: Ma Jianpeng <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoutime: Because class Clock didn't exist,so remove the declaration in class utime_t. 2242/head
Ma Jianpeng [Tue, 12 Aug 2014 10:16:05 +0000 (18:16 +0800)]
utime: Because class Clock didn't exist,so remove the declaration in class utime_t.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
10 years agodoc: Replace [default] with [global].
John Wilkins [Tue, 12 Aug 2014 01:16:01 +0000 (18:16 -0700)]
doc: Replace [default] with [global].

Fixes: #8955
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Added yum-priorities procedure to manual install.
John Wilkins [Tue, 12 Aug 2014 01:05:26 +0000 (18:05 -0700)]
doc: Added yum-priorities procedure to manual install.

Fixes: #8734
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Added priority = 2 to packages.
John Wilkins [Tue, 12 Aug 2014 01:04:39 +0000 (18:04 -0700)]
doc: Added priority = 2 to packages.

Fixes: #8734
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agolibrbd: fix error path cleanup for opening an image 2239/head
Josh Durgin [Mon, 11 Aug 2014 23:41:26 +0000 (16:41 -0700)]
librbd: fix error path cleanup for opening an image

If the image doesn't exist and caching is enabled, the ObjectCacher
was not being shutdown, and the ImageCtx was leaked. The IoCtx could
later be closed while the ObjectCacher was still running, resulting in
a segfault. Simply use the usual cleanup path in open_image(), which
works fine here.

Fixes: #8912
Backport: dumpling, firefly
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
10 years agorgw: Don't send error body when it's a HEAD request
Sylvain Munaut [Thu, 5 Jun 2014 09:28:27 +0000 (11:28 +0200)]
rgw: Don't send error body when it's a HEAD request

The main 'operation' know not to send any body for HEAD requests.

However for errors, this was not the case, the formatter would be
flushed and would send the error 'message' in the body in all cases.

For the FastCGI case it doesn't seem to be an issue, it's possible
that the webserver (apache/lighttpd/...) cleans up the response
into shape.

But when using the new civetweb frontend this cause invalid HTTP.

Backport: firefly
Fixes #8539

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
10 years agoMerge pull request #2214 from ceph/wip-rados-df-json
Josh Durgin [Mon, 11 Aug 2014 19:30:35 +0000 (12:30 -0700)]
Merge pull request #2214 from ceph/wip-rados-df-json

rados: fix 'rados df --format=json' field names

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agorados: remove {read,write}_kb fields from rados df json output 2214/head
Sage Weil [Wed, 6 Aug 2014 17:45:19 +0000 (10:45 -0700)]
rados: remove {read,write}_kb fields from rados df json output

Redundant.  Do not backport.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agorados: fix {read,write}_bytes value
Sage Weil [Wed, 6 Aug 2014 17:45:00 +0000 (10:45 -0700)]
rados: fix {read,write}_bytes value

Fill this in with kb * 1024 instead of the ops count.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2238 from ceph/wip-9057
Samuel Just [Mon, 11 Aug 2014 17:25:43 +0000 (10:25 -0700)]
Merge pull request #2238 from ceph/wip-9057

msg/Pipe: do not wait for self in Pipe::stop_and_wait()

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agomsg/Pipe: do not wait for self in Pipe::stop_and_wait() 2238/head
Sage Weil [Mon, 11 Aug 2014 03:22:23 +0000 (20:22 -0700)]
msg/Pipe: do not wait for self in Pipe::stop_and_wait()

The fast dispatch code necessitated adding a wait for the fast dispatch
to complete when taking over sockets back in commit
2d5d3097c3998add1061ce253104154d72879237.  This included mark_down()
(although I am not certain mark_down was required to fix the previous set
of races).

In any case, if the fast dispatch thread itself tries to mark down its
own connection, it will deadlock in this method waiting for itself to
return and clear reader_dispatching.  Skip this wait if we are in fact
the reader thread.  This avoids the deadlock.

Alternatively, we could change mark_down() to not use stop_and_wait(), but
I am less clear about the potential races there, so I'm opting for the
minimal (though ugly) fix.

Fixes: #9057
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomon/MonitorDBStore: add get_{keys,bytes}() accounting to Transaction
Sage Weil [Sun, 10 Aug 2014 21:00:11 +0000 (14:00 -0700)]
mon/MonitorDBStore: add get_{keys,bytes}() accounting to Transaction

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph_test_rados_api_tier: fix cache cleanup (ec too) 2236/head
Sage Weil [Sun, 10 Aug 2014 19:48:29 +0000 (12:48 -0700)]
ceph_test_rados_api_tier: fix cache cleanup (ec too)

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoceph_test_rados_api: fix cleanup of cache pool
Sage Weil [Sun, 10 Aug 2014 19:15:38 +0000 (12:15 -0700)]
ceph_test_rados_api: fix cleanup of cache pool

We can't simply try to delete everything in there because some items may
be whiteouts.  Instead, flush+evict everything, then remove overlay, and
*then* delete what remains.

Fixes: #9055
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agolibrados/TestCase: inheret cleanup_default_namespace
Sage Weil [Sun, 10 Aug 2014 18:41:23 +0000 (11:41 -0700)]
librados/TestCase: inheret cleanup_default_namespace

No need to duplicate this code.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: improve ruleno/ruleset consistency 2232/head
Loic Dachary [Sat, 9 Aug 2014 16:11:03 +0000 (18:11 +0200)]
osd: improve ruleno/ruleset consistency

rename variables to reflect when they hold a ruleset and when they hold
a rule id / ruleno in the hope to avoid bugs in the future.

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agoerasure-code: ErasureCodeIsa::create_ruleset must return a ruleset
Loic Dachary [Sat, 9 Aug 2014 16:10:31 +0000 (18:10 +0200)]
erasure-code: ErasureCodeIsa::create_ruleset must return a ruleset

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

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agoerasure-code: ErasureCodeJerasure::create_ruleset must return a ruleset
Loic Dachary [Sun, 10 Aug 2014 15:10:04 +0000 (17:10 +0200)]
erasure-code: ErasureCodeJerasure::create_ruleset must return a ruleset

CrushWrapper::add_simple_ruleset does not return a ruleset, it returns
a ruleid that must be converted into a ruleset before being returned.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agoerasure-code: OSDMonitor::crush_ruleset_create_erasure needs ruleset
Loic Dachary [Sun, 10 Aug 2014 15:06:33 +0000 (17:06 +0200)]
erasure-code: OSDMonitor::crush_ruleset_create_erasure needs ruleset

When OSDMonitor::crush_ruleset_create_erasure checks the ruleset for
existence, it must convert the ruleid into a ruleset before assigning it
back to the *ruleset parameter.

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

Signed-off-by: Loic Dachary <loic@dachary.org>
10 years agoMerge pull request #2201 from dachary/wip-8496-erasure-code-base-class
Loic Dachary [Sun, 10 Aug 2014 07:51:31 +0000 (09:51 +0200)]
Merge pull request #2201 from dachary/wip-8496-erasure-code-base-class

erasure code base class

Reviewed-by: Andreas-Joachim Peters <Andreas.Joachim.Peters@cern.ch>
10 years agoos/FileStore: dump open fds before asserting
Sage Weil [Sat, 9 Aug 2014 20:23:06 +0000 (13:23 -0700)]
os/FileStore: dump open fds before asserting

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc: Initial network docs. 2234/head
Kevin Cox [Fri, 20 Jun 2014 19:55:37 +0000 (15:55 -0400)]
doc: Initial network docs.

Signed-Off-By: Kevin Cox <kevincox@kevincox.ca>
10 years agoos/chain_xattr: Remove all old xattr entry when overwrite the xattr. 2233/head
Ma Jianpeng [Thu, 7 Aug 2014 13:33:18 +0000 (21:33 +0800)]
os/chain_xattr: Remove all old xattr entry when overwrite the xattr.

Ceph use multiple xattrs to store the value of a single xattr which size
is larger than CHAIN_XATTR_MAX_BLOCK_LEN.
But when overwote the content of xattr in func
chain_setxattr/chain_fsetxattr, we don't know the size of previous
content of the xattr.
So we only try to remove until system return  -ENODATA.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
10 years agoMerge branch 'next'
Sage Weil [Sat, 9 Aug 2014 06:00:13 +0000 (23:00 -0700)]
Merge branch 'next'

Conflicts:
src/osd/OSD.cc

10 years agoOSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper
Greg Farnum [Tue, 29 Jul 2014 01:33:56 +0000 (18:33 -0700)]
OSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit e99acf9810976b1fc74b84ad289773af43be973f)

10 years agoOSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function
Greg Farnum [Mon, 28 Jul 2014 21:19:59 +0000 (14:19 -0700)]
OSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function

Take the self-aliveness checks out of require_same_or_newer_map() and use
the new function for that and for require_up_osd_peer().

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit e179e9227b4a4482d8359682092fd7f426b9a919)

10 years agoOSD: use OpRequestRef& for a few require_* functions
Greg Farnum [Mon, 28 Jul 2014 21:08:30 +0000 (14:08 -0700)]
OSD: use OpRequestRef& for a few require_* functions

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit eb2f1ea2c33647934af878b504383829f5a198ce)

10 years agoOSD: introduce require_up_osd_peer() function for gating replica ops
Greg Farnum [Tue, 22 Jul 2014 23:57:00 +0000 (16:57 -0700)]
OSD: introduce require_up_osd_peer() function for gating replica ops

This checks both that a Message originates from an OSD, and that the OSD
is up in the given map epoch.
We use it in handle_replica_op so that we don't inadvertently add operations
from down peers, who might or might not know it.

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit ccd0eec50103b919b3eb6eea96f7dc6438520ed3)

10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 9 Aug 2014 03:08:19 +0000 (20:08 -0700)]
Merge remote-tracking branch 'gh/next'

10 years agoMerge pull request #2228 from ceph/wip-pg-epoch
Sage Weil [Sat, 9 Aug 2014 01:17:27 +0000 (18:17 -0700)]
Merge pull request #2228 from ceph/wip-pg-epoch

osd: fix pg epoch floor tracking

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2209 from somnathr/wip-sd-check-pool-existence
Sage Weil [Sat, 9 Aug 2014 00:53:54 +0000 (17:53 -0700)]
Merge pull request #2209 from somnathr/wip-sd-check-pool-existence

RadosClient: Adding pool existence checks for pool create interfaces.

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoRadosClient: Enable pool existence check 2209/head
Pavan Rallabhandi [Fri, 8 Aug 2014 10:16:18 +0000 (15:46 +0530)]
RadosClient: Enable pool existence check

Pool create interfaces would now refer to updated osdmap
for pool existence, such that an appropriate message is
thrown to the user when run via CLI.

Fixes: #8835
Signed-off-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
10 years agotest_librbd_fsx: also flatten as part of randomize_parent_overlap 2230/head
Ilya Dryomov [Tue, 29 Jul 2014 14:29:19 +0000 (18:29 +0400)]
test_librbd_fsx: also flatten as part of randomize_parent_overlap

With randomize_parent_overlap fsx will randomly truncate base images
after they have been cloned from.  This throws flatten into the mix:
base image will be flattened with 2/16 chance (equal to the chance of
leaving the image intact).

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
10 years agomds: Also check min/max uid on snap removal
Wido den Hollander [Fri, 8 Aug 2014 10:03:56 +0000 (12:03 +0200)]
mds: Also check min/max uid on snap removal

Not only check if the uid is correct when creating a snapshot, but also
verify if the UID is correct when trying to remove a snapshot.

Fixes: #9029
10 years agoosd: fix pg epoch floor tracking 2228/head
Sage Weil [Fri, 8 Aug 2014 00:42:06 +0000 (17:42 -0700)]
osd: fix pg epoch floor tracking

If you call erase() on a multiset it will delete all instances of a value;
we only want to delete one of them.  Fix this by passing an iterator.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2226 from athanatos/wip-8396
Samuel Just [Thu, 7 Aug 2014 22:56:18 +0000 (15:56 -0700)]
Merge pull request #2226 from athanatos/wip-8396

Wip 8396

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoOSD: move waiting_for_pg into the session structures 2226/head
Samuel Just [Mon, 4 Aug 2014 22:30:41 +0000 (15:30 -0700)]
OSD: move waiting_for_pg into the session structures

Each message belongs to a session.  Further, no ordering is implied
between messages which arrived on different sessions.  Breaking the
global waiting_for_pg structure into a per-session structure lets
us avoid the problem of taking a write lock on a global structure
(pg_map_lock) in get_pg_or_queue_for_pg at the cost of some
complexity in updating each session's waiting_for_pg structure when
we receive a new map (due to pg splits) or when we locally create
a pg.

Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2227 from athanatos/wip-8625
Sage Weil [Thu, 7 Aug 2014 22:42:27 +0000 (15:42 -0700)]
Merge pull request #2227 from athanatos/wip-8625

osd_types: s/stashed/rollback_info_completed and set on create

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agodoc: Removed Debian reference from Upstart.
John Wilkins [Thu, 7 Aug 2014 22:30:43 +0000 (15:30 -0700)]
doc: Removed Debian reference from Upstart.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Incorporated user feedback to clarify upgrade doc.
John Wilkins [Thu, 7 Aug 2014 22:29:34 +0000 (15:29 -0700)]
doc: Incorporated user feedback to clarify upgrade doc.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agodoc: Added configuration discussion at end of gateway install with links to config.
John Wilkins [Thu, 7 Aug 2014 21:15:45 +0000 (14:15 -0700)]
doc: Added configuration discussion at end of gateway install with links to config.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
10 years agoOSD::shutdown: actually drop sessions waiting on map
Samuel Just [Mon, 4 Aug 2014 22:31:06 +0000 (15:31 -0700)]
OSD::shutdown: actually drop sessions waiting on map

There might be messages for which we still don't have the
map.  Dispatching waiting won't actually help.

Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoOSD: clear_session_waiting_on_map in ms_handle_reset
Samuel Just [Tue, 29 Jul 2014 22:54:37 +0000 (15:54 -0700)]
OSD: clear_session_waiting_on_map in ms_handle_reset

Signed-off-by: Samuel Just <sam.just@inktank.com>