Commit Graph

13933 Commits

Author SHA1 Message Date
Greg Farnum
bea966af2f mds: Make use of find_ino_peers
Previously we just had to give up on ESTALE. Now
we can attempt to recover!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:02:45 -07:00
Greg Farnum
22e8519d03 random commenting 2011-04-16 21:01:46 -07:00
Greg Farnum
ace54db0c0 MDS: Remove inappropriate assert from _logged_slave_rename.
The slave also can hold some auth pins from locks which the
master has asked it to grab. It's possible we can intelligently
determine how many, but for now just drop the assert.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:01:38 -07:00
Greg Farnum
ac045dc3ec MDS: Server::handle_slave_rename_prep now accounts for dir snaplock.
Previously it ignored the auth pin required to hold snap xlock, which
is currently always held for a rename on a dir. This would lead to
a permanent hang on the request. Now we account for it!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:01:15 -07:00
Greg Farnum
597e30edeb MDS: Don't move inode to snaprealms if not primary inode.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:00:05 -07:00
Greg Farnum
08bd2ef111 MDCache: update assert to account for being a slave.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 20:59:57 -07:00
Greg Farnum
569cce39f4 Server: push_projected_linkage in _link_remote
_link_remote_finish will pop the linkage if inc==true, so we'd
better push it to match!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-16 20:59:49 -07:00
Greg Farnum
5b825c3a43 Server: ensure slave mdses have full dest tree
We were already taking rdlocks on the source tree, to make
sure that each slave MDS could traverse to the source dentry. Now,
if there are slave MDSes, we take rdlocks on each destination
ancestor to make sure the slaves can also traverse there.
This fixes an fsstress bug.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-16 20:59:45 -07:00
Yehuda Sadeh
544ce94ab9 rgw: basic support for separate uid and access key 2011-04-15 17:20:44 -07:00
Sage Weil
24f35e79db mds: fix null deref in debug
The *dir isn't always non-null (namely, during DISCOVERING state).

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Sage Weil
f85515141a mds: keep import/export subtree_map state in sync with journal
We were being sloppy before with the ESubtreeMap vs import/export events.
Fix that by doing a few things:

 - add an ambig flag to the subtree map items, and set it for in-progress
   imports.  That means an ESubtreeMap followed by EImportFinish will do
   the right thing now.
 - adjust the dir_auth on EExport journaling (handle_export_dir_ack) so
   that our journaled subtree_map state is always in sync with what we
   see during replay.

Also document clearly what the dir_auth variations actually mean.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Sage Weil
d94c69e580 mds: fix export cancel during IMPORT_PREPPING
If we are in PREPPING, we need to drop the stickydirs() on the inodes, and
not the pins on the dirfrags.  Do this in the helper so we can keep the
call chains simple.

Also deal with the case where we get a cancel in PREPPED state.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Sage Weil
07098fa5a9 mds: clean up trim_non_auth_subtree output
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Sage Weil
e15d9ca1d1 mds: cancel exports in PREPPING state on any failure
The prepping nodes may need to discover bounds from the failed node and
may hang indefinitely.  Meanwhile, we won't send out mds_resolve messages
until in-progress migrations complete.  Deadlock.

In certain cases the importing node can manufacture the replica.  If it
doesn't realize that right off, though, it will get hung up trying to
discover from the wrong node, get referred to the failed node, and block
waiting for recovery.  The replica forging is a bit suspect anyway, so
let's avoid the whole thing if we can!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Sage Weil
c7385c1d0e mds: use helpers for import_reverse
Use helpers for common code shared between handle_export_cancel and
handle_mds_failure_or_stop.

Also include handling for IMPORT_PREPPING state, even though we don't use
it yet.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Sage Weil
777bcba0a1 mds: don't skip inodes in journal that may be trimmed during replay
During replay we trim non-auth inodes on EExport or EImportFinish abort.
Subtree trimming may be delayed, too.

Skip parents if the diri is in the same blob, or if it is journaled in the
current segment *and* it is in a subtree that is unambiguously auth.  We can't
easily be more precise than that because the actual event we care about on
replay is EExport, but the migrator doesn't twiddle auth bits to false until
later.

Also, reset last_journaled on import.

This fixes replay bugs like

2011-04-13 18:15:18.064029 7f65588ef710 mds1.journal EImportStart.replay 10000000015 bounds []
2011-04-13 18:15:18.064034 7f65588ef710 mds1.journal EMetaBlob.replay 2 dirlumps by unknown0
2011-04-13 18:15:18.064040 7f65588ef710 mds1.journal EMetaBlob.replay dir 10000000010
2011-04-13 18:15:18.064046 7f65588ef710 mds1.journal EMetaBlob.replay missing dir ino  10000000010
mds/journal.cc: In function 'void EMetaBlob::replay(MDS*, LogSegment*)', in thread '0x7f65588ef710'
mds/journal.cc: 407: FAILED assert(0)
 ceph version 0.25-683-g653580a (commit:653580ae84c471c34872f14a0308c78af71f7243)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x53) [0xa53d26]
 2: (EMetaBlob::replay(MDS*, LogSegment*)+0x7eb) [0x7a737d]

