]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomkcephfs: set rdir for local mon setup
Sage Weil [Thu, 26 May 2011 17:19:04 +0000 (10:19 -0700)]
mkcephfs: set rdir for local mon setup

Fixes: #1113
Reported-by: Bernard Grymonpon <bernard@openminds.be>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: fix race in _activate_committed
Samuel Just [Wed, 25 May 2011 17:54:27 +0000 (10:54 -0700)]
PG: fix race in _activate_committed

Previously, _activate_committed would access the osdmap epoch racing
with handle_osd_map's osdmap update.  This would allow a message to be
sent from a replica to the primary tagged with the same epoch as
last_warm_restart, though the event actually occured before
last_warm_restart.  Thus the primary would fail to ignore the event and
transition to crashed.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomds: do not shift to EXCL or MIX while rdlocked
Sage Weil [Wed, 18 May 2011 04:29:33 +0000 (21:29 -0700)]
mds: do not shift to EXCL or MIX while rdlocked

There was an old change in file_eval() that was allowing us to switch from
SYNC to MIX or EXCL while there were rdlocks, which either caused lots of
lock thrashing or could (I think) hang things up completely.  This was
from ea10a672, an ancient fix for something related that appears to have
taken out the rdlocked check by accident.

In my tests (one writer, one stat-er), this took things from long stalls
(up to 20 seconds) to very responsive stats.  Yay!

Fixes: #791
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: tolerate ENOENT when prezeroing
Sage Weil [Wed, 11 May 2011 04:35:50 +0000 (21:35 -0700)]
journaler: tolerate ENOENT when prezeroing

ENOENT is okay and expected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: add ability to explicitly mark unfound as lost
Sage Weil [Tue, 24 May 2011 16:47:06 +0000 (09:47 -0700)]
osd: add ability to explicitly mark unfound as lost

Instead of automatically marking unfound objects lost (once we've tried
every location we can think of), do it when the administator explicitly
says to.  This avoids marking things wrong incorrectly when there are
peering issues, and also allows the administrator to decide whether there
may be offline osds that are worth bringing online.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: make automatically marking of unfound as lost optional
Sage Weil [Tue, 24 May 2011 16:42:39 +0000 (09:42 -0700)]
osd: make automatically marking of unfound as lost optional

We may not want to do this automatically until we have more confidense in
the recovery code.  Even then, possible not.  In particular, the OSDs may
believe they have contact all possible homes for the data even though there
is some long-lost OSD that has the data on disk that if offline.

For now, we make the marking process explicit so that the administrator can
make the call.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: initialize stray_index on startup
Sage Weil [Tue, 24 May 2011 16:24:42 +0000 (09:24 -0700)]
mds: initialize stray_index on startup

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agov0.28.1 v0.28.1
Sage Weil [Tue, 24 May 2011 04:11:44 +0000 (21:11 -0700)]
v0.28.1

14 years agocrushtool: default to hash 0 (rjenkins1)
Sage Weil [Fri, 20 May 2011 22:44:15 +0000 (15:44 -0700)]
crushtool: default to hash 0 (rjenkins1)

Otherwise we get 255 which is undefined and get bad results!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: update last_epoch_clean in PG::Info::History::merge()
Sage Weil [Fri, 20 May 2011 22:08:06 +0000 (15:08 -0700)]
osd: update last_epoch_clean in PG::Info::History::merge()

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: small cleanup
Sage Weil [Fri, 20 May 2011 22:04:57 +0000 (15:04 -0700)]
osd: small cleanup

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: merge history when primary sends replica new pg info
Sage Weil [Fri, 20 May 2011 22:04:09 +0000 (15:04 -0700)]
osd: merge history when primary sends replica new pg info

This, among other things, lets us update last_epoch_started and
last_epoch_clean.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: more heartbeat rework
Sage Weil [Fri, 20 May 2011 21:45:36 +0000 (14:45 -0700)]
osd: more heartbeat rework

