]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomds: don't journal src when not auth on rename
Sage Weil [Fri, 6 May 2011 20:14:42 +0000 (13:14 -0700)]
mds: don't journal src when not auth on rename

If we aren't auth for the srcdn, don't put it in the journal, or else we'll
barf on journal replay.

This fixes a crash reproduced with

sudo mkdir mnt/foo
sudo touch mnt/foo/a
sudo ln mnt/foo/a mnt/foo/b
sudo rm mnt/foo/a

sudo mkdir mnt/bar
sudo touch mnt/bar/nothing

./ceph mds tell 0 export_dir /bar 1

sudo mv mnt/foo/b mnt/bar/b

+ mds restart.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: choose_acting needs the value of the osd, not its index
Josh Durgin [Fri, 6 May 2011 19:23:45 +0000 (12:23 -0700)]
PG: choose_acting needs the value of the osd, not its index

This caused two osds to keep flipping the acting set between [2] and
[0,2] when osd.0 was far behind and needed a backlog. This is visible
as toggling between peering and peering+degraded.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agostop.sh: Avoid bashisms.
Tommi Virtanen [Fri, 6 May 2011 18:10:16 +0000 (11:10 -0700)]
stop.sh: Avoid bashisms.

I have a habit of running "sh -x stop.sh" whenever it seems
to fail, and that runs it with dash, not bash. Since it
doesn't actually need the bashisms, remove them.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agostop.sh: Whitespace.
Tommi Virtanen [Fri, 6 May 2011 18:07:05 +0000 (11:07 -0700)]
stop.sh: Whitespace.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoosd: fix include in cosd.cc too
Sage Weil [Fri, 6 May 2011 16:26:59 +0000 (09:26 -0700)]
osd: fix include in cosd.cc too

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: rearrange #includes to get our assert
Sage Weil [Fri, 6 May 2011 16:26:32 +0000 (09:26 -0700)]
osd: rearrange #includes to get our assert

Make sure we include boostchart headers before our common/assert.h so that
ours clobbers theirs.  Otherwise the generic one will clobber ours and our
assert output won't get logged or be as pretty.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: fix multi-osd 'ceph in|out N..' operations
Sage Weil [Thu, 5 May 2011 23:27:20 +0000 (16:27 -0700)]
mon: fix multi-osd 'ceph in|out N..' operations

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoceph_argparse: ignore dashes after equals sign
Colin Patrick McCabe [Thu, 5 May 2011 23:17:34 +0000 (16:17 -0700)]
ceph_argparse: ignore dashes after equals sign

When parsing argv, ignore dashes after equals signs. This is so that
things like --log-file=/tmp/foo-file will work correctly.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'wip_pg_refactor'
Sage Weil [Thu, 5 May 2011 23:17:21 +0000 (16:17 -0700)]
Merge branch 'wip_pg_refactor'

14 years agoPG: strays don't peer (only the primary does)
Josh Durgin [Thu, 5 May 2011 23:28:35 +0000 (16:28 -0700)]
PG: strays don't peer (only the primary does)

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: clear peering flag when we transition from Peering to Reset
Josh Durgin [Thu, 5 May 2011 23:28:06 +0000 (16:28 -0700)]
PG: clear peering flag when we transition from Peering to Reset

This is safe because the only other transitions are to Pending (still
peering) and Active, which clears the state itself.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Thu, 5 May 2011 23:17:17 +0000 (16:17 -0700)]
Merge branch 'stable'

14 years agoosdmap: fix temp osd pg mapping
Sage Weil [Thu, 5 May 2011 23:08:58 +0000 (16:08 -0700)]
osdmap: fix temp osd pg mapping

If you feed in a raw pg (full precision) you should get the same mapping
out as when you plug in the effective/reduced precision pg.  The
raw_to_temp_osds() wasn't doing that, which gave you results like

