]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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 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 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 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 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 #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 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 #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 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 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 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: 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 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 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 agorados: add {read,write}_ops to df json
Sage Weil [Wed, 6 Aug 2014 17:44:21 +0000 (10:44 -0700)]
rados: add {read,write}_ops to df json

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2198 from ceph/wip-8998
Samuel Just [Mon, 4 Aug 2014 22:12:25 +0000 (15:12 -0700)]
Merge pull request #2198 from ceph/wip-8998

fix OSD SEGV in heartbeat()

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoosd: simplify dout_prefix macros 2198/head
Sage Weil [Mon, 4 Aug 2014 22:01:15 +0000 (15:01 -0700)]
osd: simplify dout_prefix macros

Use a get_osdmap_epoch() helper that is a bit lighter weight (by avoiding
copying around an OSDMapRef).

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: reorder OSDService methods under proper dout_prefix macro
Sage Weil [Mon, 4 Aug 2014 21:57:28 +0000 (14:57 -0700)]
osd: reorder OSDService methods under proper dout_prefix macro

The dout_prefix for OSDService uses get_osdmap() to grab a shared_ptr for
the epoch printout.  The OSD one does not, and is not safe to run in all
thread contexts.

In particular, update_osd_stat() is run by the heartbeat thread and can
race with the shared_ptr itself being updated with a new map.

Ironically, if this were simply an OSDMap*, there would be no race since
the pointer is a single word and updates atomically.

Fix this, and any similar issues, by moving the OSDService methods up in
OSD.cc so that they use the safe dout macro.

Fixes: #8998
Backport: firefly (in a minimal form, I think!)
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2192 from ceph/wip-8891
Samuel Just [Mon, 4 Aug 2014 17:30:25 +0000 (10:30 -0700)]
Merge pull request #2192 from ceph/wip-8891

msg/SimpleMessenger: drop msgr lock when joining a Pipe

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agocls_rgw: fix object name of objects removed on object creation
Yehuda Sadeh [Wed, 30 Jul 2014 18:53:16 +0000 (11:53 -0700)]
cls_rgw: fix object name of objects removed on object creation

Fixes: #8972
Backport: firefly, dumpling

Reported-by: Patrycja Szabłowska <szablowska.patrycja@gmail.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 0f8929a68aed9bc3e50cf15765143a9c55826cd2)

10 years agorgw: need to pass need_to_wait for throttle_data()
Yehuda Sadeh [Sat, 2 Aug 2014 20:01:05 +0000 (13:01 -0700)]
rgw: need to pass need_to_wait for throttle_data()

need_to_wait wasn't passed into processor->throttle_data(). This was
broken in fix for #8937.

CID 1229541:    (PW.PARAM_SET_BUT_NOT_USED)

Backport: firefly

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

10 years agorgw: call processor->handle_data() again if needed
Yehuda Sadeh [Sat, 26 Jul 2014 03:33:52 +0000 (20:33 -0700)]
rgw: call processor->handle_data() again if needed

Fixes: #8937
Following the fix to #8928 we end up accumulating pending data that
needs to be written. Beforehand it was working fine because we were
feeding it with the exact amount of bytes we were writing.

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

10 years agoMerge pull request #2193 from ceph/wip-ceph-conf
Loic Dachary [Mon, 4 Aug 2014 16:28:49 +0000 (18:28 +0200)]
Merge pull request #2193 from ceph/wip-ceph-conf

ceph-conf: flush log on exit

Reviewed-by: Loic Dachary <loic@dachary.org>
10 years agoceph-conf: flush log on exit 2193/head
Sage Weil [Mon, 4 Aug 2014 04:00:37 +0000 (21:00 -0700)]
ceph-conf: flush log on exit

This makes it deterministic whether we output

2014-08-03 20:59:45.482614 4036c80 -1 did not load config file, using default settings.

or not, and will make the unit tests stop intermittently failing.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agomsg/SimpleMessenger: drop msgr lock when joining a Pipe 2192/head
Sage Weil [Mon, 4 Aug 2014 01:26:34 +0000 (18:26 -0700)]
msg/SimpleMessenger: drop msgr lock when joining a Pipe

Avoid this deadlock:

