]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoMerge branch 'next'
Sage Weil [Wed, 30 Mar 2011 23:55:38 +0000 (16:55 -0700)]
Merge branch 'next'

Conflicts:
src/cmon.cc
src/osdc/Journaler.cc

14 years agomkcephfs: minor fix
Samuel Just [Tue, 29 Mar 2011 20:33:37 +0000 (13:33 -0700)]
mkcephfs: minor fix

line 400: && $type == "osd" is not always valid.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomkcephfs: copy to daemon nodes for each daemon
Samuel Just [Wed, 30 Mar 2011 20:14:55 +0000 (13:14 -0700)]
mkcephfs: copy to daemon nodes for each daemon

The tmp directory is removed after each daemon.  Previously, this would
break if two daemons were on the same node.  Now, the files will be
copied for each daemon.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agojournaler: don't block when we adjust back write_pos
Sage Weil [Wed, 30 Mar 2011 23:46:04 +0000 (16:46 -0700)]
journaler: don't block when we adjust back write_pos

is_readable() may need to adjust the write_pos backward, but will return
false.  If we are at the end we still need to wake up any waiters so they
know about it.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoconfig: parse_argv fix
Colin Patrick McCabe [Wed, 30 Mar 2011 23:17:48 +0000 (16:17 -0700)]
config: parse_argv fix

md_config_t::parse_argv: fold md_config_t::parse_argv_part2 into
parse_argv. Fix brokenness introduced by the std::string switchover.

OPTION macro: move single-character options out of the OPTION macro and
into config.cc

Fix ceph_argparse_witharg / ceph_argparse_flag uses to include a
trailing (char*)NULL, to ensure that we terminate with a pointer rather
than a 32-bit int.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados: print error message on exit
Sage Weil [Wed, 30 Mar 2011 23:32:26 +0000 (16:32 -0700)]
rados: print error message on exit

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorados: add 'tmap {set,create} obj key value'
Sage Weil [Wed, 30 Mar 2011 23:32:15 +0000 (16:32 -0700)]
rados: add 'tmap {set,create} obj key value'

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: add tmap key (exclusive) create
Sage Weil [Wed, 30 Mar 2011 23:31:59 +0000 (16:31 -0700)]
osd: add tmap key (exclusive) create

Return EEXIST if a key already exists.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoconfig: fix use of uint64_t* as uint32_t*
Colin Patrick McCabe [Wed, 30 Mar 2011 22:44:46 +0000 (15:44 -0700)]
config: fix use of uint64_t* as uint32_t*

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: tighten up uint32_t use
Colin Patrick McCabe [Wed, 30 Mar 2011 22:35:03 +0000 (15:35 -0700)]
config: tighten up uint32_t use

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomkcephfs: copy to daemon nodes for each daemon
Samuel Just [Wed, 30 Mar 2011 20:14:55 +0000 (13:14 -0700)]
mkcephfs: copy to daemon nodes for each daemon

The tmp directory is removed after each daemon.  Previously, this would
break if two daemons were on the same node.  Now, the files will be
copied for each daemon.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agocommon_init: fix keyring loading
Sage Weil [Wed, 30 Mar 2011 22:04:14 +0000 (15:04 -0700)]
common_init: fix keyring loading

Can't pass a NULL char* to std::string constructor.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocommon: Add strict_strtof, strict_strtod, unittest
Colin Patrick McCabe [Wed, 30 Mar 2011 21:57:45 +0000 (14:57 -0700)]
common: Add strict_strtof, strict_strtod, unittest

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoOSD: ReplicatedPG: commits should be high priority, like acks.
Greg Farnum [Wed, 30 Mar 2011 20:30:32 +0000 (13:30 -0700)]
OSD: ReplicatedPG: commits should be high priority, like acks.

This was consistently breaking stuff for some people, as the acks were
high priority but the commits weren't. They should match.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoconfig: use std::string in md_config_t
Colin Patrick McCabe [Wed, 30 Mar 2011 17:29:45 +0000 (10:29 -0700)]
config: use std::string in md_config_t

