]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agomon: remove the last_consumed setting in Paxos
Greg Farnum [Fri, 10 Feb 2012 23:07:10 +0000 (15:07 -0800)]
mon: remove the last_consumed setting in Paxos

This was only ever used while initializing the Paxos machine, and it
doesn't need to be. Its existence is just an invitation to have races
between updating the stashed data and the stashed version.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: handle inconsistent disk states on startup.
Greg Farnum [Fri, 10 Feb 2012 23:02:03 +0000 (15:02 -0800)]
mon: handle inconsistent disk states on startup.

This lets us recover from an interrupted slurp while still noticing
other corruption issues. Rather than running init() and then
update_from_paxos() on each instance, we run init() and check
consistency. If it is consistent, we update_from_paxos as before. If
it is not, we do nothing and detect the slurping state
in handle_probe_reply(). (This assumes the disk was in a slurping state. If not, the
daemon crashes because something else went horribly wrong.)

While we're at it, remove unnecessary sets of first_committed. These
are done in the call to pax->trim_to().

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: add a slurping flag to the Paxos state
Greg Farnum [Fri, 10 Feb 2012 18:42:24 +0000 (10:42 -0800)]
mon: add a slurping flag to the Paxos state

Set it before we start slurping, and clear it when we end slurping.
This allows us to differentiate between deliberately inconsistent
disk states, and broken disk states. Run simple checks in a new
is_consistent() call.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: initialize paxos state in constructor
Greg Farnum [Fri, 10 Feb 2012 17:16:58 +0000 (09:16 -0800)]
mon: initialize paxos state in constructor

These should all be initialized in init() anyway
(except accepted_pn_from, which is set in collect and handle_collect),
but initializing them to safe defaults in the constructor provides
a safety net.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: waitlist new sessions trying to connect while we're out of quorum
Greg Farnum [Wed, 8 Feb 2012 19:08:51 +0000 (11:08 -0800)]
mon: waitlist new sessions trying to connect while we're out of quorum

If we're stuck out of the quorum, we don't want clients connecting to
to us. Instead, waitlist their requests; process them when we get into
a quorum and look at them every tick so we can toss them out
(if we take too long to get into a quorum).

This change is smaller than it looks - most requests would
previously have been blocked anyway while waiting for Paxos to be
readable, and the ones that weren't (eg, one-time map subscribes)
should have been!

This also means we can tear out the cleanup code for new Sessions, so
tick() looks better.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: make PaxosService::update_from_paxos return void.
Greg Farnum [Mon, 6 Feb 2012 23:31:20 +0000 (15:31 -0800)]
mon: make PaxosService::update_from_paxos return void.

You can't really recover from a failed update (as PGMonitor was trying
to do), and nothing in the system checks the return values.
So rip out the return values and change failed updates to an assert
failure (most of the other Monitors continue to have decode exceptions,
but we can keep the pretty that we have).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: call update_from_paxos() when we finish slurping updates.
Greg Farnum [Mon, 6 Feb 2012 16:40:53 +0000 (08:40 -0800)]
mon: call update_from_paxos() when we finish slurping updates.

To aid in this, add a new get_paxos_service_by_name function.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agodoc: add the ceph mds stop command.
Greg Farnum [Fri, 3 Feb 2012 21:27:26 +0000 (13:27 -0800)]
doc: add the ceph mds stop command.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomon: show full status in ceph health
Josh Durgin [Fri, 3 Feb 2012 02:52:16 +0000 (18:52 -0800)]
mon: show full status in ceph health

HEALTH_WARN when nearfull, HEALTH_ERROR when full.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: signal dispatch_cond on ms_dispatch completion
Sage Weil [Fri, 3 Feb 2012 17:27:55 +0000 (09:27 -0800)]
osd: signal dispatch_cond on ms_dispatch completion

There may be another dispatch thread waiting on this cond; we do need to
signal it!

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: use request uri if script name is empty
Yehuda Sadeh [Fri, 3 Feb 2012 17:32:14 +0000 (09:32 -0800)]
rgw: use request uri if script name is empty

this was required for some nginx configuration

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agoosd: reorder PG recovery_state initialization
Sage Weil [Fri, 3 Feb 2012 17:27:47 +0000 (09:27 -0800)]
osd: reorder PG recovery_state initialization

The state machine state constructors print stuff to the logs, and the
PG::gen_prefix() includes all kinds of PG fields in that.  Move the
recovery_state member to the end of the class so that all previous fields
are initialized when that happens.  This makes valgrind shut up.