A few things:
 - track Connection* instead of entity_inst_t for hb peers
 - we can only send maps over the cluster_messenger
   - if peer is still alive, do that
   - if peer is not, send dying MOSDPing ping with YOU_DIED flag

14 years agomsgr: don't close close_on_empty until outgoing messages are acked
Sage Weil [Fri, 20 May 2011 21:43:57 +0000 (14:43 -0700)]
msgr: don't close close_on_empty until outgoing messages are acked

Otherwise, if we close the socket, we may lose in-flight data.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: only forget peer epochs if they are down AND no longer heartbeat peers
Sage Weil [Fri, 20 May 2011 20:25:22 +0000 (13:25 -0700)]
osd: only forget peer epochs if they are down AND no longer heartbeat peers

If we forget the peer epoch when we see them go down, we won't share the
map later in update_heartbeat_peers() to tell them they're down.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: show last_epoch_clean in PG::Info::History printer
Sage Weil [Fri, 20 May 2011 20:01:22 +0000 (13:01 -0700)]
osd: show last_epoch_clean in PG::Info::History printer

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: rework peer map epoch caching
Sage Weil [Fri, 20 May 2011 19:55:29 +0000 (12:55 -0700)]
osd: rework peer map epoch caching

We try to keep track of which epochs our peers have so that we can be
semi-intelligent about which map incrementals we send preceeding any
messages.  Since this is useful from the heartbeat and cluster channels/
threads, protect the data with an inner lock and clean up the callers.

Be smarter about when we forget.

Make note of peer epoch when we receive a ping.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: fix parsing of 'osd foo N ...' commands with multiple ids
Sage Weil [Fri, 20 May 2011 19:22:22 +0000 (12:22 -0700)]
mon: fix parsing of 'osd foo N ...' commands with multiple ids

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agodout: reopen log files on SIGHUP
Colin Patrick McCabe [Fri, 20 May 2011 21:23:10 +0000 (14:23 -0700)]
dout: reopen log files on SIGHUP

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: clean up old _from target cleanup; fix one case; share map
Sage Weil [Fri, 20 May 2011 18:29:05 +0000 (11:29 -0700)]
osd: clean up old _from target cleanup; fix one case; share map

Clean up the code to mirror the _to case.

Previously we would not mark down an old _from that is still a _to but with
a new address.  Now we do.

Share a map while we're at it, just to be nice!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: mark down old _to targets
Sage Weil [Fri, 20 May 2011 18:25:27 +0000 (11:25 -0700)]
osd: mark down old _to targets

If a peer remains a _to target but their address changes, we still want
to mark down the old connection.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: share map with old _to peers
Sage Weil [Fri, 20 May 2011 18:20:20 +0000 (11:20 -0700)]
osd: share map with old _to peers

Use new msgr hooks to do this cleanly.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: clean up handle_osd_ping output
Sage Weil [Fri, 20 May 2011 18:17:19 +0000 (11:17 -0700)]
osd: clean up handle_osd_ping output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: ignore stale requests for heartbeats
Sage Weil [Fri, 20 May 2011 17:54:46 +0000 (10:54 -0700)]
osd: ignore stale requests for heartbeats

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: don't prioritize heartbeat requests
Sage Weil [Fri, 20 May 2011 17:43:12 +0000 (10:43 -0700)]
osd: don't prioritize heartbeat requests

This could conceivably screw up ordering, and priority doesn't matter
anyway when this is the first message we send to this peer.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: do not clobber explicitly requested heartbeat_to target addresss
Sage Weil [Fri, 20 May 2011 17:42:16 +0000 (10:42 -0700)]
osd: do not clobber explicitly requested heartbeat_to target addresss

Consider peer P.

- P does down in, say, epoch 60, and back up in epoch 70
- P and requests a heartbeat, as_of 70
- We update to map 50, and coincidentally add the same peer as a target
- We set the heartbeat_to[P] = 50 and start sending to the _old_ address
- P marks us down because we stop sending to the new addr
- We eventually get map 70, but it's too late!