flak:src 04:01 PM $ ./ceph pg map 0.4
2011-05-05 16:01:18.524051 mon <- [pg,map,0.4]
2011-05-05 16:01:18.524987 mon2 -> 'osdmap e11 pg 0.4 (0.4) -> up [1,0] acting [0]' (0)
flak:src 04:01 PM $ ./ceph pg map 0.7ed4
2011-05-05 16:01:21.755490 mon <- [pg,map,0.7ed4]
2011-05-05 16:01:21.755996 mon1 -> 'osdmap e11 pg 0.7ed4 (0.4) -> up [1,0] acting [1,0]' (0)

The objecter was feeding in raw pgs, so this was sending requests to the
wrong nodes.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomon: do not stop mds0 unless all other nodes have also stopped
Sage Weil [Thu, 5 May 2011 22:15:03 +0000 (15:15 -0700)]
mon: do not stop mds0 unless all other nodes have also stopped

If we are the root node or the tableserver, we have to shut down last.
(And even then, if we have client sessions, we can't fully shut down, we
can only kill ourselves!)

Fixes: #1048 (sorta)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Thu, 5 May 2011 22:24:48 +0000 (15:24 -0700)]
Merge branch 'stable'

Conflicts:
src/mds/Resetter.cc

14 years agoPG: handle MOSDPGLog messages in Active state.
Greg Farnum [Thu, 5 May 2011 21:36:26 +0000 (14:36 -0700)]
PG: handle MOSDPGLog messages in Active state.

We previously didn't, but we definitely need to as we can go
active while waiting on strays to send in logs to recover missing
objects.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoceph_crypto: Fix ceph::crypto::init mutex for NSS.
Tommi Virtanen [Thu, 5 May 2011 21:07:02 +0000 (14:07 -0700)]
ceph_crypto: Fix ceph::crypto::init mutex for NSS.

Even after ceph::crypto::shutdown, the library looked
already initialized; this broke the ForkDeathTest.MD5
in "make check", and NSS-using daemons.

See 921d4b3d8b79485a6786f8ca75b2a96ea377da84 for more.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agov0.27.1 v0.27.1
Sage Weil [Thu, 5 May 2011 20:42:20 +0000 (13:42 -0700)]
v0.27.1

14 years agoceph::crypto::init: add PTHREAD_MUTEX_INITIALIZER
Colin Patrick McCabe [Thu, 5 May 2011 20:38:13 +0000 (13:38 -0700)]
ceph::crypto::init: add PTHREAD_MUTEX_INITIALIZER

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: fix --reset-journal
Sage Weil [Thu, 5 May 2011 20:35:50 +0000 (13:35 -0700)]
mds: fix --reset-journal

Don't fork.  (Already fixed in master branch by the start_with_nonce
refactor, so this is just for 0.27.1.)

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest-obsync.py: allow better nonce,better printout
Colin Patrick McCabe [Thu, 5 May 2011 20:26:52 +0000 (13:26 -0700)]
test-obsync.py: allow better nonce,better printout

Support deterministic nonces. Better debug printouts.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: remove misguided strip_owner
Colin Patrick McCabe [Thu, 5 May 2011 18:50:29 +0000 (11:50 -0700)]
obsync: remove misguided strip_owner

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agolibceph: initialize keyring after conf is parsed
Sage Weil [Thu, 5 May 2011 20:07:06 +0000 (13:07 -0700)]
libceph: initialize keyring after conf is parsed

Init the keyring in ceph_mount, after the user has a change to load a conf
file or parse command line args.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosdmap: small cleanup
Sage Weil [Thu, 5 May 2011 15:51:30 +0000 (08:51 -0700)]
osdmap: small cleanup

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofix some shadowing arguments
Sage Weil [Wed, 4 May 2011 20:55:50 +0000 (13:55 -0700)]
fix some shadowing arguments

Small subset of what -Wshadow turns up.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocrypto: fix non-reentrancy of ceph::crypto::init
Colin Patrick McCabe [Thu, 5 May 2011 19:44:40 +0000 (12:44 -0700)]
crypto: fix non-reentrancy of ceph::crypto::init