Some more deliberate tidying of the PG members and methods would also
be nice...

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest/encoding/readable.sh: nicer output
Sage Weil [Fri, 3 Feb 2012 05:06:10 +0000 (21:06 -0800)]
test/encoding/readable.sh: nicer output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: more helpful error message for messages
Sage Weil [Fri, 3 Feb 2012 05:05:37 +0000 (21:05 -0800)]
ceph-dencoder: more helpful error message for messages

If the type doesn't match, share what it was vs what you expected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomessages: set type in default constructor
Sage Weil [Fri, 3 Feb 2012 05:03:08 +0000 (21:03 -0800)]
messages: set type in default constructor

ceph-dencoder wants this to verify it decoded the correct message type.
Not that it is likely to happen, but let's be pendantic about it anyway.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agopick object from random osd for primary recovery
Alexandre Oliva [Thu, 2 Feb 2012 19:41:46 +0000 (17:41 -0200)]
pick object from random osd for primary recovery

When recovering a primary, try the osds that have a copy of the object
in random order, rather than preferring the lowest-numbered.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Suggested-by: Samuel Just <samuel.just@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomsg: fix message leak on receipt of undecodable message
Sage Weil [Thu, 2 Feb 2012 22:30:53 +0000 (14:30 -0800)]
msg: fix message leak on receipt of undecodable message

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMakefile: add test/encoding/types.h
Sage Weil [Fri, 3 Feb 2012 01:01:08 +0000 (17:01 -0800)]
Makefile: add test/encoding/types.h

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge branch 'wip-encoding'
Sage Weil [Fri, 3 Feb 2012 01:00:38 +0000 (17:00 -0800)]
Merge branch 'wip-encoding'

Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
Conflicts:
src/msg/Message.h
src/osd/OSD.cc
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

13 years agoencoding: document ENCODE/DECODE macros
Sage Weil [Thu, 2 Feb 2012 22:23:16 +0000 (14:23 -0800)]
encoding: document ENCODE/DECODE macros

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest/encoding/readable.sh: nicer output
Sage Weil [Thu, 2 Feb 2012 22:04:03 +0000 (14:04 -0800)]
test/encoding/readable.sh: nicer output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotest/encoding/readable.sh: check all version
Sage Weil [Thu, 2 Feb 2012 21:56:55 +0000 (13:56 -0800)]
test/encoding/readable.sh: check all version

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix another repop->ctx->op deref
Sage Weil [Thu, 2 Feb 2012 23:20:14 +0000 (15:20 -0800)]
osd: fix another repop->ctx->op deref

Ok this time I actually looked for more and didn't see any.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge remote branch 'gh/wip-objecter-initialized'
Sage Weil [Thu, 2 Feb 2012 23:16:02 +0000 (15:16 -0800)]
Merge remote branch 'gh/wip-objecter-initialized'

Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agoosd: avoid null deref of repop->ctx->op
Sage Weil [Thu, 2 Feb 2012 23:07:54 +0000 (15:07 -0800)]
osd: avoid null deref of repop->ctx->op

It's optional.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoencoding: document ENCODE_DUMP throttling weirdness
Sage Weil [Thu, 2 Feb 2012 21:48:26 +0000 (13:48 -0800)]
encoding: document ENCODE_DUMP throttling weirdness

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoencoding: fix DECODE_START macro
Sage Weil [Thu, 2 Feb 2012 21:37:34 +0000 (13:37 -0800)]
encoding: fix DECODE_START macro

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoencoding: add DECODE_OLDEST macro
Sage Weil [Thu, 2 Feb 2012 21:36:45 +0000 (13:36 -0800)]
encoding: add DECODE_OLDEST macro

So we can (gracefully) fail to decode very old encoded versions we no
longer support.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix another issue_repop() ctx->op null deref
Sage Weil [Thu, 2 Feb 2012 21:31:58 +0000 (13:31 -0800)]
osd: fix another issue_repop() ctx->op null deref

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocheck-generated.sh: do self-decode test first
Sage Weil [Thu, 2 Feb 2012 20:50:04 +0000 (12:50 -0800)]
check-generated.sh: do self-decode test first