Make sure we preserve any _to targets _and_ their epoch+inst.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: request proper log extent for missing
Sage Weil [Fri, 20 May 2011 16:29:10 +0000 (09:29 -0700)]
osd: request proper log extent for missing

We can't blinding ask for everything since last_epoch_started because that
may mean we get some fragment of a backlog.  Look at the peer's log
ranges and request the correct thing.  Also, in fulfill_log, infer what
the primary should have asked for if they make a bad request.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix log bounds check
Sage Weil [Fri, 20 May 2011 15:44:42 +0000 (08:44 -0700)]
osd: fix log bounds check

We weren't accounting for the case where we have

 (foo,foo]+backlog

i.e., everything is backlog, and rbegin().version != log.head.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: osd# is in log entry header/prefix
Sage Weil [Fri, 20 May 2011 15:35:44 +0000 (08:35 -0700)]
osd: osd# is in log entry header/prefix

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: log broken pg state to monitor on startup, activate
Sage Weil [Fri, 20 May 2011 15:33:07 +0000 (08:33 -0700)]
osd: log broken pg state to monitor on startup, activate

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix proc_replica_log when peer log is empty
Sage Weil [Fri, 20 May 2011 15:09:11 +0000 (08:09 -0700)]
osd: fix proc_replica_log when peer log is empty

If the peer log is empty, and we break out of the loop on the first pass,
then clearly last_update has not been adjusted.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: encode keyring as plaintext after --mkkey
Sage Weil [Fri, 20 May 2011 14:25:24 +0000 (07:25 -0700)]
osd: encode keyring as plaintext after --mkkey

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agokeyring: make encode_plaintext method
Sage Weil [Fri, 20 May 2011 14:25:16 +0000 (07:25 -0700)]
keyring: make encode_plaintext method

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'wip_choose_acting' into stable
Sage Weil [Fri, 20 May 2011 07:41:31 +0000 (00:41 -0700)]
Merge branch 'wip_choose_acting' into stable

14 years agoosd: take remote log when it is clearly superior
Sage Weil [Fri, 20 May 2011 07:27:00 +0000 (00:27 -0700)]
osd: take remote log when it is clearly superior

I'm hitting a case where the primary is compensating for a replica's
last_complete < log.tail by sending a log+backlog, but the replica
isn't smart enough to take advantage.  In this case,

      replica: log(781'26629,781'26631]
 from primary: log(781'26629,781'26631]+backlog
       result: log(781'26629,781'26631]

Doh!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix compensation for bad last_complete
Sage Weil [Fri, 20 May 2011 07:14:24 +0000 (00:14 -0700)]
osd: fix compensation for bad last_complete

If the peer has a last_complete below their tail, we can get by with our
log (without backlog) if our tail if _before_ their last_complete, not
after.  Otherwise, we need a backlog!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: remove some build_prior stringstream cruft
Sage Weil [Fri, 20 May 2011 06:48:53 +0000 (23:48 -0700)]
osd: remove some build_prior stringstream cruft

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: remove useless debug print
Sage Weil [Fri, 20 May 2011 06:46:19 +0000 (23:46 -0700)]
osd: remove useless debug print

We dump this (and more) at the end of the PgPriorSet constructor.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: include past acting osds if they were up
Sage Weil [Fri, 20 May 2011 06:40:12 +0000 (23:40 -0700)]
osd: include past acting osds if they were up

This fixes a bug where we were excluding up (but not acting) nodes from
past intervals, which in turn was triggering a nasty choose_acting loop
(because we _do_ already include acting but !up from the current
interval).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: do not exclude me during build_prior
Sage Weil [Fri, 20 May 2011 06:38:25 +0000 (23:38 -0700)]
osd: do not exclude me during build_prior

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: show final build_prior result
Sage Weil [Fri, 20 May 2011 06:25:32 +0000 (23:25 -0700)]
osd: show final build_prior result

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoOSD, PG: ignore peering messages from before the last peering restart
Josh Durgin [Fri, 20 May 2011 00:19:59 +0000 (17:19 -0700)]
OSD, PG: ignore peering messages from before the last peering restart