- a fault
- delay thread entry gets a fast dispatch message
 - drops delay_lock
 - calls into fast_dispatch
- reaper tries to reap the pipe
 - pipe->join()
  - delay_thread->join()
   - blocks waiting for delay_thread to exit
- delay thread / fast dispatch blocks on msgr->lock trying to mark_down

The solution is to drop the msgr lock while joining the thread.  This will
allow the join() to complete.  Adjust the reaper thread to recheck the
exit condition since the lock may have been dropped.  The other two callers
do not care.

Fixes: #8891
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoos/MemStore: fix lock leak
Sage Weil [Sun, 3 Aug 2014 18:23:33 +0000 (11:23 -0700)]
os/MemStore: fix lock leak

CID 1228868 (#2-1 of 2): Missing unlock (LOCK)
12. missing_unlock: Returning without unlocking oc->lock.L.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2172 from ceph/wip-8714
Samuel Just [Fri, 1 Aug 2014 16:57:24 +0000 (09:57 -0700)]
Merge pull request #2172 from ceph/wip-8714

osd: prevent old clients from using tiered pools

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agoMerge pull request #2190 from ceph/wip-osd-leaks
Gregory Farnum [Fri, 1 Aug 2014 14:08:16 +0000 (10:08 -0400)]
Merge pull request #2190 from ceph/wip-osd-leaks

osd: do not leak Session* ref in _send_boot()

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2182 from ceph/wip-round
Gregory Farnum [Fri, 1 Aug 2014 12:11:08 +0000 (08:11 -0400)]
Merge pull request #2182 from ceph/wip-round

use llrintl when converting double to micro

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoosd: do not leak Session* ref in _send_boot() 2190/head
Sage Weil [Fri, 1 Aug 2014 03:59:49 +0000 (20:59 -0700)]
osd: do not leak Session* ref in _send_boot()

The get_priv() call returns a ref; make sure we drop it if it exists.
This doesn't happen on every run because usually it is NULL and we take
the other path; it's only after the OSD has been marked down that we reach
the second path.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agouse llrintl when converting double to micro 2182/head
Sage Weil [Thu, 31 Jul 2014 22:39:40 +0000 (15:39 -0700)]
use llrintl when converting double to micro

This avoids rounding error (noticeable on i386).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2179 from ceph/wip-8982
Samuel Just [Thu, 31 Jul 2014 18:28:04 +0000 (11:28 -0700)]
Merge pull request #2179 from ceph/wip-8982

osd: fix cache pools without hit_sets configured

Reviewed-by: Samuel Just <sam.just@inktank.com>
10 years agomon/OSDMonitor: warn when cache pools do not have hit_sets configured 2179/head
Sage Weil [Thu, 31 Jul 2014 18:02:55 +0000 (11:02 -0700)]
mon/OSDMonitor: warn when cache pools do not have hit_sets configured

Give users a clue when cache pools are enabled but the hit_set is not
configured.  Note that technically this will work, but not well, so for
now let's just steer them away.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd/ReplicatedPG: improve agent_choose_mode args
Sage Weil [Thu, 31 Jul 2014 16:28:12 +0000 (09:28 -0700)]
osd/ReplicatedPG: improve agent_choose_mode args

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agovstart.sh: limit open files
Sage Weil [Thu, 31 Jul 2014 16:26:20 +0000 (09:26 -0700)]
vstart.sh: limit open files

Most users only get 1024 fds.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd/ReplicatedPG: evict blindly if there is no hit_set
Sage Weil [Thu, 31 Jul 2014 16:26:03 +0000 (09:26 -0700)]
osd/ReplicatedPG: evict blindly if there is no hit_set

If there is no hit set for a PG, blindly evict objects.  This avoids an
assert(hit_set) in agent_estimate_atime_temp().

Fixes: #8982
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't
Sage Weil [Thu, 31 Jul 2014 16:13:11 +0000 (09:13 -0700)]
osd/ReplicatedPG: check agent_mode if agent is enabled but hit_sets aren't

It is probably not a good idea to try to run the tiering agent without a
hit_set to inform its actions, but it is technically possible.  For
example, one could simply blindly evict when we reach the full point.
However, this doesn't work because the agent mode is guarded by a hit_set
check, even though agent_setup() is not.  Fix that.

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2173 from ceph/wip-8969
Gregory Farnum [Thu, 31 Jul 2014 12:59:00 +0000 (08:59 -0400)]
Merge pull request #2173 from ceph/wip-8969

fix i386 atomics

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2162 from ceph/wip-8586
Sage Weil [Thu, 31 Jul 2014 03:57:06 +0000 (20:57 -0700)]
Merge pull request #2162 from ceph/wip-8586

rgw: fix crash in swift CORS preflight request

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agomon/OSDMonitor: fix i386 floating point rounding error 2173/head
Sage Weil [Thu, 31 Jul 2014 00:50:39 +0000 (17:50 -0700)]
mon/OSDMonitor: fix i386 floating point rounding error

This would round .123 to .122999 on i386; now it does not.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2171 from ceph/wip-cli-integration
Josh Durgin [Wed, 30 Jul 2014 23:57:38 +0000 (16:57 -0700)]
Merge pull request #2171 from ceph/wip-cli-integration

fix rbd cli-integratoin tests

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoatomic: fix read() on i386, clean up types
Sage Weil [Wed, 30 Jul 2014 21:52:06 +0000 (14:52 -0700)]
atomic: fix read() on i386, clean up types

Among other things, fixes #8969

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoosd: prevent old clients from using tiered pools 2172/head
Sage Weil [Wed, 30 Jul 2014 20:57:34 +0000 (13:57 -0700)]
osd: prevent old clients from using tiered pools

If the client is old and doesn't understand tiering, don't let them use a
tiered pool.  Reply with EOPNOTSUPP.

Fixes: #8714
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agotest/cli-integration/rbd: fix trailing space 2171/head
Sage Weil [Wed, 30 Jul 2014 20:40:33 +0000 (13:40 -0700)]
test/cli-integration/rbd: fix trailing space

Newer versions of json.tool remove the trailing ' ' after the comma.  Add
it back in with sed so that the .t works on both old and new versions, and
so that we don't have to remove the trailing spaces from all of the test
cases.

Backport: firefly
Fixes: #8920
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge tag 'v0.83'
Sage Weil [Tue, 29 Jul 2014 23:23:12 +0000 (16:23 -0700)]
Merge tag 'v0.83'

v0.83

10 years agoMerge pull request #2161 from ceph/wip-jcsp-test
John Spray [Tue, 29 Jul 2014 22:55:30 +0000 (23:55 +0100)]
Merge pull request #2161 from ceph/wip-jcsp-test

Reviewed-by: Greg Farnum greg@inktank.com
10 years agorgw: fix crash in swift CORS preflight request 2162/head
Yehuda Sadeh [Tue, 29 Jul 2014 22:25:47 +0000 (15:25 -0700)]
rgw: fix crash in swift CORS preflight request

Fixes: #8586
This fixes error handling, in accordance with commit 6af5a537 that fixed
the same issue for the S3 case.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agomds: remove some rogue "using namespace std;" 2161/head
John Spray [Tue, 22 Jul 2014 01:42:15 +0000 (02:42 +0100)]
mds: remove some rogue "using namespace std;"

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: handle replaying old format journals
John Spray [Tue, 22 Jul 2014 01:08:08 +0000 (02:08 +0100)]
mds: handle replaying old format journals

To get back to the reformatting procedure that otherwise
occurs during MDLog::open, introduce an MDLog::reopen call
that MDS can use in the standbyreplay->standby transition
for the special case where the journal is old.

Fixes: #8869
Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: introduce explicit DaemonState instead of int
John Spray [Mon, 21 Jul 2014 19:22:46 +0000 (20:22 +0100)]
mds: introduce explicit DaemonState instead of int

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: refactor MDS boot
John Spray [Mon, 21 Jul 2014 17:50:07 +0000 (18:50 +0100)]
mds: refactor MDS boot

* Make boot_start private.
* Define boot stages in enum, replace int with type.
* Merge steps 0 and 1, 0 always fell through to 1.
* starting_done was only ever reached by a fall through
  from the previous step, so call it directly from there.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: make MDS::replay_done clearer
John Spray [Mon, 21 Jul 2014 16:08:46 +0000 (17:08 +0100)]
mds: make MDS::replay_done clearer

... and add some assertions.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: remove unused purge_prealloc_ino
John Spray [Tue, 22 Jul 2014 11:16:26 +0000 (12:16 +0100)]
mds: remove unused purge_prealloc_ino

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agomds: separate inode recovery queue from MDCache
John Spray [Thu, 17 Jul 2014 23:44:38 +0000 (00:44 +0100)]
mds: separate inode recovery queue from MDCache

Refactor to:
* have somewhere to put some logic for doing
  background recovery in future.
* trim a few lines from the oversized MDCache.cc
  whereever we can.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agopython-ceph: require libcephfs.
Sandon Van Ness [Tue, 29 Jul 2014 21:11:03 +0000 (14:11 -0700)]
python-ceph: require libcephfs.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
10 years ago0.83 v0.83
Jenkins [Tue, 29 Jul 2014 20:42:53 +0000 (13:42 -0700)]
0.83

10 years agoMerge pull request #2159 from ceph/wip-undump
Gregory Farnum [Tue, 29 Jul 2014 20:40:31 +0000 (16:40 -0400)]
Merge pull request #2159 from ceph/wip-undump

tools/cephfs: fuller header in dump/undump

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoRemove reference from mkcephfs.
Sandon Van Ness [Mon, 28 Jul 2014 17:38:41 +0000 (10:38 -0700)]
Remove reference from mkcephfs.

A bit of colission from spec changes for the rhel7/ceph-common
changes and alfredo's pull request for wip-die-ceph-mkcephfs.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit 1526546ddcfd4230403d0d2364575c4e46970f8d)

10 years agoMerge pull request #2156 from ceph/wip-upstart-nfile
Gregory Farnum [Tue, 29 Jul 2014 19:36:19 +0000 (15:36 -0400)]
Merge pull request #2156 from ceph/wip-upstart-nfile

upstart/ceph-osd.conf: bump nofile limit up by 10x

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agodoc/release-notes: typo
Sage Weil [Tue, 29 Jul 2014 19:33:52 +0000 (12:33 -0700)]
doc/release-notes: typo

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agodoc/release-notes: v0.80.5 release notes
Sage Weil [Tue, 29 Jul 2014 19:23:33 +0000 (12:23 -0700)]
doc/release-notes: v0.80.5 release notes

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 29 Jul 2014 18:16:24 +0000 (11:16 -0700)]
Merge remote-tracking branch 'gh/next'

