]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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>
14 years agoosdmap: add cluster_snapshot field
Sage Weil [Wed, 11 May 2011 20:10:02 +0000 (13:10 -0700)]
osdmap: add cluster_snapshot field

Add a cluster_snapshot marker in the map that is valid for a single epoch
to do a coordinated snapshot of the entire OSD cluster.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoexpand testceph to check xattrs
Brian Chrisman [Tue, 10 May 2011 19:38:49 +0000 (12:38 -0700)]
expand testceph to check xattrs

Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
14 years agoclient: support security. namespace
Brian Chrisman [Wed, 11 May 2011 17:28:42 +0000 (10:28 -0700)]
client: support security. namespace

Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
14 years agosupport for xattrs in libceph
Brian Chrisman [Wed, 11 May 2011 17:27:50 +0000 (10:27 -0700)]
support for xattrs in libceph

Signed-off-by: Brian Chrisman <brchrisman@gmail.com>
14 years agomonclient: fix crash on shutdown
Sage Weil [Wed, 11 May 2011 04:30:52 +0000 (21:30 -0700)]
monclient: fix crash on shutdown

cur_con may be null on shutdown.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomonclient: maintain explicit session connection; ignore stray messages
Sage Weil [Tue, 10 May 2011 23:54:23 +0000 (16:54 -0700)]
monclient: maintain explicit session connection; ignore stray messages

Maintain an explicit Connection handle to send messages and mark_down old
monitor connections.  Ignore any incoming message that is not part of that
session.  This fixes problems with incoming messages that race with
session restarts.

Fixes: #1033
Reported-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrados: don't crash if we call connect twice
Sage Weil [Tue, 10 May 2011 22:23:26 +0000 (15:23 -0700)]
librados: don't crash if we call connect twice

Fixes: #1034
Reported-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/stable'
Sage Weil [Tue, 10 May 2011 21:33:30 +0000 (14:33 -0700)]
Merge remote branch 'origin/stable'

14 years agorados_sync: implement --delete-after, fix bugs
Colin Patrick McCabe [Tue, 10 May 2011 18:14:39 +0000 (11:14 -0700)]
rados_sync: implement --delete-after, fix bugs

Implement --delete-after for both export and import.

Fix DIR* leaks.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAllow dashes in ceph_argparse, etc.
Colin Patrick McCabe [Mon, 9 May 2011 23:18:48 +0000 (16:18 -0700)]
Allow dashes in ceph_argparse, etc.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest_rados_sync: test --force
Colin Patrick McCabe [Mon, 9 May 2011 23:09:50 +0000 (16:09 -0700)]
test_rados_sync: test --force

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados_sync: support --force
Colin Patrick McCabe [Mon, 9 May 2011 15:16:03 +0000 (08:16 -0700)]
rados_sync: support --force

Support --force, which re-copies all objects all the time.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: initialize oi.oloc if on-disk value is bogus
Sage Weil [Tue, 10 May 2011 15:22:34 +0000 (08:22 -0700)]
osd: initialize oi.oloc if on-disk value is bogus

If the on-disk locator is undefined (upgrade of an old cluster?) initialize
the oloc fields based on the PG::Info.

Reported-by: ar Fred <ar.fred@yahoo.com>
Tested-by: ar Fred <ar.fred@yahoo.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: switch bucket creation operations
Yehuda Sadeh [Tue, 10 May 2011 12:15:15 +0000 (05:15 -0700)]
rgw: switch bucket creation operations

First we create the pool, then we create the bucket object. This
should have the effect of making the bucket creation sync.

14 years agoosd: rename Pending -> WaitActingChange
Sage Weil [Mon, 9 May 2011 22:56:20 +0000 (15:56 -0700)]
osd: rename Pending -> WaitActingChange

We only use the Pending state while waiting for the acting set to change.
Rename the state and log it appropriately so we can see how much time the
OSD is spending doing this.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: log debug output for Crashed state
Sage Weil [Mon, 9 May 2011 22:55:38 +0000 (15:55 -0700)]
osd: log debug output for Crashed state

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: wait for up_thru updates
Sage Weil [Mon, 9 May 2011 22:50:28 +0000 (15:50 -0700)]
osd: wait for up_thru updates

Before the primary can go active we need to wait for the up_thru in the
osdmap to reflect that we were alive during the current interval.  This got
lost in the translation to the new state machine.

Add a new state WaitUpThru between GetMissing and Active, so that we can
continue doing the work of peering and finding unfound objects while we
are waiting for the osdmap to update.  Request said update early (in
GetInfo).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix pollution of peer_info
Sage Weil [Mon, 9 May 2011 22:37:28 +0000 (15:37 -0700)]
osd: fix pollution of peer_info

The ++ postfix has no effect here!  We really want +1.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix osd$foo typos
Sage Weil [Mon, 9 May 2011 22:36:39 +0000 (15:36 -0700)]
osd: fix osd$foo typos

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: simplify build_might_have_unfound
Sage Weil [Sat, 7 May 2011 20:22:06 +0000 (13:22 -0700)]
osd: simplify build_might_have_unfound

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: reset last_complete on mark_all_unfound_as_lost if no more missing
Sage Weil [Sat, 7 May 2011 20:21:34 +0000 (13:21 -0700)]
osd: reset last_complete on mark_all_unfound_as_lost if no more missing

If we marked _all_ missing as lost, reset last_complete, since missing is
now empty!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: drop bad warning
Sage Weil [Sat, 7 May 2011 20:10:28 +0000 (13:10 -0700)]
osd: drop bad warning

The stats won't match reality if there are any missing or if there are any
snapped objects.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorados tool: remove import/export
Colin Patrick McCabe [Mon, 9 May 2011 15:02:25 +0000 (08:02 -0700)]
rados tool: remove import/export

rados_sync replaces rados import / rados export

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years ago.gitignore: rados_sync
Sage Weil [Sat, 7 May 2011 19:56:09 +0000 (12:56 -0700)]
.gitignore: rados_sync

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: reassert our assert definition after including boostchart
Sage Weil [Sat, 7 May 2011 04:59:59 +0000 (21:59 -0700)]
osd: reassert our assert definition after including boostchart

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoassert: make our assert clobber any others too
Sage Weil [Sat, 7 May 2011 04:59:41 +0000 (21:59 -0700)]
assert: make our assert clobber any others too

Two can play this game, /usr/include/assert.h!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix compilation for some g++ versions
Yehuda Sadeh [Sat, 7 May 2011 05:10:21 +0000 (22:10 -0700)]
osd: fix compilation for some g++ versions

wasn't compiling on lenny, g++ ver 4.3.2. Might be that
it's also due to differebt boost version.

14 years agorgw: minor cleanup
Yehuda Sadeh [Sat, 7 May 2011 04:42:01 +0000 (21:42 -0700)]
rgw: minor cleanup

14 years agorgw: opening bucket io ctx stats bucket info if failed
Yehuda Sadeh [Sat, 7 May 2011 04:32:43 +0000 (21:32 -0700)]
rgw: opening bucket io ctx stats bucket info if failed

this should trigger request of a new osdmap if we were racing
with bucket creation.

14 years agoMerge branch 'wip-rados-sync'
Colin Patrick McCabe [Sat, 7 May 2011 00:43:10 +0000 (17:43 -0700)]
Merge branch 'wip-rados-sync'

14 years agotest_rados_sync: check that second sync does nada
Colin Patrick McCabe [Sat, 7 May 2011 00:42:23 +0000 (17:42 -0700)]
test_rados_sync: check that second sync does nada

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>