Check them before entering the state machine so we can
safely enter the Crashed state on unexpected messages
from the current interval.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoOSD: decrement message refcount before returning
Josh Durgin [Fri, 20 May 2011 00:46:40 +0000 (17:46 -0700)]
OSD: decrement message refcount before returning

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: add_event, add_next_event: ignore prior_version on backlog events
Samuel Just [Thu, 19 May 2011 21:13:56 +0000 (14:13 -0700)]
PG: add_event, add_next_event: ignore prior_version on backlog events

We would not have the previous version if we are merging backlog events.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: choose_log_location: prefer OSDs with a backlog
Josh Durgin [Thu, 19 May 2011 21:31:30 +0000 (14:31 -0700)]
PG: choose_log_location: prefer OSDs with a backlog

Without preferring an OSD with a backlog, PGs would get stuck in the
active state when acting != up and the backlog was on an OSD with the
same last_update but a lower number or log_tail.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoOSD: send a log in response to a log query when the pg dne
Josh Durgin [Thu, 19 May 2011 17:44:57 +0000 (10:44 -0700)]
OSD: send a log in response to a log query when the pg dne

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoReplicatedPG: wait_for_missing_object in _rollback_to
Samuel Just [Thu, 19 May 2011 19:23:55 +0000 (12:23 -0700)]
ReplicatedPG: wait_for_missing_object in _rollback_to

Previously, we failed if the relevant clone had not yet been recovered.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoclient: do not retake lock in sync_write_commit
Sage Weil [Thu, 19 May 2011 17:39:36 +0000 (10:39 -0700)]
client: do not retake lock in sync_write_commit

We already hold the lock from a few frames up the stack (ms_dispatch).

Reported-by: Simon Tian <aixt2006@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agojournaler: ENOENT is okay on trim
Sage Weil [Thu, 19 May 2011 17:11:56 +0000 (10:11 -0700)]
journaler: ENOENT is okay on trim

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomkcephfs: pick rdir based on whether current daemon is local or not
Sage Weil [Thu, 19 May 2011 16:29:11 +0000 (09:29 -0700)]
mkcephfs: pick rdir based on whether current daemon is local or not

We need to pick $rdir as local or remote inside the for name loop.

Fixes: #1094
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: remove unused argument to adjust_need_up_thru
Josh Durgin [Wed, 18 May 2011 23:46:25 +0000 (16:46 -0700)]
PG: remove unused argument to adjust_need_up_thru

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: include ourselves in the prior set
Josh Durgin [Wed, 18 May 2011 23:44:05 +0000 (16:44 -0700)]
PG: include ourselves in the prior set

All acting OSDs should be in the prior set, since any of them may have
the newest update.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: choose acting set and newest_update_osd based on a map of all osds
Josh Durgin [Wed, 18 May 2011 22:54:06 +0000 (15:54 -0700)]
PG: choose acting set and newest_update_osd based on a map of all osds

newest_update osd should be stable when the primary changes, to
prevent cycles of acting set choices. For the same reason, we should
not treat the primary as a special case in choose_acting.

Also remove the magic -1 from representing the current primary.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: GetLog: don't fail if we get an outdated log
Josh Durgin [Wed, 18 May 2011 23:15:28 +0000 (16:15 -0700)]
PG: GetLog: don't fail if we get an outdated log