This could be called multiple times from common_preinit.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest-obsync: use s3-tests configuration file
Colin Patrick McCabe [Thu, 5 May 2011 18:39:57 +0000 (11:39 -0700)]
test-obsync: use s3-tests configuration file

Use the same configuration file format as s3-tests. This should make it
easier for people to run obsync tests!

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: fix GetInfo down check
Sage Weil [Thu, 5 May 2011 18:20:58 +0000 (11:20 -0700)]
osd: fix GetInfo down check

The PgPriorSet::down set can have lots of stuff it in without it affecting
peering completion.  We just need to look at the some_down flag to tell us
if any nodes in the _cur_ set are down, which indicates no progress is
possible (unless/until someone starts up again or last_epoch_started moves
forward in time).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: some comment, debug output cleanup
Sage Weil [Thu, 5 May 2011 17:55:30 +0000 (10:55 -0700)]
osd: some comment, debug output cleanup

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: reg_last_scrub on pg load
Sage Weil [Thu, 5 May 2011 17:54:38 +0000 (10:54 -0700)]
osd: reg_last_scrub on pg load

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoobsync: remove omit_owner for acls
Colin Patrick McCabe [Thu, 5 May 2011 17:22:48 +0000 (10:22 -0700)]
obsync: remove omit_owner for acls

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: implement --force option
Colin Patrick McCabe [Thu, 5 May 2011 17:18:47 +0000 (10:18 -0700)]
obsync: implement --force option

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: be more verbose about set_xml_acl errors
Colin Patrick McCabe [Thu, 5 May 2011 17:17:57 +0000 (10:17 -0700)]
obsync: be more verbose about set_xml_acl errors

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoboto_tool: add getacl, setacl
Colin Patrick McCabe [Thu, 5 May 2011 00:51:40 +0000 (17:51 -0700)]
boto_tool: add getacl, setacl

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: Fix ACL parsing yet again
Colin Patrick McCabe [Wed, 4 May 2011 21:28:50 +0000 (14:28 -0700)]
obsync: Fix ACL parsing yet again

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: GetLog, GetMissing cleanups, fixes
Sage Weil [Thu, 5 May 2011 17:09:10 +0000 (10:09 -0700)]
osd: GetLog, GetMissing cleanups, fixes

Added missing continue in GetMissing ctor.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: only transition to Pending from GetInfo cons
Sage Weil [Thu, 5 May 2011 17:03:54 +0000 (10:03 -0700)]
osd: only transition to Pending from GetInfo cons

No need to do so in get_infos().  The need_up_thru requirement will only
get better as last_epoch_started floor moves forward in time, not worse.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: consistent naming
Sage Weil [Thu, 5 May 2011 16:30:29 +0000 (09:30 -0700)]
osd: consistent naming

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: handle notify+info explicitly in GetInfo state
Sage Weil [Thu, 5 May 2011 15:54:23 +0000 (08:54 -0700)]
osd: handle notify+info explicitly in GetInfo state

This fixes a few things:
 - do not proceed past GetInfo if there are down osds.  ever.
 - if we get a new info that moves last_epoch_started forward,
   rebuild prior, because we may have eliminated said down osds.
 - if we get dup info, do nothing
 - if we get new info, see if we can proceed to GetLog

