Commit Graph

14166 Commits

Author SHA1 Message Date
Samuel Just
28fdffcc31 PG.h: transition to crashed on unhandled message 2011-05-03 16:28:11 -07:00
Sage Weil
c71583d068 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>
2011-05-03 15:31:28 -07:00
Sage Weil
d0dd5497c8 osdmap: fix some constedness
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-03 15:29:48 -07:00
Sage Weil
39dc084607 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>
2011-05-03 14:38:37 -07:00
Josh Durgin
eac23e178f PG: remove peer_info_requested member
This is internal to the GetInfo state now.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-03 14:26:34 -07:00
Josh Durgin
258fe7c018 PG: don't become clean in purge_strays
Our state is already clean here.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-03 14:26:34 -07:00
Josh Durgin
9c70fdfb22 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>
2011-05-03 14:26:34 -07:00
Josh Durgin
c96f3e9bc6 PG: fix proc_master_log output
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-03 14:26:34 -07:00
Josh Durgin
892e58d04f PG: handle info in proc_replica_log just like we did in _process_pg_info
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-03 14:26:34 -07:00
Sage Weil
1a204a60bd Merge branch 'master' into wip_pg_refactor 2011-05-03 14:28:45 -07:00
Sage Weil
b659fd02d0 osd: only specify start version for Qeury::LOG
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-03 14:27:35 -07:00
Sage Weil
780ec44b1c osd: use enum instead of const static int members
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-03 14:06:54 -07:00
Sage Weil
a5f352cc22 osd: leave recovery hooks in PG
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-03 14:06:51 -07:00
Sage Weil
90ee7cf911 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>
2011-05-03 13:08:35 -07:00
Sage Weil
85131220c8 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>
2011-05-03 12:37:33 -07:00
Sage Weil
c0c2029922 Merge remote branch 'origin/stable'
Conflicts:
	src/mon/OSDMonitor.cc
2011-05-03 12:36:16 -07:00
Sage Weil
f680eca790 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>
2011-05-03 12:34:54 -07:00
Sage Weil
890dc2aed2 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>
2011-05-03 12:28:00 -07:00
Colin Patrick McCabe
f39f5c8168 test-obsync: test ACL translation, run unit tests
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-03 11:07:17 -07:00
Colin Patrick McCabe
472d7bee27 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>
2011-05-03 10:58:04 -07:00
Colin Patrick McCabe
a6383e9448 obsync: better usage
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-03 10:20:30 -07:00
Samuel Just
48eb343ba2 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>
2011-05-03 10:19:45 -07:00
Samuel Just
09f6d22d0c 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.
2011-05-03 10:19:45 -07:00
Josh Durgin
f06269de5e PG: choose_log_location
Choosing the master log holder and deciding whether to generate a
backlog are now handled by choose_log_location.
2011-05-03 10:19:45 -07:00
Josh Durgin
21d8e72ad2 PG: Extract query map generation from recover_master_log
PgPriorSet::gen_query_map now generates the initial info query map.
2011-05-03 10:19:45 -07:00
Samuel Just
1477c06826 PG: Refactor build_prior into a PgPriorSet constructor. 2011-05-03 10:19:45 -07:00
Samuel Just
1b0dfcf53b PG: Add gen_prefix method for generating the pg error prefix
This should make it easier to add dout macros for non-pg methods
2011-05-03 10:19:45 -07:00
Samuel Just
fe30d90aeb TestSnaps.cc: default to testing with the data pool 2011-05-03 10:19:45 -07:00
Samuel Just
789b9672db 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.
2011-05-03 10:19:45 -07:00
Colin Patrick McCabe
a8a16c7106 obsync: only require --owner if --xuser is set
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-03 10:06:11 -07:00
Colin Patrick McCabe
441b54c101 obsync: implement --owner
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 18:41:31 -07:00
Sage Weil
5ac87ffd36 cfuse: encode/decode dev_t properly
The fuse layer passes through "encoded" dev_t values (probably for
compatibility reasons or something).  I copied the encode/decode methods
from the kernel and encode/decode the st_rdev values where appropriate
(where struct stat is exposed directory or via the fuse_entry_param
struct).