If we request a log from one osd, and then another member of our prior
set comes up with a later last_update, we should not fail when we
receive the first log.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: reset pg_trim_to in clear_primary_state
Samuel Just [Wed, 18 May 2011 23:47:04 +0000 (16:47 -0700)]
PG: reset pg_trim_to in clear_primary_state

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: choose_acting: we need best_info to have a backlog, not the primary
Samuel Just [Wed, 18 May 2011 20:07:13 +0000 (13:07 -0700)]
PG: choose_acting: we need best_info to have a backlog, not the primary

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: _remove_pg, reset info.last_update and info.log_tail on log zero
Samuel Just [Wed, 18 May 2011 19:36:33 +0000 (12:36 -0700)]
PG: _remove_pg, reset info.last_update and info.log_tail on log zero

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: merge_log- fix extend log case
Samuel Just [Wed, 18 May 2011 18:54:07 +0000 (11:54 -0700)]
PG: merge_log- fix extend log case

Previously, when extending an empty log with a log with the same
last_update, we would fail an assert since we would reach the end of the
new log.

14 years agoPG: prefer log with longer tail
Samuel Just [Wed, 18 May 2011 17:40:33 +0000 (10:40 -0700)]
PG: prefer log with longer tail

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoosd: clean up choose_acting output
Sage Weil [Wed, 18 May 2011 00:50:54 +0000 (17:50 -0700)]
osd: clean up choose_acting output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoPG: make choose_acting a bit smarter
Samuel Just [Tue, 17 May 2011 22:59:32 +0000 (15:59 -0700)]
PG: make choose_acting a bit smarter

This change allows old strays that don't need backlogs
to stay acting until current members of the up set are caught up.
This allows the up set to maintain its full size during peering.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoman: update cosd man page
Sage Weil [Wed, 18 May 2011 18:45:46 +0000 (11:45 -0700)]
man: update cosd man page

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agov0.28 v0.28
Sage Weil [Wed, 18 May 2011 01:03:37 +0000 (18:03 -0700)]
v0.28

14 years agomsgr: fix signedness in alloc_aligned_buffer
Sage Weil [Wed, 18 May 2011 17:06:44 +0000 (10:06 -0700)]
msgr: fix signedness in alloc_aligned_buffer

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocrush: fix clitest now that leading spaces are stripped
Sage Weil [Wed, 18 May 2011 16:26:51 +0000 (09:26 -0700)]
crush: fix clitest now that leading spaces are stripped

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMakefile: don't clean up some files
Yehuda Sadeh [Wed, 18 May 2011 11:53:41 +0000 (04:53 -0700)]
Makefile: don't clean up some files

14 years agoMerge remote branch 'origin/stable' into next
Sage Weil [Wed, 18 May 2011 05:04:44 +0000 (22:04 -0700)]
Merge remote branch 'origin/stable' into next

14 years agopage: fix #ifdef guard
Sage Weil [Wed, 18 May 2011 05:00:03 +0000 (22:00 -0700)]
page: fix #ifdef guard

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agopage: redefine PAGE_* macros
Sage Weil [Wed, 18 May 2011 01:26:46 +0000 (18:26 -0700)]
page: redefine PAGE_* macros

Saw this on sid i386:

msg/SimpleMessenger.cc: In function 'void alloc_aligned_buffer(ceph::bufferlist&
, int, int)':
msg/SimpleMessenger.cc:1782:14: error: '__sysconf' was not declared in this scop
e
msg/SimpleMessenger.cc:1789:23: error: '__sysconf' was not declared in this scop

Some header is clobbering out PAGE_* macros.  Make our header more
forceful.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: add --mkkey mkfs option
Sage Weil [Wed, 18 May 2011 01:46:38 +0000 (18:46 -0700)]
osd: add --mkkey mkfs option

Optionally generate a new key as part of the mkfs step.  This makes life
a bit easier for the admin.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: 'auth caps <name> [svc value [svc2 value2 [...]]]'
Sage Weil [Wed, 18 May 2011 01:32:03 +0000 (18:32 -0700)]
mon: 'auth caps <name> [svc value [svc2 value2 [...]]]'