This is all simpler/cleaner by handling Notify/Info (they're the same)
explicitly in the GetInfo state and not falling back to the parent
state handler.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: statechart whitespace
Sage Weil [Thu, 5 May 2011 15:18:55 +0000 (08:18 -0700)]
osd: statechart whitespace

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: initialize pg state event counters
Sage Weil [Thu, 5 May 2011 15:14:17 +0000 (08:14 -0700)]
osd: initialize pg state event counters

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: fix GetInfo querying
Sage Weil [Thu, 5 May 2011 15:12:24 +0000 (08:12 -0700)]
osd: fix GetInfo querying

Don't query for info we already have, or have already requested.  Remove
unneeded helper so that this is simpler and we have access to the info
we need.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: handle event notify/info/log from Initial
Sage Weil [Thu, 5 May 2011 15:11:41 +0000 (08:11 -0700)]
osd: handle event notify/info/log from Initial

We shouldn't post a creation event and jump into peering/stray based on
pg creation when we are about to process more information or else we will
send out unnecessary queries.  Instead, handle those from Initial and jump
to the appropriate state.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: don't output optional DisplayName if not set
Colin Patrick McCabe [Thu, 5 May 2011 00:23:44 +0000 (17:23 -0700)]
rgw: don't output optional DisplayName if not set

Don't output optional DisplayName if not set. Be a little more explicit
about zeroing other optional fields during xml parsing.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: debug handle_*
Sage Weil [Wed, 4 May 2011 23:35:49 +0000 (16:35 -0700)]
osd: debug handle_*

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: don't assume XML is valid
Colin Patrick McCabe [Wed, 4 May 2011 22:41:36 +0000 (15:41 -0700)]
rgw: don't assume XML is valid

XML parsing functions in RGW now return a bool, indicating whether they
were able to get the fields they needed to out of the XML.
If any field returns false, the parsing is deemed to have failed.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: fix min_time in state stats
Sage Weil [Wed, 4 May 2011 23:09:58 +0000 (16:09 -0700)]
osd: fix min_time in state stats

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: rename states to reflect nesting; fix enter/exit msgs
Sage Weil [Wed, 4 May 2011 23:09:46 +0000 (16:09 -0700)]
osd: rename states to reflect nesting; fix enter/exit msgs

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoOSD: fill in rctx properly for pg->handle_create in get_or_create_pg
Greg Farnum [Wed, 4 May 2011 23:16:17 +0000 (16:16 -0700)]
OSD: fill in rctx properly for pg->handle_create in get_or_create_pg

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoosd: first pass at pg peering stats
Sage Weil [Wed, 4 May 2011 21:58:42 +0000 (14:58 -0700)]
osd: first pass at pg peering stats

The numbers are a bit off it seems.  Also lots of potential for cleanup
here.  But it (basically) works!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: use const char * state names
Sage Weil [Wed, 4 May 2011 21:12:00 +0000 (14:12 -0700)]
osd: use const char * state names

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoOSD: assert contents exist when erasing from last_scrub_map.
Greg Farnum [Wed, 4 May 2011 21:30:51 +0000 (14:30 -0700)]
OSD: assert contents exist when erasing from last_scrub_map.

Insert PG into last_scrub_map on creation so that this doesn't
break right away.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoPG: proc_replica_info, oinfo not info
Samuel Just [Wed, 4 May 2011 20:38:57 +0000 (13:38 -0700)]
PG: proc_replica_info, oinfo not info

The method param info shadowed PG::info.

14 years agoosd: move directly to Reset state on pg load
Sage Weil [Wed, 4 May 2011 20:05:09 +0000 (13:05 -0700)]
osd: move directly to Reset state on pg load

Add Initial -> Reset transition on pg load.  This avoids doing any
activation-type stuff (like sending messages) before we are ready.  In
particularly, we want to advance through any new OSDMaps and only
send out queries/notifies/whatever when we get to the activate_map
stage.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoOSD: start PG state machine when loading pre-existing PGs
Josh Durgin [Wed, 4 May 2011 19:23:08 +0000 (12:23 -0700)]
OSD: start PG state machine when loading pre-existing PGs

This caused a crash when restarting a killed OSD because the Initial
state was receiving the ActMap event.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: ReplicaActive must repond to requests from discover_all_missing
Samuel Just [Wed, 4 May 2011 17:21:54 +0000 (10:21 -0700)]
PG: ReplicaActive must repond to requests from discover_all_missing

If the peer does not yet have the pg during GetMissing, there won't be
a peer_missing entry for that peer.  In that case, discover_all_missing
can legitimately request a missing set after the pg has gone active.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agouclient: fill in InodeCap::wanted member on send_cap.
Greg Farnum [Wed, 4 May 2011 17:50:23 +0000 (10:50 -0700)]
uclient: fill in InodeCap::wanted member on send_cap.

Previously it was never used, which I think led to spamming the MDS
with cap messages!

Hopefully this won't reveal any new cap-handling bugs...

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agouclient: only try to update caps on the auth MDS.
Greg Farnum [Wed, 4 May 2011 17:47:43 +0000 (10:47 -0700)]
uclient: only try to update caps on the auth MDS.

Previously we would send updates on things like the max_size we
wanted to the first MDS in our list, which was bad if the auth mds
had a higher number. Now, only send them (and update bookkeeping)
for the auth MDS.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoPG: collapse crashed transitions to happen on any unexpected event
Josh Durgin [Wed, 4 May 2011 16:32:49 +0000 (09:32 -0700)]
PG: collapse crashed transitions to happen on any unexpected event

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: use a state_name member instead of overriding get_state_name
Josh Durgin [Wed, 4 May 2011 16:10:00 +0000 (09:10 -0700)]
PG: use a state_name member instead of overriding get_state_name

Also add debugging to each state constructor. Since dout uses
the recovery machine context, anything using it in the constructor
must be a state, not a simple_state.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoRevert "osd: simplify check for unconsumed events"
Samuel Just [Wed, 4 May 2011 00:50:34 +0000 (17:50 -0700)]
Revert "osd: simplify check for unconsumed events"

This reverts commit ab34a3ce3e757a54816bd9b884c3f900361d4930.

It turns out that unconsumed_event supersedes checking outer states. :(

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: Primary should also discard the ActMap event
Samuel Just [Wed, 4 May 2011 00:19:33 +0000 (17:19 -0700)]
PG: Primary should also discard the ActMap event

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoPG: ActMap should be dicarded if no outer state handles it
Samuel Just [Wed, 4 May 2011 00:02:34 +0000 (17:02 -0700)]
PG: ActMap should be dicarded if no outer state handles it

14 years agoosd: simplify check for unconsumed events
Sage Weil [Wed, 4 May 2011 00:03:37 +0000 (17:03 -0700)]
osd: simplify check for unconsumed events

No need for the Crashed pseudo state.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: make debug output include state name
Sage Weil [Tue, 3 May 2011 22:49:02 +0000 (15:49 -0700)]
osd: make debug output include state name

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: fix event names
Sage Weil [Tue, 3 May 2011 23:38:27 +0000 (16:38 -0700)]
osd: fix event names

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG.h: transition to crashed on unhandled message
Samuel Just [Tue, 3 May 2011 23:26:55 +0000 (16:26 -0700)]
PG.h: transition to crashed on unhandled message

14 years agoobsync: improve ACL handling again
Colin Patrick McCabe [Tue, 3 May 2011 22:50:41 +0000 (15:50 -0700)]
obsync: improve ACL handling again

LocalAcl: store ACLs in memory. They're very small, and the tempfile
stuff was just getting cumbersome.

LocalAcl.equal: do deep comparison of ACLs, not just seeing if the XML
is the same.

Strip owner when setting an ACL. We never want to try to set the owner.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: fix some bugs
Colin Patrick McCabe [Tue, 3 May 2011 22:33:39 +0000 (15:33 -0700)]
obsync: fix some bugs

* Allow parsing of AclPolicy elements that don't have owner_id fields.

* Put all XML attributes in the correct namespace when generating ACL XML

* Fix FileStore.get_acl

* test-obsync: better formatting for obsync command lines

* test-obsync: test ACL-syncing stuff

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: feed new pg mapping into state machine
Sage Weil [Tue, 3 May 2011 22:31:28 +0000 (15:31 -0700)]
osd: feed new pg mapping into state machine

instead of recalculating it.  Also pass the last map into warm_restart,
while we're at it.  Drop the Reset state constructor and instead repost
the AdvMap event before transitioning.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosdmap: fix some constedness
Sage Weil [Tue, 3 May 2011 22:29:48 +0000 (15:29 -0700)]
osdmap: fix some constedness

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: turn off recovery oid sets
Sage Weil [Tue, 3 May 2011 21:31:20 +0000 (14:31 -0700)]
osd: turn off recovery oid sets

This is slow, eats memory, and dumps huge amounts of crap to the debug
logs when enabled.  Leave it off unless we are actually hunting down a bug.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: remove peer_info_requested member
Josh Durgin [Tue, 3 May 2011 21:15:45 +0000 (14:15 -0700)]
PG: remove peer_info_requested member

This is internal to the GetInfo state now.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: don't become clean in purge_strays
Josh Durgin [Tue, 3 May 2011 21:03:14 +0000 (14:03 -0700)]
PG: don't become clean in purge_strays

Our state is already clean here.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: send notifies when a stray or an active replica gets an ActMap
Josh Durgin [Mon, 2 May 2011 23:21:09 +0000 (16:21 -0700)]
PG: send notifies when a stray or an active replica gets an ActMap

This was present before refactoring.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: fix proc_master_log output
Josh Durgin [Mon, 2 May 2011 21:39:04 +0000 (14:39 -0700)]
PG: fix proc_master_log output

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoPG: handle info in proc_replica_log just like we did in _process_pg_info
Josh Durgin [Mon, 2 May 2011 21:38:16 +0000 (14:38 -0700)]
PG: handle info in proc_replica_log just like we did in _process_pg_info

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
14 years agoMerge branch 'master' into wip_pg_refactor
Sage Weil [Tue, 3 May 2011 21:28:45 +0000 (14:28 -0700)]
Merge branch 'master' into wip_pg_refactor

14 years agoosd: only specify start version for Qeury::LOG
Sage Weil [Tue, 3 May 2011 21:27:35 +0000 (14:27 -0700)]
osd: only specify start version for Qeury::LOG

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobsync: check if ACLs match
Colin Patrick McCabe [Tue, 3 May 2011 20:45:14 +0000 (13:45 -0700)]
obsync: check if ACLs match

If all other aspects of two objects match, we should make sure the ACLs
match before deciding that there's nothing for us to do.

Restructure LocalCopy so that it no longer contains the ACL. Create
LocalAcl to represent a cached local copy of the ACL. Add get_acl
methods to all stores.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoosd: use enum instead of const static int members
Sage Weil [Tue, 3 May 2011 21:02:41 +0000 (14:02 -0700)]
osd: use enum instead of const static int members

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: leave recovery hooks in PG
Sage Weil [Tue, 3 May 2011 21:01:42 +0000 (14:01 -0700)]
osd: leave recovery hooks in PG

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: fix pg log entry types to not always be delete
Sage Weil [Tue, 3 May 2011 20:08:35 +0000 (13:08 -0700)]
osd: fix pg log entry types to not always be delete

This was broken by the osd_trans work merged in 01f3526b62.  We need to
use the obs reference to new_obs.  This caused objects to be deleted during
pg recovery.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: add 'ceph osd rm N...' command
Sage Weil [Tue, 3 May 2011 19:37:33 +0000 (12:37 -0700)]
mon: add 'ceph osd rm N...' command

So we can mark an old osd as deleted and have it not appear in the osdmap
dump, summary count.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/stable'
Sage Weil [Tue, 3 May 2011 19:36:16 +0000 (12:36 -0700)]
Merge remote branch 'origin/stable'

Conflicts:
src/mon/OSDMonitor.cc

14 years agoosdmap: allow incremental to represent osd deletion
Sage Weil [Tue, 3 May 2011 19:34:54 +0000 (12:34 -0700)]
osdmap: allow incremental to represent osd deletion

Convert new_down to new_state, with values xored onto the old state.  We
preserve compatibility with old incrementals because they were (virtually)
always 0, and we can special case that to mean toggle CEPH_OSD_UP.  We
don't really care if clients get new values right.. if they don't clear
the EXISTS flag that doesn't really hurt them.  It's only important that
the monitor get it right.

To ensure that, we rev the monitor internal protocol.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: remove useless mark_down code
Sage Weil [Tue, 3 May 2011 19:28:00 +0000 (12:28 -0700)]
objecter: remove useless mark_down code

We already check sessions a bit further down, and this code only worked
when we got incrementals, not full maps.  Take it out.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agotest-obsync: test ACL translation, run unit tests
Colin Patrick McCabe [Tue, 3 May 2011 18:07:17 +0000 (11:07 -0700)]
test-obsync: test ACL translation, run unit tests

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: remove --owner, elide owner from ACL XML
Colin Patrick McCabe [Tue, 3 May 2011 17:58:04 +0000 (10:58 -0700)]
obsync: remove --owner, elide owner from ACL XML

Just omit the owner field from the ACL XML. It is optional anyway.

Don't supply an --owner switch. The owner will always be the same user
that created the object.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: better usage
Colin Patrick McCabe [Tue, 3 May 2011 17:20:30 +0000 (10:20 -0700)]
obsync: better usage

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoOSD,PG: Peering refactor
Samuel Just [Tue, 3 May 2011 00:03:56 +0000 (17:03 -0700)]
OSD,PG: Peering refactor

Previously, peering was handled by a defacto state machine in do_peer
and related methods.  Peering state will now be encapsulated in
RecoveryState, which uses boost::state_chart internally to enforce an
explicit state machine abstraction.  OSD::handle_pg_* pass off to
PG::handle_*, which pass messages to the state machine.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoOSD,PG: Move pg reset code from OSD::advance_map to PG
Samuel Just [Fri, 22 Apr 2011 00:42:51 +0000 (17:42 -0700)]
OSD,PG: Move pg reset code from OSD::advance_map to PG

OSD::advance_map previously handled resetting the PG for peering.  Now,
PG::acting_up_affected returns true if peering needs to be restarted and
PG::warm_restart takes care of restting the pg.

14 years agoPG: choose_log_location
Josh Durgin [Thu, 21 Apr 2011 23:27:57 +0000 (16:27 -0700)]
PG: choose_log_location

Choosing the master log holder and deciding whether to generate a
backlog are now handled by choose_log_location.

14 years agoPG: Extract query map generation from recover_master_log
Josh Durgin [Thu, 21 Apr 2011 21:59:17 +0000 (14:59 -0700)]
PG: Extract query map generation from recover_master_log

PgPriorSet::gen_query_map now generates the initial info query map.

14 years agoPG: Refactor build_prior into a PgPriorSet constructor.
Samuel Just [Thu, 21 Apr 2011 20:36:13 +0000 (13:36 -0700)]
PG: Refactor build_prior into a PgPriorSet constructor.

14 years agoPG: Add gen_prefix method for generating the pg error prefix
Samuel Just [Mon, 2 May 2011 22:39:36 +0000 (15:39 -0700)]
PG: Add gen_prefix method for generating the pg error prefix

This should make it easier to add dout macros for non-pg methods

14 years agoTestSnaps.cc: default to testing with the data pool
Samuel Just [Mon, 2 May 2011 22:27:04 +0000 (15:27 -0700)]
TestSnaps.cc: default to testing with the data pool

14 years agoOSD.cc: handle_pg_create fix initial last_epoch_started value
Samuel Just [Mon, 2 May 2011 21:33:03 +0000 (14:33 -0700)]
OSD.cc: handle_pg_create fix initial last_epoch_started value

last_epoch_started == same_acting_since should not be true before the pg
goes active for the first time.

14 years agoobsync: only require --owner if --xuser is set
Colin Patrick McCabe [Tue, 3 May 2011 17:06:11 +0000 (10:06 -0700)]
obsync: only require --owner if --xuser is set

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: implement --owner
Colin Patrick McCabe [Tue, 3 May 2011 01:41:31 +0000 (18:41 -0700)]
obsync: implement --owner

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