]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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>
10 years agoOSD: rename session_waiting_for_map_lock to session_waiting_lock
Samuel Just [Tue, 29 Jul 2014 22:33:30 +0000 (15:33 -0700)]
OSD: rename session_waiting_for_map_lock to session_waiting_lock

This lock will also protect the waiting_for_pg structures in each
session.

Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoOSD: wake_pg_waiters outside of the pgmap write_lock, pg_lock
Samuel Just [Tue, 5 Aug 2014 19:57:43 +0000 (12:57 -0700)]
OSD: wake_pg_waiters outside of the pgmap write_lock, pg_lock

Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoOSD: fix wake_pg_waiters revert error in _open_lock_pg
Samuel Just [Tue, 5 Aug 2014 20:00:01 +0000 (13:00 -0700)]
OSD: fix wake_pg_waiters revert error in _open_lock_pg

231fe1b685bfbd3db9c81709ca39a29d696b13ad reintroduced erroneously
this call to wake_pg_waiters.  All _create_lock_pg callers handle
calling wake_pg_waiters after the pg lock has been dropped.

Fixes: #8691
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoosd_types: s/stashed/rollback_info_completed and set on create 2227/head
Samuel Just [Fri, 1 Aug 2014 21:04:35 +0000 (14:04 -0700)]
osd_types: s/stashed/rollback_info_completed and set on create

Originally, this flag indicated that the object had already been stashed and
that therefore recording subsequent changes is unecessary.  We want to set it
on create() as well since operations like [create, writefull] should not need
to stash the object.

Fixes: #8625
Signed-off-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge remote-tracking branch 'gh/wip-filestore-bigxattr'
Sage Weil [Thu, 7 Aug 2014 18:21:06 +0000 (11:21 -0700)]
Merge remote-tracking branch 'gh/wip-filestore-bigxattr'

10 years agomake ceph-disk use the new init flag for cluster
Alfredo Deza [Thu, 7 Aug 2014 15:11:57 +0000 (11:11 -0400)]
make ceph-disk use the new init flag for cluster

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agoallow passing a --cluster flag to the init script
Alfredo Deza [Thu, 7 Aug 2014 14:48:09 +0000 (10:48 -0400)]
allow passing a --cluster flag to the init script

It will fallback to looking at /etc/ceph/$cluster.conf
otherwise.

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agomds: Make min/max UID configurable for who is allowed to create a snapshot
Wido den Hollander [Thu, 7 Aug 2014 11:21:20 +0000 (13:21 +0200)]
mds: Make min/max UID configurable for who is allowed to create a snapshot

This way administrators can configure which UIDs are allowed to create
snapshots on CephFS.

In certain situations it might be desirable that regular users are not allowed
to create snapshots. For example on shared hosting environments.

Fixes: #9029
10 years agopowerdns: Update README with better markdown
Wido den Hollander [Wed, 6 Aug 2014 15:14:04 +0000 (17:14 +0200)]
powerdns: Update README with better markdown

10 years agoMerge pull request #2220 from somnathr/wip-lock-leak-fix
Sage Weil [Thu, 7 Aug 2014 01:42:18 +0000 (18:42 -0700)]
Merge pull request #2220 from somnathr/wip-lock-leak-fix

RadosClient: Fixing potential lock leaks.

Backport: firefly
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoRadosClient: Fixing potential lock leaks. 2220/head
Pavan Rallabhandi [Wed, 6 Aug 2014 09:40:14 +0000 (15:10 +0530)]
RadosClient: Fixing potential lock leaks.

In lookup_pool and pool_delete, a lock is taken
before invoking wait_for_osdmap, but is not
released for the failure case of the call. Fixing the same.

Fixes: #9022
Signed-off-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
10 years agoos/FileStore: force any new xattr into omap on E2BIG
Sage Weil [Thu, 7 Aug 2014 00:28:45 +0000 (17:28 -0700)]
os/FileStore: force any new xattr into omap on E2BIG

If we have a huge xattr (or many little ones), the _fgetattrs() for the
inline_set will fail with E2BIG.  The conditions later where we decide
whether to clean up the old xattr will then also fail.  We *will* put
the xattr in omap, but the non-omap version isn't cleaned up.

Fix this by setting a flag if we get E2BIG that the inline_set is known
to be incomplete.  In that case, take the conservative step of assuming
the xattr might be present and chain_fremovexattr().  Ignore any error
because it might not be there.

This is clearly harmless in the general case because it won't be there.
If it is, we will hopefully remove enough xattrs that the E2BIG
condition will go away (usually by removing some really big chained
xattr).

See original bug #7779.  With this in place, we can repair objects in
the broken state if we know the rados attr(s) that are responsible.
Usually that is user.rgw.manifset, and a rados get + set of the attr
will repair things.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2218 from ceph/wip-rados-xattr
Yehuda Sadeh [Thu, 7 Aug 2014 00:11:44 +0000 (17:11 -0700)]
Merge pull request #2218 from ceph/wip-rados-xattr

rados: fix get/setxattr commands up

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorados: use STD{IN,OUT}_FILENO for magic values 2218/head
Sage Weil [Thu, 7 Aug 2014 00:01:29 +0000 (17:01 -0700)]
rados: use STD{IN,OUT}_FILENO for magic values

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoqa/workunits/rados/test_rados_tool: add a few xattr tests
Sage Weil [Thu, 7 Aug 2014 00:00:57 +0000 (17:00 -0700)]
qa/workunits/rados/test_rados_tool: add a few xattr tests

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agorados: optionally read setxattr value from stdin
Sage Weil [Wed, 6 Aug 2014 22:09:22 +0000 (15:09 -0700)]
rados: optionally read setxattr value from stdin

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agorados: don't add \n to getxattr
Sage Weil [Wed, 6 Aug 2014 22:07:17 +0000 (15:07 -0700)]
rados: don't add \n to getxattr

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoqa/workunits/cephtool/test.sh: fix 'ceph df ...' tests
Sage Weil [Wed, 6 Aug 2014 20:16:49 +0000 (13:16 -0700)]
qa/workunits/cephtool/test.sh: fix 'ceph df ...' tests

Broken by ee2dbdb0f5e54fe6f9c5999c032063b084424c4c and friends.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agouse cluster name when checking the host
Alfredo Deza [Wed, 6 Aug 2014 19:30:30 +0000 (15:30 -0400)]
use cluster name when checking the host

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agouse name in /var/lib/ceph paths
Alfredo Deza [Wed, 6 Aug 2014 19:30:09 +0000 (15:30 -0400)]
use  name in /var/lib/ceph paths

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agowhen starting an OSD, pass in the cluster name
Alfredo Deza [Wed, 6 Aug 2014 19:29:42 +0000 (15:29 -0400)]
when starting an OSD, pass in the cluster name

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
10 years agoPendingReleaseNotes: make note about rbd cache default change
Sage Weil [Wed, 6 Aug 2014 18:37:22 +0000 (11:37 -0700)]
PendingReleaseNotes: make note about rbd cache default change

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2123 from ceph/wip-rbd-flush
Josh Durgin [Wed, 6 Aug 2014 18:28:56 +0000 (11:28 -0700)]
Merge pull request #2123 from ceph/wip-rbd-flush

librbd: enable rbd cache by default; writethrough until flush

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>