Avoid having to futz with cauthtool if possible.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoPG: update same_acting_since when acting or up changes
Josh Durgin [Wed, 18 May 2011 00:36:39 +0000 (17:36 -0700)]
PG: update same_acting_since when acting or up changes

This is a hack since we currently use same_up_since to denote the beginning of an interval.
We should probably change this usaged or rename it to same_interval since.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agocrush: allow - and _ in crushmap type/item names
Sage Weil [Wed, 18 May 2011 00:27:39 +0000 (17:27 -0700)]
crush: allow - and _ in crushmap type/item names

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocrushtool: strip leading spaces from identifiers
Sage Weil [Wed, 18 May 2011 00:27:16 +0000 (17:27 -0700)]
crushtool: strip leading spaces from identifiers

No idea where these are coming from!  Weird.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomsgr: avoid clearing connection_state on pipe replacement
Sage Weil [Tue, 17 May 2011 17:10:45 +0000 (10:10 -0700)]
msgr: avoid clearing connection_state on pipe replacement

read_message and write_message both dereference connection-state, so avoid
clearing it when replacing a pipe.

read_message still uses it to find rx_buffers in ways that may interfere
when two Pipes reference the connection, but currently that is only used
for lossy pipes.  We could still take pipe_lock in that case, but it is
only an optimization (we copy the data if the buffers don't get used
directly) and probably not worth bothering with.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph.spec.in: add obsync
Sage Weil [Tue, 17 May 2011 21:25:47 +0000 (14:25 -0700)]
ceph.spec.in: add obsync

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agodebian: obsync
Sage Weil [Mon, 16 May 2011 21:28:33 +0000 (14:28 -0700)]
debian: obsync

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobsync: no .py
Sage Weil [Mon, 16 May 2011 21:28:28 +0000 (14:28 -0700)]
obsync: no .py

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: Replicas send Notifies in response to queries
Samuel Just [Wed, 11 May 2011 18:56:34 +0000 (11:56 -0700)]
PG: Replicas send Notifies in response to queries

Replicas only send Infos during activate.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: choose_log_location, fix error when scanning up set
Samuel Just [Wed, 11 May 2011 20:50:20 +0000 (13:50 -0700)]
PG: choose_log_location, fix error when scanning up set

++up.begin() does not skip the primary. Primary might not be up[0].

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: PG can receive a log in WaitActingChange requested in GetLog
Samuel Just [Tue, 17 May 2011 16:57:09 +0000 (09:57 -0700)]
PG: PG can receive a log in WaitActingChange requested in GetLog

Discard logs requested during GetLog once we are in WaitActingChange.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: Don't use exit to call proc_master_log
Samuel Just [Mon, 16 May 2011 23:24:02 +0000 (16:24 -0700)]
PG: Don't use exit to call proc_master_log

exit is also invoked when transitioning to Reset...

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomon: health WARN if monitor quorum is incomplete
Sage Weil [Mon, 16 May 2011 20:42:31 +0000 (13:42 -0700)]
mon: health WARN if monitor quorum is incomplete

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofix segfault introduced by commit de640d85fa3e0e5e5a31704eab5a8714a1ffe867
root [Sun, 15 May 2011 13:54:13 +0000 (08:54 -0500)]
fix segfault introduced by commit de640d85fa3e0e5e5a31704eab5a8714a1ffe867

That commit introduces the line 'cur_con->put()' which has the possibility
of being called while cur_con is not initialized.

14 years agoosd: lazily close connections to down peers
Sage Weil [Fri, 13 May 2011 20:01:52 +0000 (13:01 -0700)]
osd: lazily close connections to down peers

If we hear from a peer that should be dead, tell them, but mark our
connection so that it will close after that message is delivered or if
it encounters any errors.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomsgr: mark_down_on_empty and mark_disposable
Sage Weil [Fri, 13 May 2011 20:01:08 +0000 (13:01 -0700)]
msgr: mark_down_on_empty and mark_disposable

