Commit Graph

13851 Commits

Author SHA1 Message Date
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
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
Sage Weil
607ce44aa4 mds: do not start_new_segment on replay_start
We do not need to start a new segment after replay.  And in fact must not
journal an ESubtreeMap prior to doing resolve!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-13 13:58:19 -07:00
Sage Weil
7c17cd32b4 mds: fix bad import_state check on handle_export_discover
This populates import_state[] with an bad value and leads to crashes like

mds/Migrator.h: In function 'static const char* Migrator::get_import_statename(int)', in thread '0x7f5ea8c97710'
mds/Migrator.h: 112: FAILED assert(0)
 ceph version 0.25-670-g85bd67e (commit:85bd67e0ab58876ad807b44ab2154e84b90a4f30)
 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x53) [0xa53ad6]
 2: (Migrator::get_import_statename(int)+0x68) [0x91ea0f]
 3: (Migrator::show_importing()+0x174) [0x90f640]

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-13 13:58:18 -07:00
Sage Weil
338c9a6609 mds: queue rejoin_waiters on rejoin_ack survivor
For recovering nodes, we eventually open_snap_parents and much later
requeue these waiters.  A surviving node wasn't requeueing them at all.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-13 13:58:18 -07:00
Sage Weil
c9ce4cf95d mds: fix resolve
This was broken by a01fba175b when an ambiguous import was changed
from CDIR_AUTH_UNKNOWN to <whoami,whoami> and disambiguate_imports wasn't
updated accordingly.  The result was inconsistent results for subtree
ownership on different nodes.

This updates disambiguate_imports to match that EImportStart::replay
change.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-13 13:58:18 -07:00
Sage Weil
4fe48ed8ce mds: don't check_rstats on non-auth or frozen dirs
If we are, say, auth but frozen (mid-import) the dir content isn't valid
and check_rstats will likely fail.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-13 13:58:18 -07:00
Sage Weil
aa07489822 mds: fix _freeze_dir assert for refragment case
The is_freezeable_dir() is true at freeze time but not forever after over
the lifetime of the freeze.  We split later on and _freeze_dir on the new
fragments, so this assertion isn't necessarily true then.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-13 13:58:18 -07:00
Sage Weil
4001b81d53 mds: fix choose_lock_state() on xlocked object
This crops up on inodes during clientreplay when we reconnect the cap
on the newly created (and still xlocked) object.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-13 13:58:18 -07:00
Colin Patrick McCabe
e341fe0b18 osd: Use syncfs when available
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 13:45:20 -07:00
Yehuda Sadeh
5c06fc1c8b rgw: create bucket with empty name should return a valid error 2011-04-13 13:29:24 -07:00
Yehuda Sadeh
59309b376c rgw: recreation of bucket returns success
unless it was owned by a different user, at which case it
returns -EEXIST.
2011-04-13 10:39:16 -07:00
Greg Farnum
b7b66ac95e mds: update rstats on stray dir when you rename over existing inode.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-13 10:36:23 -07:00
Colin Patrick McCabe
cc162771fc sample.ceph.conf: add log file and pid file
These really should be included in a sample...

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 10:02:25 -07:00
Colin Patrick McCabe
694c4379ce vstart.sh: use "log file" instead of "log dir"
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-13 10:01:03 -07:00
Yehuda Sadeh
fd0290a00a rgw: listing non existent bucket returns NoSuchBucket 2011-04-13 08:45:43 -07:00
Sage Weil
baeab784f9 Merge remote branch 'origin/mon_mds' 2011-04-12 19:57:18 -07:00
Colin Patrick McCabe
02e93108bb osd: move MAX_CEPH_OBJECT_NAME_LEN into object.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-12 17:20:21 -07:00
Colin Patrick McCabe
40828086c2 osd: check obj name length to avoid ENAMETOOLONG
Since the object store is ultimately based on ext3, ext4, or btrfs, and
object names ultimately get translated into file names, we need to
impose a corresponding limit on the length of ceph object names.

Otherwise, the "writeback" thread in the FileStore gets ENAMETOOLONG,
and the transaction does not succeed, even though we journalled it.

Perhaps we will extend or eliminate MAX_CEPH_OBJECT_NAME_LEN at some
point by using prehashing or some other technique. Until then, we need
to be sure to check for this.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-12 17:09:02 -07:00
Josh Durgin
2380e70a6b librbd: don't write to stdout
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-04-12 16:40:03 -07:00
Colin Patrick McCabe
1eae9d6da2 Add test_mutate
Add test_mutate, in an effort to track down an objecter bug.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-12 14:31:59 -07:00