This way we get a helpful error instead of silent failure on later.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agocheck-generated.sh: nicer output
Sage Weil [Thu, 2 Feb 2012 20:47:58 +0000 (12:47 -0800)]
check-generated.sh: nicer output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: print errors to stderr
Sage Weil [Thu, 2 Feb 2012 20:39:35 +0000 (12:39 -0800)]
ceph-dencoder: print errors to stderr

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: do not dereference ctx->op when NULL
Sage Weil [Thu, 2 Feb 2012 20:36:27 +0000 (12:36 -0800)]
osd: do not dereference ctx->op when NULL

We may not have an OpRequest.  Make the later check do the cast properly
when it is needed.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoencoding: better DECODE_START_LEGACY_COMPAT_LEN
Sage Weil [Thu, 2 Feb 2012 01:11:29 +0000 (17:11 -0800)]
encoding: better DECODE_START_LEGACY_COMPAT_LEN

- let you specify whether to decode compat and/or len
- put the argument order in the macro name so you know when you get it
  wrong

This is useful for FileJournal::header_t.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agobuffer: iterator::get_remaining()
Sage Weil [Thu, 26 Jan 2012 00:00:08 +0000 (16:00 -0800)]
buffer: iterator::get_remaining()

It's helpful to know how much data is remaining.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge remote-tracking branch 'gh/wip-osd-op-tracking'
Sage Weil [Thu, 2 Feb 2012 18:55:41 +0000 (10:55 -0800)]
Merge remote-tracking branch 'gh/wip-osd-op-tracking'

Reviewed-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'master' into wip-encoding
Sage Weil [Thu, 2 Feb 2012 18:41:00 +0000 (10:41 -0800)]
Merge branch 'master' into wip-encoding

Conflicts:
src/osd/OSD.cc
src/osd/PG.cc
src/osd/PG.h

13 years agocommon/Throttle: throttle in FIFO order
Jim Schutt [Wed, 1 Feb 2012 15:54:25 +0000 (08:54 -0700)]
common/Throttle: throttle in FIFO order

Under heavy write load from many clients, many reader threads will
be waiting in the policy throttler, all on a single condition variable.
When a wakeup is signalled, any of those threads may receive the
signal.  This increases the variance in the message processing
latency, and in extreme cases can significantly delay a message.

This patch causes threads to exit a throttler in the same order
they entered.

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: fix osd_recover_clone_overlap
Sage Weil [Thu, 2 Feb 2012 18:31:17 +0000 (10:31 -0800)]
osd: fix osd_recover_clone_overlap

- we need to populate data_subset
- add check in calc_head_subsets() too

Fixes 2116f012.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: use obc for size in calc_head_subsets()
Sage Weil [Thu, 2 Feb 2012 18:29:39 +0000 (10:29 -0800)]
osd: use obc for size in calc_head_subsets()

No need to call stat(2) here; the caller has what we need.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agofilestore: remove obsolete fs type check
Sage Weil [Thu, 2 Feb 2012 18:03:28 +0000 (10:03 -0800)]
filestore: remove obsolete fs type check

This isn't a useful check.  xfs and ext4 work too.

Fixes: #1995
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoclient: add initialized flag to client
Sage Weil [Thu, 2 Feb 2012 05:12:31 +0000 (21:12 -0800)]
client: add initialized flag to client

Do not call init() while initialized; do not call shutdown unless
initialized.

Drop incoming messages if not initialized (we are probably racing with
shutdown).

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoclient: let set_filer_flags clear flags, toos
Sage Weil [Thu, 2 Feb 2012 05:11:47 +0000 (21:11 -0800)]
client: let set_filer_flags clear flags, toos

ceph-syn does this...

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrados: discard incoming messages when DISCONNECTED
Sage Weil [Thu, 2 Feb 2012 05:08:31 +0000 (21:08 -0800)]
librados: discard incoming messages when DISCONNECTED

If we are disconnected (probably shutting down, if we are receiving a
message) then ignore anything incoming.  This avoids passing it to
partially torn down subsystems like the objecter.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoobjecter: track whether initialized; add asserts
Sage Weil [Thu, 2 Feb 2012 05:07:40 +0000 (21:07 -0800)]
objecter: track whether initialized; add asserts