Mark a connection to close when messages are sent, and to close on any
error.  We can use this to tell people who should be dead that they should
be dead, but not waste resources reconnecting to them.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoPG: Remove downed osds from peer_missing and peer_info
Sage Weil [Sat, 14 May 2011 20:46:09 +0000 (13:46 -0700)]
PG: Remove downed osds from peer_missing and peer_info

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoPG: Only pull the master log from a member of the prior_set
Samuel Just [Sat, 14 May 2011 00:30:50 +0000 (17:30 -0700)]
PG: Only pull the master log from a member of the prior_set

There must be a member of the prior_set such that no other
osd has a more recent last_update.  This way, prior_set_affected
will ensure that we reset peering if the master log source
goes down.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoMerge remote branch 'origin/osd_snap' into stable
Sage Weil [Fri, 13 May 2011 21:19:58 +0000 (14:19 -0700)]
Merge remote branch 'origin/osd_snap' into stable

14 years agoPG: search_for_missing takes the other osd's missing set
Samuel Just [Fri, 13 May 2011 21:07:05 +0000 (14:07 -0700)]
PG: search_for_missing takes the other osd's missing set

Previously, search_for_missing was erroneously passed the
primary's missing in a few places.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoradosgw_admin: fix clitest
Sage Weil [Fri, 13 May 2011 20:13:21 +0000 (13:13 -0700)]
radosgw_admin: fix clitest

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoradosgw_admin: dump log by object
Sage Weil [Thu, 12 May 2011 18:01:06 +0000 (11:01 -0700)]
radosgw_admin: dump log by object

instead of only by date+bucket.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: in S3 PUT, don't crash on Content-Length == 0
Colin Patrick McCabe [Thu, 12 May 2011 00:27:10 +0000 (17:27 -0700)]
rgw: in S3 PUT, don't crash on Content-Length == 0

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoObjecter: switch handle_osd_map op resending around
Greg Farnum [Wed, 11 May 2011 23:52:40 +0000 (16:52 -0700)]
Objecter: switch handle_osd_map op resending around

We need to order the resend by tid. We could do that in a
set with a special-purpose comparison function, but just
switching to a map is easier.
Use a list for LingerOps, as those should also
be ordered but don't maintain tids like regular Ops do.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoObjecter: implement operator<.
Greg Farnum [Wed, 11 May 2011 23:52:24 +0000 (16:52 -0700)]
Objecter: implement operator<.

This will maintain ordering of Ops when they're in eg STL sets.
Previously Objecter::handle_osd_map would indiscriminately fire out
Op replays in an order determined by their pointer address! Obviously,
this could cause breakage.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoosd: remove weird commit_op_seq fast-forward
Sage Weil [Wed, 11 May 2011 20:58:57 +0000 (13:58 -0700)]
osd: remove weird commit_op_seq fast-forward

This doesn't serve any purpose that we can discern.

In fact, it might cause problems because it'd allow the journal to apply
events that aren't aligned with the current/ state?

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: support rollback to cluster snapshot
Sage Weil [Wed, 11 May 2011 20:39:15 +0000 (13:39 -0700)]
osd: support rollback to cluster snapshot

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: trigger a store snapshot when the osdmap says to
Sage Weil [Wed, 11 May 2011 20:11:57 +0000 (13:11 -0700)]
osd: trigger a store snapshot when the osdmap says to

Move the OSDMap decoding up a bit so that we can either snapshot or flush.
We can't do it after we take map_lock or else we'll have problems dropping
and retaking osd_lock.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: add a snapshot command to create a snapshot of the entire store
Sage Weil [Wed, 11 May 2011 20:10:53 +0000 (13:10 -0700)]
filestore: add a snapshot command to create a snapshot of the entire store

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: add 'osd cluster_snap foo' command
Sage Weil [Wed, 11 May 2011 20:10:28 +0000 (13:10 -0700)]
mon: add 'osd cluster_snap foo' command

Signed-off-by: Sage Weil <sage@newdream.net>