Fixes: #994
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-15 16:32:55 -07:00
Colin Patrick McCabe
92d349c683 config: warn about old-style conf section names
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 15:29:22 -07:00
Greg Farnum
2c0b844053 man: Update cmds documentation.
You always need to specify a rank if you do journal-check.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-15 15:54:12 -07:00
Colin Patrick McCabe
e34e332bc4 vstart.sh: use new-style section names in config
Use new-style section names in vstart.sh.
Also update sample.ceph.conf.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 14:46:54 -07:00
Colin Patrick McCabe
cc0e5668c5 mon:don't check for old-style monitor section name
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 14:40:49 -07:00
Colin Patrick McCabe
a6f0ce4294 cconf: update man page
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 14:34:53 -07:00
Sage Weil
925a2e0e8f mkcephfs, init-ceph: tolerate complete lack of a type
We were bailing out of mkcephfs with a config with no mds's defined
(because we set -e and grep returns an error here).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-15 14:04:42 -07:00
Sage Weil
a7e7bdee00 objecter: log when we defer a write because of FULL osdmap flag
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-15 14:04:00 -07:00
Sage Weil
c9154c0968 mkcephfs, init-ceph: tolerate complete lack of a type
We were bailing out of mkcephfs with a config with no mds's defined
(because we set -e and grep returns an error here).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-15 14:03:59 -07:00
Colin Patrick McCabe
a0a5ea4e3f config: do not accept old-style section names
Stop accepting old-style section names of the form $type$id.  Instead,
we want section names of the form $type.$id.  So [osd0] will no longer
be a valid section name; instead, use [osd.0].

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 14:03:31 -07:00
Colin Patrick McCabe
b740670144 cconf: fix usage; clean up some code
cconf: fix obsolete usage message. Add --list-all-sections flag.
Use new ceph_argparse stuff. Update tests.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 13:58:00 -07:00
Colin Patrick McCabe
ba69603e54 config: normalize key names, cleanup
Normalize key names in md_config_t::get_val and md_config_t::set_val

Remove unused fields from struct config_option.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 13:18:38 -07:00
Yehuda Sadeh
9b7f223a16 rgw: fix other err related issues
also remove the now redundant formatter->flush()
2011-04-15 11:15:11 -07:00
Yehuda Sadeh
303420bf2f rgw: adjustments to error handling
fixing mixup between s3 error code and s3 error message
2011-04-15 10:52:54 -07:00
Colin Patrick McCabe
54bc4b69d4 libceph: implement ceph_conf_set and ceph_conf_get
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-15 10:38:26 -07:00
Sage Weil
13c6b9029e mds: init metablob MDLog* for EImportStart
This will initialize metablob.my_offset, which makes the parent inode
journaling logic work properly.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-14 21:18:03 -07:00
Sage Weil
68653b385d init-ceph: no log_dir default
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-14 21:17:54 -07:00
Sage Weil
6150f581a8 mds: fix journal offset types
Always uint64_t!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-14 21:17:47 -07:00
Sage Weil
f5b566b0cc mds: show migration state names on cancel
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-14 21:17:43 -07:00
Colin Patrick McCabe
b5f6eb12e1 rgw: rework error handling a bit
Rados Gateway: get rid of RGWOp::err. We already have req_state::err and
that represents the same thing.

Standardize nomenclature for errors. 'errno' is our internal
representation of the error. 'code' is what is returned by S3.
'message' is the message at the end. Improve rgw_err.

dump_errno shouldn't modify req_state, but just dump the error.
A new function set_req_state_err sets the error based on an 'errno'.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-14 17:13:33 -07:00
Colin Patrick McCabe
4eb9d4f758 config: add test for override ordering, comment
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-14 15:52:53 -07:00
Colin Patrick McCabe
a199416287 config: de-globalize reading config file
Reading a config file into any md_config_t structure except g_conf used
to be impossible. This is because the config_option code used to
contain explicit references to g_conf. Those have been removed, so now
any md_config_t should be able to read a configuration file.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-14 15:49:16 -07:00
Colin Patrick McCabe
22dbbe8518 radosgw_admin: fix make check
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-14 15:18:31 -07:00
Colin Patrick McCabe
a3a1a0437e config: make md_config_t.name a value, not ptr
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-14 15:14:06 -07:00
Yehuda Sadeh
a3144a11d1 rgw: don't modify object owner when setting acls 2011-04-14 14:59:09 -07:00
Yehuda Sadeh
6f730af192 rgw: allow changing acl using canned acl 2011-04-14 14:43:24 -07:00
Yehuda Sadeh
54913d4327 radosgw_admin: add 'bucket unlink' option 2011-04-14 14:43:24 -07:00
Wido den Hollander
08e9855dcd mkcephfs: Actually do a mkfs.btrfs
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-14 11:38:11 -07:00
Colin Patrick McCabe
141178f1a4 MonitorStore: use sync_filesystem when available
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 17:40:02 -07:00
Colin Patrick McCabe
09d4c96d93 dout: log_per_instance should work with log_file
Now log_per_instance (the symlink dance) works with both log_file and
log_dir. This will facilitate gradually removing log_dir.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 15:36:34 -07:00
Samuel Just
98911b6c4c RadosModel: error handling fixes
ReadOp should read the recieve length to prevent buffer error.

Check error codes on WriteOp and ReadOp.

Signed-off-by: Samuel Just <rexludorum@gmail.com>
2011-04-13 15:05:41 -07:00
Colin Patrick McCabe
839b4cacde filestore: fix do_getxattr check
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 14:51:15 -07:00
Colin Patrick McCabe
9ac7825dc1 FileStore: give better error message about xattrs
Fixes #952.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 14:23:21 -07:00
Sage Weil
9e0565cdef mds: fix dn unlocking on export_reverse
Triggered by mds_kill_import_at 5.  We were clearing the export_locks
prior to calling export_unlock (der!).

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-13 13:58:19 -07:00
Sage Weil
7dc82d0906 mds: during export list target second
We need to maintain the invariant that (dir_auth.first==whoami) == is_auth.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-13 13:58:19 -07:00