init() should be called when not initialized; shutdown() should not be
called unless initialized.  No handle_* method should be called unless
initialized.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agotest_filejournal: fix warnings
Sage Weil [Thu, 2 Feb 2012 17:01:15 +0000 (09:01 -0800)]
test_filejournal: fix warnings

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: mark_started() osd sub ops
Greg Farnum [Thu, 2 Feb 2012 01:10:41 +0000 (17:10 -0800)]
osd: mark_started() osd sub ops

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: d'oh again! Make this real exponential, not...ever-linear.
Greg Farnum [Thu, 2 Feb 2012 00:28:35 +0000 (16:28 -0800)]
osd: d'oh again! Make this real exponential, not...ever-linear.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: OpRequest currently_* needs to look at latest, not hit.
Greg Farnum [Thu, 2 Feb 2012 00:28:18 +0000 (16:28 -0800)]
osd: OpRequest currently_* needs to look at latest, not hit.

D'oh!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agodo_autogen.sh: -e <path> to dump encoded objects to a path
Sage Weil [Thu, 2 Feb 2012 00:34:00 +0000 (16:34 -0800)]
do_autogen.sh: -e <path> to dump encoded objects to a path

Make it easy to build with encode dumping enabled.  This is just a
convenient way to generate a large corpus of encoded objects.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agocheck-generated.sh: run on 'make check'
Sage Weil [Thu, 2 Feb 2012 00:13:19 +0000 (16:13 -0800)]
check-generated.sh: run on 'make check'

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge remote branch 'origin/master' into wip-osd-op-tracking
Greg Farnum [Thu, 2 Feb 2012 00:05:32 +0000 (16:05 -0800)]
Merge remote branch 'origin/master' into wip-osd-op-tracking

Conflicts:
src/osd/ReplicatedPG.h

13 years agoosd: pg_stat_t: fix member initialization
Sage Weil [Wed, 1 Feb 2012 23:54:09 +0000 (15:54 -0800)]
osd: pg_stat_t: fix member initialization

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: add check_ops_in_flight()
Greg Farnum [Wed, 1 Feb 2012 21:25:37 +0000 (13:25 -0800)]
osd: add check_ops_in_flight()

By default it warns on requests that are more than 30 seconds old,
using an exponential backoff of that interval.
Also add state name retrieval to OpRequest.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: fix PG::Interval member initialization
Sage Weil [Wed, 1 Feb 2012 23:51:57 +0000 (15:51 -0800)]
osd: fix PG::Interval member initialization

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosdmap: finalize crush after building simple map
Sage Weil [Wed, 1 Feb 2012 23:49:55 +0000 (15:49 -0800)]
osdmap: finalize crush after building simple map

This ensures that max_devices gets calculated (and thus encoded) properly.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosdmap: make test instnaces deterministic
Sage Weil [Wed, 1 Feb 2012 23:49:31 +0000 (15:49 -0800)]
osdmap: make test instnaces deterministic

current time can vary

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoimport-generated.sh: fix to use ceph-dencoder syntax
Sage Weil [Wed, 1 Feb 2012 23:41:34 +0000 (15:41 -0800)]
import-generated.sh: fix to use ceph-dencoder syntax

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: fix ctor
Sage Weil [Wed, 1 Feb 2012 23:41:12 +0000 (15:41 -0800)]
ceph-dencoder: fix ctor

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph_context: initialize member var
Sage Weil [Wed, 1 Feb 2012 23:31:52 +0000 (15:31 -0800)]
ceph_context: initialize member var

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: "mark" OpRequests as they move through the system.
Greg Farnum [Mon, 30 Jan 2012 22:50:28 +0000 (14:50 -0800)]
osd: "mark" OpRequests as they move through the system.

Right now these are just informational flags which can be read out. Later
they might extend to timing information, separate lists for more precise
control over latency warnings, etc.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoPG: switch op passing interface to use OpRequest
Greg Farnum [Thu, 26 Jan 2012 01:30:07 +0000 (17:30 -0800)]
PG: switch op passing interface to use OpRequest

This is all the PG/ReplicatedPG internals and the few remaining OSD callers.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: switch op passing interface to use OpRequest instead of raw Messages
Greg Farnum [Wed, 25 Jan 2012 23:51:58 +0000 (15:51 -0800)]
osd: switch op passing interface to use OpRequest instead of raw Messages