Use std::string to represent md_config_t strings. This makes memory
management a lot easier and should fix some leaks. "No value" is now
represented by an empty string, whereas before some places were using
empty strings and some were using NULL.

config.cc: Fix a minor decode bug.

In pid_file.cc, copy the pid_file using snprintf, since strncpy
does not always NULL-terminate.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/bufferlist.cc: Added append tests
sam [Wed, 30 Mar 2011 16:31:45 +0000 (09:31 -0700)]
test/bufferlist.cc: Added append tests

Tests appending many randomly sized chunks many of which are size zero.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoConfUtils: move parsing into config.cc
Colin Patrick McCabe [Wed, 30 Mar 2011 04:52:35 +0000 (21:52 -0700)]
ConfUtils: move parsing into config.cc

Move parsing into config.cc, since there was already parsing code there.
Move metavariable escaping out of ConfUtils; having this in ConfUtils
makes it impossible to de-globalize g_conf.

Create a nicer API for pulling stuff out of the configuration file.
Since the value we pull is determined by the config structure in effect
at the time, it should be an instance method of md_config_t.

Remove some deadcode. Add some comments.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoConfUtils: fix up read API a bit
Colin Patrick McCabe [Tue, 29 Mar 2011 23:05:12 +0000 (16:05 -0700)]
ConfUtils: fix up read API a bit

Remove def_val. Return error codes for not found, parse error, etc.
Fix API users.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoConfUtils: decode to std::string
Colin Patrick McCabe [Tue, 29 Mar 2011 20:42:26 +0000 (13:42 -0700)]
ConfUtils: decode to std::string

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomount.ceph: Use LDADD not LDFLAGS to bring in -lkeyutils.
Tommi Virtanen [Tue, 29 Mar 2011 23:31:29 +0000 (16:31 -0700)]
mount.ceph: Use LDADD not LDFLAGS to bring in -lkeyutils.

Without this, flab (gcc 4.2.4) failed with:

libtool: link: gcc -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic -g -O2 -o mount.ceph mount.ceph.o armor.o  -lkeyutils /usr/lib/libcrypto++.so
/usr/lib/libcrypto++.so: undefined reference to `pthread_key_create'
/usr/lib/libcrypto++.so: undefined reference to `pthread_getspecific'
/usr/lib/libcrypto++.so: undefined reference to `pthread_key_delete'
/usr/lib/libcrypto++.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocosd: fix bind to specific address
Sage Weil [Tue, 29 Mar 2011 23:23:55 +0000 (16:23 -0700)]
cosd: fix bind to specific address

Do not default to public_addr for cluster, heartbeat messengers.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomkcephfs: minor fix
Samuel Just [Tue, 29 Mar 2011 20:33:37 +0000 (13:33 -0700)]
mkcephfs: minor fix

line 400: && $type == "osd" is not always valid.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoAdd an RPM BuildRequires on keyutils-libs-devel.
Tommi Virtanen [Tue, 29 Mar 2011 22:37:10 +0000 (15:37 -0700)]
Add an RPM BuildRequires on keyutils-libs-devel.

See 9aab8c6b051469904d7ecd5a9a6dd7aaf5cc3931.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoconfig: temporary fix for monclient conf issue
Colin Patrick McCabe [Tue, 29 Mar 2011 21:53:10 +0000 (14:53 -0700)]
config: temporary fix for monclient conf issue

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocmon: fix typo
Sage Weil [Tue, 29 Mar 2011 21:49:09 +0000 (14:49 -0700)]
cmon: fix typo

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'stable' into next
Sage Weil [Tue, 29 Mar 2011 21:47:57 +0000 (14:47 -0700)]
Merge branch 'stable' into next

Conflicts:
configure.ac
debian/changelog
src/msg/SimpleMessenger.cc

14 years agomount.ceph: fix missing includes
Colin Patrick McCabe [Tue, 29 Mar 2011 21:11:43 +0000 (14:11 -0700)]
mount.ceph: fix missing includes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAdd a Debian Build-Dep on libkeyutils-dev.
Tommi Virtanen [Tue, 29 Mar 2011 20:34:52 +0000 (13:34 -0700)]
Add a Debian Build-Dep on libkeyutils-dev.

This is needed by bee85518e2885cc93fe8ca634292ad4846515456.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomount.ceph: Use kernel key management API when possible.
Tommi Virtanen [Tue, 29 Mar 2011 18:39:26 +0000 (11:39 -0700)]
mount.ceph: Use kernel key management API when possible.

Backwards compatible with older kenrnels, for now.

Fixes: #852
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocommon: Make armor.h safe to use from C.
Tommi Virtanen [Tue, 29 Mar 2011 16:21:09 +0000 (09:21 -0700)]
common: Make armor.h safe to use from C.

mount.ceph needs to base64-decode the secrets, so we can get rid of
the kernel-side base64 decode, but it doesn't need all of common lib.
And it is written in C.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomount.ceph: Modprobe ceph before trying the mount.
Tommi Virtanen [Tue, 29 Mar 2011 00:32:24 +0000 (17:32 -0700)]
mount.ceph: Modprobe ceph before trying the mount.

This will be needed for the next few commits, where we try to load the
keys into the kernel; without ceph.ko loaded, the key type will not be
recognized.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomount.ceph: Silently pass through options "name" and "secret".
Tommi Virtanen [Tue, 29 Mar 2011 16:05:09 +0000 (09:05 -0700)]
mount.ceph: Silently pass through options "name" and "secret".

Fixes: #914
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomount.ceph: Fix strncmp length comparing "secretfile".
Tommi Virtanen [Tue, 29 Mar 2011 15:49:33 +0000 (08:49 -0700)]
mount.ceph: Fix strncmp length comparing "secretfile".

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agorgw: add bucket to user list prior to creating bucket
Sage Weil [Tue, 29 Mar 2011 19:39:46 +0000 (12:39 -0700)]
rgw: add bucket to user list prior to creating bucket

This avoids hitting the osd immediately following a bucket creation, which
will avoid any map update latency for most requests.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: create bucket object and xattr in single operation
Sage Weil [Tue, 29 Mar 2011 18:24:52 +0000 (11:24 -0700)]
rgw: create bucket object and xattr in single operation

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agolibrados: add create to ObjectOperation
Sage Weil [Tue, 29 Mar 2011 18:23:45 +0000 (11:23 -0700)]
librados: add create to ObjectOperation

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoobjecter: add create to ObjectOperation, known strings
Sage Weil [Tue, 29 Mar 2011 18:22:57 +0000 (11:22 -0700)]
objecter: add create to ObjectOperation, known strings

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoSyntheticClient: const cleanup
Colin Patrick McCabe [Tue, 29 Mar 2011 19:07:14 +0000 (12:07 -0700)]
SyntheticClient: const cleanup

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoFileStore: convert dev, jdev to std::string
Colin Patrick McCabe [Tue, 29 Mar 2011 18:34:54 +0000 (11:34 -0700)]
FileStore: convert dev, jdev to std::string

Convert dev, jdev to std::string in preparation for adding std::string
to g_conf.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocmon: add --inject-monmap option
Sage Weil [Tue, 29 Mar 2011 18:58:13 +0000 (11:58 -0700)]
cmon: add --inject-monmap option

This lets you manually inject a monmap into a down monitor.  This is useful
in cases where you need to change the monmap but aren't able to get a
quorum with the old map.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomkcephfs: don't clobber osdmap when importing crushmap
Sage Weil [Tue, 29 Mar 2011 18:20:49 +0000 (11:20 -0700)]
mkcephfs: don't clobber osdmap when importing crushmap

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibrados: compound ObjectOperation
Sage Weil [Mon, 28 Mar 2011 22:41:24 +0000 (15:41 -0700)]
librados: compound ObjectOperation

Wrap the internal ObjectOperation and expose via librados.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoconfig: refactor conf_set_conf_val a bit
Colin Patrick McCabe [Mon, 28 Mar 2011 23:52:20 +0000 (16:52 -0700)]
config: refactor conf_set_conf_val a bit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: be stricter in set_val
Colin Patrick McCabe [Mon, 28 Mar 2011 23:28:38 +0000 (16:28 -0700)]
config: be stricter in set_val

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoconfig: whitespace, code ordering cleanup
Colin Patrick McCabe [Mon, 28 Mar 2011 23:21:15 +0000 (16:21 -0700)]
config: whitespace, code ordering cleanup

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: rename old argument parsing macros
Colin Patrick McCabe [Mon, 28 Mar 2011 23:10:33 +0000 (16:10 -0700)]
common: rename old argument parsing macros

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agocommon: more argument parsing into ceph_argparse
Colin Patrick McCabe [Mon, 28 Mar 2011 23:02:11 +0000 (16:02 -0700)]
common: more argument parsing into ceph_argparse

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agovstart.sh: Filter out IPv6 and localhost IP addresses.
Tommi Virtanen [Mon, 28 Mar 2011 22:45:45 +0000 (15:45 -0700)]
vstart.sh: Filter out IPv6 and localhost IP addresses.

On e.g. Ubuntu 10.10, hostname --ip-address outputs something
like "::1 10.1.2.3 127.0.1.1", and this makes the generated
config be invalid. Get rid of the entries we can't use.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agocommon: separate file for strict_strtol
Colin Patrick McCabe [Mon, 28 Mar 2011 21:14:52 +0000 (14:14 -0700)]
common: separate file for strict_strtol

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobjecter: ObjectOperation fixes
Sage Weil [Mon, 28 Mar 2011 22:14:39 +0000 (15:14 -0700)]
objecter: ObjectOperation fixes

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: remove obsolete journaler_cache thing
Sage Weil [Mon, 28 Mar 2011 21:03:38 +0000 (14:03 -0700)]
journaler: remove obsolete journaler_cache thing

This is ancient code used for testing impact of journal IO, no longer
useful.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: remove extra read_acls
Yehuda Sadeh [Sat, 26 Mar 2011 00:09:56 +0000 (17:09 -0700)]
rgw: remove extra read_acls

14 years agomsgr: move pidfile handling, signal handing out
Colin Patrick McCabe [Fri, 25 Mar 2011 22:27:54 +0000 (15:27 -0700)]
msgr: move pidfile handling, signal handing out

Move signal handling and pidfile writing out of the messenger and into
signal.cc and pidfile.cc, respectively.

(Try to) remove our pid file when we crash due to a fatal signal.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotestradospp: zero terminate before printing strs
Colin Patrick McCabe [Fri, 25 Mar 2011 21:45:37 +0000 (14:45 -0700)]
testradospp: zero terminate before printing strs

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: include .ceph is root directory
Sage Weil [Fri, 25 Mar 2011 21:34:17 +0000 (14:34 -0700)]
mds: include .ceph is root directory

If the dentry isn't marked dirty _commit_partial won't save it.  This is
caught later by the check_rstats() (or anyone actually trying to use the
/.ceph directory).

Fixes: #938
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: run_cmd: fix bad implicit conversion
Colin Patrick McCabe [Fri, 25 Mar 2011 21:01:29 +0000 (14:01 -0700)]
common: run_cmd: fix bad implicit conversion

Since NULL is really just a macro defined to be 0, we must use
(char*)NULL or similar to force the compiler to use a true pointer value
as the last argument to the run_cmd varargs function. Otherwise, the 0
gets promoted to an int, which probably is not the same length as a
pointer these days (32 vs. 64.)

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: fix client session removal on journal replay
Sage Weil [Fri, 25 Mar 2011 20:50:45 +0000 (13:50 -0700)]
mds: fix client session removal on journal replay

We want to remove the client session from the map as long as it is not
attached to an actual messenger Connection.  This key point got lost
somewhere the last time the session states were restructured.  It is now
explicit.

This fixes the symptom where a recovering MDS reconnect has to time out on
clients that cleanly closed their sessions.

Also, fix a use-after-free when (uselessly) printing the session state.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'vapre/journaler'
Sage Weil [Fri, 25 Mar 2011 19:58:38 +0000 (12:58 -0700)]
Merge remote branch 'vapre/journaler'

14 years agoFix Debian librados1 -> librados2 package renames
Laszlo Boszormenyi [Fri, 25 Mar 2011 18:47:26 +0000 (19:47 +0100)]
Fix Debian librados1 -> librados2 package renames

The librados2{,-dbg,-dev} packages should conflict with and replace their
librados1{,-dbg,-dev} counterpart.

14 years agojournaler: remove ack/safe distinction
Sage Weil [Fri, 25 Mar 2011 19:37:48 +0000 (12:37 -0700)]
journaler: remove ack/safe distinction

Rip out old complexity to _only_ pay attention to when data is safely
committed on disk.  No more ack/safe distinction or ack_barrier complexity
(to preserve ordered with some submissions waiting on ack and some safe).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoobsync: Remove deadcode
Colin Patrick McCabe [Fri, 25 Mar 2011 19:30:27 +0000 (12:30 -0700)]
obsync: Remove deadcode

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounits: remove "performance test" from crypto units
Colin Patrick McCabe [Fri, 25 Mar 2011 17:37:49 +0000 (10:37 -0700)]
units: remove "performance test" from crypto units

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agounits: fix cauthtool usage test
Colin Patrick McCabe [Fri, 25 Mar 2011 17:37:33 +0000 (10:37 -0700)]
units: fix cauthtool usage test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: escape XML attributes
Colin Patrick McCabe [Fri, 25 Mar 2011 00:29:21 +0000 (17:29 -0700)]
rgw: escape XML attributes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoboto_tool.py: usage fix
Colin Patrick McCabe [Fri, 25 Mar 2011 00:54:59 +0000 (17:54 -0700)]
boto_tool.py: usage fix

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: don't reject requests that don't have bucket
Colin Patrick McCabe [Fri, 25 Mar 2011 17:21:36 +0000 (10:21 -0700)]
rgw: don't reject requests that don't have bucket

Some requests don't specify a bucket. Allow those!

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agojournaler: remove some dead code from read_entry()
Sage Weil [Fri, 25 Mar 2011 16:52:47 +0000 (09:52 -0700)]
journaler: remove some dead code from read_entry()

These were used to track completion.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: issue separate reads per period
Sage Weil [Fri, 25 Mar 2011 16:51:53 +0000 (09:51 -0700)]
journaler: issue separate reads per period

This lets us potentially digest any read data as soon as possible. Before
the Filer would issue a string of reads and we'd only get the data back
once _all_ those objects were read.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: fix prefetch to handle multiple in-flight reads
Sage Weil [Fri, 25 Mar 2011 16:42:47 +0000 (09:42 -0700)]
journaler: fix prefetch to handle multiple in-flight reads

If we issue multiple reads, they can come back in any order.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournler: make readahead/prefetch smarter
Sage Weil [Fri, 25 Mar 2011 16:30:16 +0000 (09:30 -0700)]
journler: make readahead/prefetch smarter

Always try to prefetch N segments ahead of the current read position.  The
old implementation would read a bunch of data, process it all, then read
a bunch more.  This was suboptimal on a couple different levels.

Also, make an internal _is_readable() _not_ do the prefetch step; only do
that for external callers.

Fixes: #929
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: reduce prefetch interval
Sage Weil [Fri, 25 Mar 2011 16:29:20 +0000 (09:29 -0700)]
journaler: reduce prefetch interval

50MB was overkill.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agojournaler: remove unused read_entry()
Sage Weil [Fri, 25 Mar 2011 15:39:04 +0000 (08:39 -0700)]
journaler: remove unused read_entry()

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocommon_init: allow init without config file
Colin Patrick McCabe [Fri, 25 Mar 2011 00:01:51 +0000 (17:01 -0700)]
common_init: allow init without config file

Add a flag, CINIT_FLAG_NO_DEFAULT_CONFIG_FILE, that specifies that the
program should not read a config file by default.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMDSMon: Add mon_force_standby_active config option.
Greg Farnum [Thu, 24 Mar 2011 23:52:06 +0000 (16:52 -0700)]
MDSMon: Add mon_force_standby_active config option.

If this is set to true (which it defaults to), then the mon
will force MDSes configured as mds_standby_replay to become active.
For #893.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agofilestore: fix journaling for writeahead, parallel modes
Sage Weil [Thu, 24 Mar 2011 23:13:21 +0000 (16:13 -0700)]
filestore: fix journaling for writeahead, parallel modes

This was broken by c866536bff5bdd9c31772dfa1e63e2: build_op() clobbers
the local tls, so we need to use o->tls instead.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: include stat result (size) in debug output
Sage Weil [Thu, 24 Mar 2011 21:22:05 +0000 (14:22 -0700)]
filestore: include stat result (size) in debug output

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: let single large ops through the throttler
Sage Weil [Thu, 24 Mar 2011 21:21:52 +0000 (14:21 -0700)]
osd: let single large ops through the throttler

Otherwise we block indefinitely on a single op that's larger than the
throttler limit.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: fix str_to_bool
Yehuda Sadeh [Thu, 24 Mar 2011 21:24:11 +0000 (14:24 -0700)]
rgw: fix str_to_bool

14 years agorgw: don't validate bucket/object names if name is empty
Yehuda Sadeh [Thu, 24 Mar 2011 21:16:15 +0000 (14:16 -0700)]
rgw: don't validate bucket/object names if name is empty

14 years agoboto_tool rework
Colin Patrick McCabe [Thu, 24 Mar 2011 18:46:28 +0000 (11:46 -0700)]
boto_tool rework

Change boto_tool to have more functionality.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge branch 'master' of ssh://ceph.newdream.net/git/ceph
Yehuda Sadeh [Thu, 24 Mar 2011 19:12:10 +0000 (12:12 -0700)]
Merge branch 'master' of ssh://ceph.newdream.net/git/ceph

14 years agorgw: path paramter for pseudo folders
Yehuda Sadeh [Thu, 24 Mar 2011 19:11:41 +0000 (12:11 -0700)]
rgw: path paramter for pseudo folders

14 years agomds: drop dead journal flush code
Sage Weil [Thu, 24 Mar 2011 18:54:37 +0000 (11:54 -0700)]
mds: drop dead journal flush code

This is now obsolete.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'rgw'
Yehuda Sadeh [Thu, 24 Mar 2011 18:48:52 +0000 (11:48 -0700)]
Merge branch 'rgw'

Conflicts:

src/rgw/rgw_common.h

14 years agomds: remove mds_log_unsafe mode
Sage Weil [Thu, 24 Mar 2011 03:58:03 +0000 (20:58 -0700)]
mds: remove mds_log_unsafe mode

The mds_log_unsafe mode would wait for ack for some journal writes, and
safe for others.  Now that we can reply to client requests without waiting
for the journal to flush (as of ~2 years ago), this distinction is no
longer useful.  It is also more error-prone, as it complicates the code
and vastly expands the possible combinations of MDS failures and replay
scenarios we need to verify.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agobucket name: better ip addr detection, allow caps
Colin Patrick McCabe [Thu, 24 Mar 2011 17:41:08 +0000 (10:41 -0700)]
bucket name: better ip addr detection, allow caps

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agovalidate_bucket_name: loosen up
Colin Patrick McCabe [Thu, 24 Mar 2011 17:27:18 +0000 (10:27 -0700)]
validate_bucket_name: loosen up

Allow users to create bucket names that don't meet the S3
recommendations, but which do meet the spec.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoboto_tool.py: add more bucket interaction stuff
Colin Patrick McCabe [Thu, 24 Mar 2011 17:11:43 +0000 (10:11 -0700)]
boto_tool.py: add more bucket interaction stuff

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: reimplement laggy
Sage Weil [Thu, 24 Mar 2011 00:17:44 +0000 (17:17 -0700)]
mds: reimplement laggy

The goal is for the MDS to stop processing requests when it hasn't heard
from the monitors, to avoid a situation where a rogue process goes off
doing its own thing.  Yes, if we fail it over the cmds can't write to the
object store, but it can reply to clients when it may not be appropriate
or good to do so.

The old logic was fragile and wonky, with messages getting deferred, and
then re-deferred.  This implementation is much cleaner and should be much
more efficient and less fragile.  There are still improvements to be made
as far as which messages we do/do not process when we think we're laggy.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: check safe_pos for _expired check
Sage Weil [Thu, 24 Mar 2011 03:50:12 +0000 (20:50 -0700)]
mds: check safe_pos for _expired check

Don't expire a log segment until it's committed (not acked).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: skip redundant flush before journal segment trim
Sage Weil [Thu, 24 Mar 2011 03:37:04 +0000 (20:37 -0700)]
mds: skip redundant flush before journal segment trim

Back in olden times when we would would wait for acks for some journal
writes, we did an extra wait_for_safe() before discarding a journal segment
to make sure anything being discarded was safely committed in newers
segments.  These days mds_log_unsafe is always false (and
journaler_safe is true), so we can skip this check.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: assert on mds table write error
Sage Weil [Thu, 24 Mar 2011 03:19:08 +0000 (20:19 -0700)]
mds: assert on mds table write error

Do not silently ignore a write failure.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: factor pg get-or-create code into common helper
Sage Weil [Tue, 22 Mar 2011 04:38:36 +0000 (21:38 -0700)]
osd: factor pg get-or-create code into common helper

handle_pg_notify and _process_pg_info both lookup or create a PG based
on an incoming message.  Factor that code into a common helper.  There
were a few differences in that the pg notify handler code deals with
more cases (namely, pg creation), but this is harmless for the more
general _process_pg_info caller.

Closes: #577
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocalc_hmac_sha: fix access-past-end-of-buffer
Colin Patrick McCabe [Thu, 24 Mar 2011 05:42:02 +0000 (22:42 -0700)]
calc_hmac_sha: fix access-past-end-of-buffer

Fix a place where we access a buffer past the end of its length. Clean
up the function a bit.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoUse macro for digest size, part 2: tests
Colin Patrick McCabe [Thu, 24 Mar 2011 01:49:04 +0000 (18:49 -0700)]
Use macro for digest size, part 2: tests

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomkcephfs: minor fixes
Samuel Just [Wed, 23 Mar 2011 20:52:28 +0000 (13:52 -0700)]
mkcephfs: minor fixes

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agodo_autogen: create radosgw
Colin Patrick McCabe [Thu, 24 Mar 2011 00:33:35 +0000 (17:33 -0700)]
do_autogen: create radosgw

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoRGW: validate bucket names and object names
Colin Patrick McCabe [Wed, 23 Mar 2011 17:02:17 +0000 (10:02 -0700)]
RGW: validate bucket names and object names

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: add FIXME for renames between snaprealms
Sage Weil [Wed, 23 Mar 2011 23:54:33 +0000 (16:54 -0700)]
mds: add FIXME for renames between snaprealms

The lock gather may be sufficient to propagate the updated snaprealm to
the replica; it might not. See #925.

See: #926
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoFileStore: replace op_queue_throttle with op_queue_reserve_throttle
Samuel Just [Tue, 22 Mar 2011 21:52:15 +0000 (14:52 -0700)]
FileStore: replace op_queue_throttle with op_queue_reserve_throttle

Previously, queue_op would call op_queue_throttle while holding the
journal_lock.  op_queue_throttle, however, can sleep.

We fix the problem by:
1) Factor build_op out of queue_op
2) op_queue_throttle is now op_queue_reserve_throttle and takes an op as
an argument.  op_queue_reserve_throttle can be called before the journal
lock is taken.  This also avoids the race between calling throttle and
incrementing op_queue_bytes and op_queue_len.
3) queue_op now takes the op generated using build_op as an argument.
4) _journaled_ahead no longer needs to call throttle as
queue_transactions has already reserved space.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>