10 years agoMerge branch 'origin/wip-osd-leaks'
Greg Farnum [Tue, 29 Jul 2014 17:33:34 +0000 (10:33 -0700)]
Merge branch 'origin/wip-osd-leaks'

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2139 from ceph/wip-journal-header
Gregory Farnum [Tue, 29 Jul 2014 13:04:12 +0000 (09:04 -0400)]
Merge pull request #2139 from ceph/wip-journal-header

os/FileJournal: Update the journal header when closing journal

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2146 from ceph/wip-8932
Gregory Farnum [Tue, 29 Jul 2014 13:01:41 +0000 (09:01 -0400)]
Merge pull request #2146 from ceph/wip-8932

ceph_test_rados_api_tier: do fewer writes in HitSetWrite

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agoMerge pull request #2147 from ceph/wip-8931
Gregory Farnum [Tue, 29 Jul 2014 12:58:30 +0000 (08:58 -0400)]
Merge pull request #2147 from ceph/wip-8931

osd: fix ops blocked by full cache tier dequeue

Reviewed-by: Greg Farnum <greg@inktank.com>
10 years agounittest_crush_wrapper: fix build
Sage Weil [Tue, 29 Jul 2014 00:17:23 +0000 (17:17 -0700)]
unittest_crush_wrapper: fix build

Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2150 from ceph/wip-libs
Dan Mick [Tue, 29 Jul 2014 00:06:41 +0000 (17:06 -0700)]
Merge pull request #2150 from ceph/wip-libs