This doesn't handle the PG internals yet.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: add new OpRequest struct and an xlist to track it
Greg Farnum [Wed, 25 Jan 2012 23:48:44 +0000 (15:48 -0800)]
osd: add new OpRequest struct and an xlist to track it

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoosd: PGLSResponse -> pg_ls_response_t
Sage Weil [Wed, 1 Feb 2012 22:53:16 +0000 (14:53 -0800)]
osd: PGLSResponse -> pg_ls_response_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: PG::Missing -> pg_missing_t
Sage Weil [Wed, 1 Feb 2012 22:45:05 +0000 (14:45 -0800)]
osd: PG::Missing -> pg_missing_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: PG::Log -> pg_log_t
Sage Weil [Wed, 1 Feb 2012 22:28:04 +0000 (14:28 -0800)]
osd: PG::Log -> pg_log_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: PG::Log::Entry -> pg_log_entry_t
Sage Weil [Wed, 1 Feb 2012 22:16:11 +0000 (14:16 -0800)]
osd: PG::Log::Entry -> pg_log_entry_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: PG::Query -> pg_query_t
Sage Weil [Wed, 1 Feb 2012 21:03:08 +0000 (13:03 -0800)]
osd: PG::Query -> pg_query_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agocls_rgw: update bucket index when deleting object (with pending)
Yehuda Sadeh [Wed, 1 Feb 2012 20:55:52 +0000 (12:55 -0800)]
cls_rgw: update bucket index when deleting object (with pending)

Bug #2012. Racing delete with other operations (update or another
delete) failed to update the bucket index.

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
13 years agoosd: PG::Info -> pg_info_t
Sage Weil [Wed, 1 Feb 2012 20:53:24 +0000 (12:53 -0800)]
osd: PG::Info -> pg_info_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: PG::Info::History -> pg_history_t
Sage Weil [Wed, 1 Feb 2012 20:43:17 +0000 (12:43 -0800)]
osd: PG::Info::History -> pg_history_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: PG::Info[::History] dump, test instances
Sage Weil [Wed, 1 Feb 2012 19:52:08 +0000 (11:52 -0800)]
osd: PG::Info[::History] dump, test instances

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: remove message type dups
Sage Weil [Wed, 1 Feb 2012 19:26:47 +0000 (11:26 -0800)]
ceph-dencoder: remove message type dups

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: generate test instances on heap
Sage Weil [Wed, 1 Feb 2012 19:25:30 +0000 (11:25 -0800)]
ceph-dencoder: generate test instances on heap

Some objects aren't copyable (OSDMap contains CrushWrapper), but we'd
still like to programmatically generate test instances.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge remote branch 'gh/wip-divergent-backfill'
Sage Weil [Wed, 1 Feb 2012 18:55:45 +0000 (10:55 -0800)]
Merge remote branch 'gh/wip-divergent-backfill'

Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
13 years agoosd: dump, test instances for PG::Interval
Sage Weil [Wed, 1 Feb 2012 18:49:21 +0000 (10:49 -0800)]
osd: dump, test instances for PG::Interval

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: dump, instances for PG::OndiskLog
Sage Weil [Wed, 1 Feb 2012 18:46:10 +0000 (10:46 -0800)]
osd: dump, instances for PG::OndiskLog

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: use g_ceph_context
Sage Weil [Wed, 1 Feb 2012 18:41:53 +0000 (10:41 -0800)]
ceph-dencoder: use g_ceph_context

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: OSDMap and osd_info_t
Sage Weil [Wed, 1 Feb 2012 18:41:39 +0000 (10:41 -0800)]
ceph-dencoder: OSDMap and osd_info_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosdmap: test instances for osd_info_t
Sage Weil [Wed, 1 Feb 2012 18:41:24 +0000 (10:41 -0800)]
osdmap: test instances for osd_info_t

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosdmap: test instances
Sage Weil [Wed, 1 Feb 2012 18:40:08 +0000 (10:40 -0800)]
osdmap: test instances

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosdmap: normalist encode/decode
Sage Weil [Wed, 1 Feb 2012 18:34:26 +0000 (10:34 -0800)]
osdmap: normalist encode/decode

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoceph-dencoder: add all message types
Sage Weil [Wed, 1 Feb 2012 06:48:30 +0000 (22:48 -0800)]
ceph-dencoder: add all message types

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomsg: add missing #includes for messages
Sage Weil [Wed, 1 Feb 2012 06:48:14 +0000 (22:48 -0800)]
msg: add missing #includes for messages

And remove that unused max() macro.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomsg: dump messages via build option
Sage Weil [Wed, 1 Feb 2012 06:39:43 +0000 (22:39 -0800)]
msg: dump messages via build option