Fixes: #1031
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-02 18:23:13 -07:00
Colin Patrick McCabe
8bd2305d1c obsync: implement user translation (--xuser)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 16:54:44 -07:00
Colin Patrick McCabe
fa2da0c5e7 rgw: fix ACL XML generation
Put AccessControlPolicy in the http://s3.amazonaws.com/doc/2006-03-01/
namespace.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 15:57:06 -07:00
Colin Patrick McCabe
931b58044d obsync: refactor LocalCopy
Combine LocalCopy, S3StoreLocalCopy, and RadosStoreLocalCopy into one
class called LocalCopy.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-02 14:47:10 -07:00
Greg Farnum
1701804d34 FileStore: use proper object names for linking
They were backward before, which broke EVERYTHING.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-02 13:47:23 -07:00
Greg Farnum
ac23196bc5 MDS: fix handle_client_rename use of path_traverse.
It was using the MDS_TRAVERSE_DISCOVERXLOCK flag, which allows
path_traverse to return success if it encounters a NULL dentry. When
we're looking for a source inode, though, that doesn't work out! We
want MDS_TRAVERSE_DISCOVER, which will go away and look for the dentry
on other inodes but requires a linked dentry, not a NULL one.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-02 13:16:35 -07:00
Sage Weil
7d19f184c5 mds: trim non-auth swallowed subtrees during resolve
Consider:
 - peer auth for /foo
 - ambiguous import /foo/bar
 - peer claims /foo, swallows /foo/bar.
 - disambiguate_imports sees we didn't get /foo/bar, cancels ambiguous
   import.
 -> we are left with /foo/bar (and content) in cache, even tho it is
   non-auth.

Fix by pulling the try_trim_non_auth_subtree() back out of
cancel_ambiguous_import, and trimming the containing subtree in the
disambiguate (resolve completion) case.  (For the journal replay case the
subtree structure is deterministic and no such check is needed.)

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-29 17:46:24 -07:00
Sage Weil
9e4e345261 mds: fix replay of EFragment rollback
Remove from the uncommitted list.

Also, make uncommitted list updated unconditional: we need to do it even
if the inode wasn't already in our cache.

Also, journal the rollback with the same signedness as the prepare, so that
the descriptor/map key matches up.  Adjust signs accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-29 17:46:23 -07:00
Yehuda Sadeh
a09eb0c33f rgw: log bytes received 2011-04-29 17:17:23 -07:00
Yehuda Sadeh
6a16019099 rgw: fix some logging problems 2011-04-29 16:15:23 -07:00
Yehuda Sadeh
03d82a3fec rgw_admin: dump also user email 2011-04-29 16:15:23 -07:00
Tommi Virtanen
e97ce8ec87 test/ceph_crypto: Check that the shutdown/fork/init trick works for NSS.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 14:48:30 -07:00
Yehuda Sadeh
fc36eb6b99 filestore: fiemap should close the fd 2011-04-29 14:10:53 -07:00
Yehuda Sadeh
e4cdc583fd filestore: fiemap should close the fd 2011-04-29 14:09:30 -07:00
Tommi Virtanen
264829b5b1 common, cfuse: Hook into daemonization and shutdown/init NSS.
NSS cannot tolerate forks without this.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:19:17 -07:00
Tommi Virtanen
98b0877183 msgr, common: Refactor to extract daemonization out of messenger.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:17:30 -07:00
Tommi Virtanen
0e6bacc6e7 msgr: Rename SimpleMessenger::start(daemonize, nonce) to start_with_nonce.
Otherwise, once we remove daemonize from the prototype,
all the existing ->start(false) calls will be taken
to mean nonce=0.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:08:37 -07:00
Tommi Virtanen
84454c24d1 ceph_crypto: Assert that NSS initialization works.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-29 13:08:36 -07:00
Colin Patrick McCabe
4107e2966a common_init: create common_init_daemonize
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-29 11:29:03 -07:00