don't link everything with blkid, udev, and boost_threads

10 years agoMerge pull request #2153 from ceph/wip-fsx-overlap
Josh Durgin [Mon, 28 Jul 2014 21:30:51 +0000 (14:30 -0700)]
Merge pull request #2153 from ceph/wip-fsx-overlap

librbd API fix + wip-fsx-overlap

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
10 years agoMerge pull request #2152 from xiaoxichen/fix_ceph_df
Sage Weil [Mon, 28 Jul 2014 18:41:09 +0000 (11:41 -0700)]
Merge pull request #2152 from xiaoxichen/fix_ceph_df

PGMonitor: fix bug in caculating pool avail space

Reviewed-by: Sage Weil <sage@redhat.com>
10 years agoRemove reference from mkcephfs.
Sandon Van Ness [Mon, 28 Jul 2014 17:38:41 +0000 (10:38 -0700)]
Remove reference from mkcephfs.

A bit of colission from spec changes for the rhel7/ceph-common
changes and alfredo's pull request for wip-die-ceph-mkcephfs.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
10 years agoFix some style and checking issue 2152/head
Xiaoxi Chen [Mon, 28 Jul 2014 16:42:10 +0000 (00:42 +0800)]
Fix some style and checking issue

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
10 years agoupstart/ceph-osd.conf: bump nofile limit up by 10x 2156/head
Sage Weil [Mon, 28 Jul 2014 16:27:20 +0000 (09:27 -0700)]
upstart/ceph-osd.conf: bump nofile limit up by 10x