Dump encoded messages to ENCODE_DUMP when it is defined, just as we do with
the regular encode function.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix assignment in PG::rewind_divergent_log()
Sage Weil [Wed, 1 Feb 2012 04:06:27 +0000 (20:06 -0800)]
osd: fix assignment in PG::rewind_divergent_log()

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMerge remote-tracking branch 'gh/wip-journal-crc'
Sage Weil [Wed, 1 Feb 2012 00:18:52 +0000 (16:18 -0800)]
Merge remote-tracking branch 'gh/wip-journal-crc'

Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
13 years agomsgr: Document recv_stamp and add a dispatch_stamp and throttle_wait.
Greg Farnum [Thu, 12 Jan 2012 20:42:21 +0000 (12:42 -0800)]
msgr: Document recv_stamp and add a dispatch_stamp and throttle_wait.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agoqa: test_backfill.sh: take osd.0 down
Sage Weil [Tue, 31 Jan 2012 21:00:45 +0000 (13:00 -0800)]
qa: test_backfill.sh: take osd.0 down

Mark this down to
1- trigger the WaitActingChange vs osd down race, and
2- help trigger a divergnet log when osd.2 is blackholed+restarted during
   backfill.  e.g.,

./ceph -- tell osd.1 injectargs '--filestore-blackhole' ; sleep 10 ; ./init-ceph restart osd.1

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: restart peering if requesting acting osd goes down
Sage Weil [Tue, 31 Jan 2012 17:53:32 +0000 (09:53 -0800)]
osd: restart peering if requesting acting osd goes down

If we request an acting set, we need to restart peering if one of the
requested nodes goes down.  This prevents a deadlock where we get stuck
in WaitActingChange because we have [a,b], want [a,b,c], but c is down and
our up and acting don't actually change.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: rename recovery event NeedNewMap -> NeedActingChange
Sage Weil [Tue, 31 Jan 2012 17:40:23 +0000 (09:40 -0800)]
osd: rename recovery event NeedNewMap -> NeedActingChange

This is more precise.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoosd: use RecoveryContext transaction, finishers on recovery completion
Sage Weil [Tue, 31 Jan 2012 15:23:10 +0000 (07:23 -0800)]
osd: use RecoveryContext transaction, finishers on recovery completion

We should use the enclosing transaction and finisher list here.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoqa: test_backfill.sh: limit pg log length so we trigger backfill
Sage Weil [Tue, 31 Jan 2012 15:16:37 +0000 (07:16 -0800)]
qa: test_backfill.sh: limit pg log length so we trigger backfill

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix divergent backfill targets
Sage Weil [Tue, 31 Jan 2012 15:25:04 +0000 (07:25 -0800)]
osd: fix divergent backfill targets

During peering, a previous backfill target may have a slightly newer
last_update than the other options, but it will not be chosen because it
is incomplete.  That caused a failed assert during activate() (#1983).

To fix, we remove the bad assert, and then fix merge_log() so that the
replica/backfill target will trim its divergent entries when it gets the
activation MLogRec.  We also fix the handling of MInfoRec, as that can
trigger the same analogous condition.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agofilestore: implement filestore_blackhole hook
Sage Weil [Tue, 31 Jan 2012 01:39:23 +0000 (17:39 -0800)]
filestore: implement filestore_blackhole hook

If true, we'll drop any new transactions on the floor. Useful for
triggering failure conditions (e.g., prior to killing ceph-osd itself, to
ensure some operations don't reach the local disk).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: should remove bucket dir instead of sending intent
Yehuda Sadeh [Tue, 31 Jan 2012 01:00:37 +0000 (17:00 -0800)]
rgw: should remove bucket dir instead of sending intent

that was really useless, and also bucket cleanup was broken anyway.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
13 years agolibrados: fix a leak
Yehuda Sadeh [Tue, 31 Jan 2012 00:48:15 +0000 (16:48 -0800)]
librados: fix a leak

watch notification message was missing a ->put()

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
13 years agoosd: disable clone overlap for push/pull
Sage Weil [Mon, 30 Jan 2012 22:27:24 +0000 (14:27 -0800)]
osd: disable clone overlap for push/pull

There is a bug in the push/pull code.  Disable the recovery smarts by
default until we fix #2002.

There is currently a race (in the callers) where:
 - an adjacent clone is missing
 - we (calculate some clone overlap? and) start pulling
 - we get adjacent clone
 - we get push, calc a different overlap, and then get confused.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge remote branch 'gh/wip-warnings'
Sage Weil [Mon, 30 Jan 2012 21:42:45 +0000 (13:42 -0800)]
Merge remote branch 'gh/wip-warnings'