This should ensure that we don't hit this limit on all but the very biggest
clusters.  We seen it hit on a ~500 OSD dumpling cluster.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
10 years agoMerge pull request #2154 from simon3z/master
Sage Weil [Mon, 28 Jul 2014 16:22:47 +0000 (09:22 -0700)]
Merge pull request #2154 from simon3z/master

init: add systemd service files

Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
10 years agotools/cephfs: fuller header in dump/undump 2159/head
John Spray [Mon, 28 Jul 2014 14:32:12 +0000 (15:32 +0100)]
tools/cephfs: fuller header in dump/undump

There were two problems here:
 * write_pos was modified through an undump/dump cycle,
   because it was probed during recovery.
 * stream format was being forgotten.

Signed-off-by: John Spray <john.spray@redhat.com>
10 years agotest_librbd_fsx: clone/flatten probabilities 2153/head
Ilya Dryomov [Fri, 25 Jul 2014 12:04:53 +0000 (16:04 +0400)]
test_librbd_fsx: clone/flatten probabilities

Higher the clone probability to 8% and lower the probability of flatten
to 2%.  This should give us longer parent chaines (before this we would
usually have one parent and even then only for a few ops time).

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
10 years agotest_librbd_fsx: randomize_parent_overlap
Ilya Dryomov [Fri, 25 Jul 2014 12:04:53 +0000 (16:04 +0400)]
test_librbd_fsx: randomize_parent_overlap

Truncate base images after they have been cloned from to cover more
code paths and make sure that clients look at snapshot parent_overlap
(i.e. parent_overlap of the base image at the time the snapshot was
taken) and not that of the base image (i.e. parent_overlap of the base
image as of now).

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
10 years agotest_librbd_fsx: introduce rbd_image_has_parent()
Ilya Dryomov [Wed, 9 Jul 2014 13:59:02 +0000 (17:59 +0400)]
test_librbd_fsx: introduce rbd_image_has_parent()

A helper to check whether the image associated with the ctx has
a parent or not.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
10 years agolibrbd: make rbd_get_parent_info() accept NULL out params
Ilya Dryomov [Tue, 8 Jul 2014 15:21:54 +0000 (19:21 +0400)]
librbd: make rbd_get_parent_info() accept NULL out params

The C++ version of rbd_get_parent_info() allows passing NULL for parent
image name, image name and snapshot name out parameters.  Make C API do
the same both for consistency and to make it easier to check whether
the image at hand has a parent or not.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
10 years agoPGMonitor: fix bug in caculating pool avail space
Xiaoxi Chen [Mon, 28 Jul 2014 08:54:48 +0000 (16:54 +0800)]
PGMonitor: fix bug in caculating pool avail space

Currently for pools with different rules, "ceph df" cannot report
right available space for them, respectively. For detail assisment
of the bug ,pls refer to bug report #8943

This patch fix this bug and make ceph df works correctlly.

Fixes Bug #8943

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>