]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agomds: remove stray reference& in FragmentMarking context
Sage Weil [Thu, 6 Jan 2011 00:42:33 +0000 (16:42 -0800)]
mds: remove stray reference& in FragmentMarking context

Led to confusing occasional(!) crashes on marking completion.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: change refragment journaling/store strategy
Sage Weil [Wed, 5 Jan 2011 23:31:06 +0000 (15:31 -0800)]
mds: change refragment journaling/store strategy

We had a serious problem before where we were updating the cache and
redivvying up the dentries among fragments, but not immediately
journaling it.  This was okay only if we were lucky and no other update
journaled something (e.g. some random child journaling its ancestors).

Instead, journal (PREPARE) immediately and in parallel with the new
dirfrag stores.  When the stores complete, journal again (COMMIT).  On
journal replay, for any PREPAREs without matching COMMITS we immediately
journal a ROLLBACK.

Other behavior is essentially unchanged.  We don't send the notify until
both the PREPARE and STORES complete.  But that part doesn't really matter:
if we restart and rollback, peers will find out during resolve/rejoin,
as before.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: make adjust_dir_fragments always adjust fragtree
Sage Weil [Wed, 5 Jan 2011 23:17:36 +0000 (15:17 -0800)]
mds: make adjust_dir_fragments always adjust fragtree

If we have the inode but no dirfrags, we still need to adjust the
inode dirfragtree.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge remote branch 'origin/testing' into unstable
Sage Weil [Thu, 6 Jan 2011 00:48:11 +0000 (16:48 -0800)]
Merge remote branch 'origin/testing' into unstable

14 years agomds: fix can_authpin assert on post-fragment commit
Sage Weil [Wed, 5 Jan 2011 20:49:58 +0000 (12:49 -0800)]
mds: fix can_authpin assert on post-fragment commit

We wan to ignore the authpinnability check here; we already have the
(old) frag frozen, so no worries about starvation and retaking an auth_pin.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: add mds_debug_frag option
Sage Weil [Wed, 5 Jan 2011 19:51:30 +0000 (11:51 -0800)]
mds: add mds_debug_frag option

Verify dirfragtree matches any open dirfrags.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd, rados: pgls filter fixes
Yehuda Sadeh [Thu, 6 Jan 2011 00:50:07 +0000 (16:50 -0800)]
osd, rados: pgls filter fixes

14 years agocommon: make command-line programs log to stderr
Colin Patrick McCabe [Wed, 5 Jan 2011 19:04:49 +0000 (11:04 -0800)]
common: make command-line programs log to stderr

command-line programs (as opposed to daemons) should send their logs to
stderr rather than to a log file, syslog, etc. This is especially
important because most users want to run the ceph command-line programs
as non-root, and often only root has permissions to add to the ceph
log directory.

Create a new function, set_foreground_logging, that overrides ceph.conf
settings to force all log output to stderr. For daemons, we still only
send the very highest priority messages to stderr, and only before they
daemonize().

Don't ever log to stdout because it interferes with scripts that parse
the output of stdout. Instead, log to stderr if the user gives the
--foreground or --nodaemon argument.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agorgw_admin: call common_set_defaults as non-daemon
Colin Patrick McCabe [Wed, 5 Jan 2011 23:29:48 +0000 (15:29 -0800)]
rgw_admin: call common_set_defaults as non-daemon

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agodebian: update scripts to build ubuntu (maverick, lucid) packages too
Sage Weil [Wed, 5 Jan 2011 20:40:55 +0000 (12:40 -0800)]
debian: update scripts to build ubuntu (maverick, lucid) packages too

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: move flock types into separate header
Sage Weil [Wed, 5 Jan 2011 17:33:37 +0000 (09:33 -0800)]
mds: move flock types into separate header

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorados tool: Remove duplicate line in usage
Wido den Hollander [Wed, 5 Jan 2011 13:08:14 +0000 (14:08 +0100)]
rados tool: Remove duplicate line in usage

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: generic_dout needs to take the dout mutex
Colin Patrick McCabe [Wed, 5 Jan 2011 02:05:11 +0000 (18:05 -0800)]
common: generic_dout needs to take the dout mutex

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: add pgls filtering by parent ino
Yehuda Sadeh [Wed, 5 Jan 2011 01:17:51 +0000 (17:17 -0800)]
osd: add pgls filtering by parent ino

14 years agocommon: handle_fatal_signal: print threadid in hex
Colin Patrick McCabe [Wed, 5 Jan 2011 01:02:48 +0000 (17:02 -0800)]
common: handle_fatal_signal: print threadid in hex

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomds: fix ancestor backtrace encoding
Sage Weil [Wed, 5 Jan 2011 00:14:43 +0000 (16:14 -0800)]
mds: fix ancestor backtrace encoding

Use explicit types to capture the encoding.  Include object ino in the
inode_backtrace_t so that the xattr can stand alone.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: force fragmentation for ambiguous imports as well
Sage Weil [Tue, 4 Jan 2011 22:45:34 +0000 (14:45 -0800)]
mds: force fragmentation for ambiguous imports as well

Handle needed refragmentation for processing ambiguous bounds.  That means
forcing the peers' subtree root fragmentation, and also interpreting the
peer's bounds appropriately, given that the peer's fragmentation may not
match our own.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: make resolve adjust dir fragmentation as needed
Sage Weil [Tue, 4 Jan 2011 22:39:58 +0000 (14:39 -0800)]
mds: make resolve adjust dir fragmentation as needed

During resolve, adjust dir fragmentation as needed based on the subtrees
the sender explicitly claims.  The given fragmentation on the root is
always valid.  Their bounds may not be; only split our frags as needed if
they happen to be partially in and partially out of the sender's bounding
fragset.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: make get_dirfrags_under behave when dirfragtree is not coherent with dirfrag set
Sage Weil [Tue, 4 Jan 2011 22:35:41 +0000 (14:35 -0800)]
mds: make get_dirfrags_under behave when dirfragtree is not coherent with dirfrag set

This is (currently) the case during replay/resolve, although it's not
clear that it should be.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofrag: const cleanup fragset_t
Sage Weil [Tue, 4 Jan 2011 22:03:11 +0000 (14:03 -0800)]
frag: const cleanup fragset_t

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd, objecter: pgls filtering option
Yehuda Sadeh [Tue, 4 Jan 2011 23:00:34 +0000 (15:00 -0800)]
osd, objecter: pgls filtering option

14 years agoPG: Fixes bug in _scrub with checking clones
Samuel Just [Tue, 4 Jan 2011 22:30:15 +0000 (14:30 -0800)]
PG: Fixes bug in _scrub with checking clones

I introduced this bug in
4a4a1e53c7d380cd0b582c1d0685fd0ef4ef1711.
curclone++ not curclone--.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoosd: set default pg_bits higher; pgp_bits to old value
Sage Weil [Tue, 4 Jan 2011 19:29:03 +0000 (11:29 -0800)]
osd: set default pg_bits higher; pgp_bits to old value

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoassert: print thread id in hex
Sage Weil [Tue, 4 Jan 2011 18:50:06 +0000 (10:50 -0800)]
assert: print thread id in hex

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoPG: Fix bug in scrub when checking clone sizes
Samuel Just [Tue, 4 Jan 2011 00:48:39 +0000 (16:48 -0800)]
PG: Fix bug in scrub when checking clone sizes

Previosly, _scrub checked:
assert(p->second.size == snapset.clone_size[curclone])

curclone was, however, an index into snapset.clones rather than a
snapid_t.  For clarity, curclone is now an iterator.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoclient: fix frag selection code
Sage Weil [Tue, 4 Jan 2011 18:20:18 +0000 (10:20 -0800)]
client: fix frag selection code

Calling fragtree_t::contains() on a non-frag_t is nonsense and will crash.
And a fragtree is a complete partition of the space.  What we really want
to check is if we know where to find the specific frag_t we need.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agovstart.sh: specify keyring in ceph.conf
Sage Weil [Tue, 4 Jan 2011 18:18:29 +0000 (10:18 -0800)]
vstart.sh: specify keyring in ceph.conf

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoremove ancient uofs.h
Sage Weil [Tue, 4 Jan 2011 17:16:52 +0000 (09:16 -0800)]
remove ancient uofs.h

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomkcephfs: Clarified numosd message
Matthew Roy [Fri, 31 Dec 2010 07:42:14 +0000 (02:42 -0500)]
mkcephfs: Clarified numosd message

Signed-off-by: Matthew Roy <matthew@royhousehold.net>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: assert no submit_entry during replay state
Sage Weil [Fri, 24 Dec 2010 17:00:28 +0000 (09:00 -0800)]
mds: assert no submit_entry during replay state

We should never submit items to the journal during replay.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: start new log segment resolve start, not replay finish
Sage Weil [Fri, 24 Dec 2010 17:00:02 +0000 (09:00 -0800)]
mds: start new log segment resolve start, not replay finish

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: clean up backlog generation checks a bit
Sage Weil [Fri, 24 Dec 2010 16:36:28 +0000 (08:36 -0800)]
osd: clean up backlog generation checks a bit

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: generate backlog if needed to get last_complete >= log.tail || backlog
Sage Weil [Fri, 24 Dec 2010 16:36:05 +0000 (08:36 -0800)]
osd: generate backlog if needed to get last_complete >= log.tail || backlog

If primary or a replica has a mistrimmed pg log, we need to generate the
backlog during peering.  This sucks, because the PG won't go active for
a long time, but it's what happens when there's a bug in the code that
mis-trims the PG log!

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: send sufficient log to compensate for replicas with last_complate < log.tail
Sage Weil [Fri, 24 Dec 2010 16:27:38 +0000 (08:27 -0800)]
osd: send sufficient log to compensate for replicas with last_complate < log.tail

If a replica has last_complete < log.tail and no backlog, send enough log
for them to get back into a consistent state.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: Implement max open files
Colin Patrick McCabe [Tue, 4 Jan 2011 01:18:14 +0000 (17:18 -0800)]
common: Implement max open files

In init-ceph, call ulimit -n if the user has set a maximum number of
open files, and the current maximum number of files is different.

Modify sample.ceph.conf to suggest setting a high maximum number of open
files.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: Make g_conf.osd_max_notify_timeout a uint32_t
Colin Patrick McCabe [Tue, 4 Jan 2011 00:11:33 +0000 (16:11 -0800)]
osd: Make g_conf.osd_max_notify_timeout a uint32_t

Make g_conf.osd_max_notify_timeout a uint32_t. Squashes an annoying
compiler warning and avoids the awkward issue of users specifying
negative timeouts.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMerge branch 'testing' into unstable
Sage Weil [Mon, 3 Jan 2011 23:15:26 +0000 (15:15 -0800)]
Merge branch 'testing' into unstable

14 years agomds: load root inode on replay if auth
Sage Weil [Mon, 3 Jan 2011 22:32:48 +0000 (14:32 -0800)]
mds: load root inode on replay if auth

If we are auth for the root inode, load it's initial value off of disk. We
may not see it in the log if it has not been modified.  If it has, this
is useless but fast/harmless.  This only occurs for brand-new filesystems
where the mds is immediately restarted.

Fixes #671.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomsgr: Unlock dispatch_queue.lock when short-circuiting queue_received.
Greg Farnum [Mon, 3 Jan 2011 22:14:00 +0000 (14:14 -0800)]
msgr: Unlock dispatch_queue.lock when short-circuiting queue_received.

Previously we left the mutex locked, which is obviously bad bad bad!
I believe this was the cause of #673.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agofilestore: assert on out of order journal pipeline submissions
Sage Weil [Mon, 3 Jan 2011 21:14:49 +0000 (13:14 -0800)]
filestore: assert on out of order journal pipeline submissions

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: fix wake condition when journal submission blocks
Sage Weil [Mon, 3 Jan 2011 21:14:13 +0000 (13:14 -0800)]
filestore: fix wake condition when journal submission blocks

We only want to wake up if we are at the front of the line, in order to
preserve journal submission pipeline ordering.

This fixes, among other things, messages in the log like

2010-12-21 10:38:42.515974 7f0861486700 journal op_submit_finish 5364 expected 5370, OUT OF ORDER

and bug #666.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocommon: print thread ID in sig handlers and assert
Colin Patrick McCabe [Mon, 3 Jan 2011 20:22:56 +0000 (12:22 -0800)]
common: print thread ID in sig handlers and assert

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomds: fix purge_stray for directories, zeroed layouts
Sage Weil [Mon, 3 Jan 2011 19:50:53 +0000 (11:50 -0800)]
mds: fix purge_stray for directories, zeroed layouts

- We don't want to purge file content on directories
- Don't fall over if a file has a zero period

Reported-by: Paul Komkoff <i@stingr.net>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorbd: add watch option for rbd tool
Yehuda Sadeh [Mon, 3 Jan 2011 19:37:32 +0000 (11:37 -0800)]
rbd: add watch option for rbd tool

14 years agoosd: PG::Info::History: init last_epoch_clean
Colin Patrick McCabe [Wed, 29 Dec 2010 01:03:12 +0000 (17:03 -0800)]
osd: PG::Info::History: init last_epoch_clean

It seems that we have not been zeroing
PG::Info::History:last_epoch_clean when the History structure is
created. This led to some very interesting log output (and bugs!)

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMerge branch 'testing' into unstable
Sage Weil [Mon, 3 Jan 2011 18:24:47 +0000 (10:24 -0800)]
Merge branch 'testing' into unstable

Conflicts:
configure.ac

14 years agoMerge remote branch 'origin/keyring_cleanup' into unstable
Sage Weil [Mon, 3 Jan 2011 18:24:08 +0000 (10:24 -0800)]
Merge remote branch 'origin/keyring_cleanup' into unstable

14 years agodebian: try to update pbuild env as needed
Sage Weil [Mon, 20 Dec 2010 23:59:14 +0000 (15:59 -0800)]
debian: try to update pbuild env as needed

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoSimpleMessenger.cc: Fixes a dispatch_throttler leak in queue_received
Samuel Just [Wed, 1 Dec 2010 00:52:40 +0000 (16:52 -0800)]
SimpleMessenger.cc: Fixes a dispatch_throttler leak in queue_received
when the pipe has been halted.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoauth: CEPH_KEYRING overrides g_conf.keyring
Colin Patrick McCabe [Sun, 2 Jan 2011 20:50:53 +0000 (12:50 -0800)]
auth: CEPH_KEYRING overrides g_conf.keyring

Allow users to choose different keyring files by setting an environment
variable, CEPH_KEYRING.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoauth: make g_conf.keyring a plain old string
Colin Patrick McCabe [Sun, 2 Jan 2011 20:19:35 +0000 (12:19 -0800)]
auth: make g_conf.keyring a plain old string

Make g_conf.keyring a plain old string rather than an array of strings.
Don't do substitution using the user's HOME variable-- this could lead
to security holes for setuid processes.

Get rid of AuthMonitor::read_keyfile because there is already a Keyring
member function, Keyring::load, that does the same thing.

qa/rbd/common.sh: we can now use cconf to figure out what the keyring
is.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosdmaptool: better error handling
Colin Patrick McCabe [Thu, 30 Dec 2010 23:15:39 +0000 (15:15 -0800)]
osdmaptool: better error handling

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: bufferlist: handle EINTR, check close rval
Colin Patrick McCabe [Thu, 30 Dec 2010 23:04:49 +0000 (15:04 -0800)]
common: bufferlist: handle EINTR, check close rval

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: bufferlist::read_file: return read errors
Colin Patrick McCabe [Thu, 30 Dec 2010 22:41:03 +0000 (14:41 -0800)]
common: bufferlist::read_file: return read errors

Don't ignore errors when reading a file with buffer::list.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoqa: rbd: small optimization to script
Colin Patrick McCabe [Thu, 30 Dec 2010 08:09:11 +0000 (00:09 -0800)]
qa: rbd: small optimization to script

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoqa: rbd: Update rbd test to use the new rbd sysfs
Colin Patrick McCabe [Thu, 30 Dec 2010 07:59:03 +0000 (23:59 -0800)]
qa: rbd: Update rbd test to use the new rbd sysfs

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoqa: rbd: disable automatic keyring discovery
Colin Patrick McCabe [Thu, 30 Dec 2010 18:34:11 +0000 (10:34 -0800)]
qa: rbd: disable automatic keyring discovery

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocconf: code cleanup
Colin Patrick McCabe [Thu, 30 Dec 2010 02:31:58 +0000 (18:31 -0800)]
cconf: code cleanup

cconf: add a better usage() message, with examples. Give more helpful
error messages when the usage is wrong. Put different actions into
different functions. Eliminate unecessary globals.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoauth: Fix buggy parsing of g_conf.keyring
Colin Patrick McCabe [Thu, 30 Dec 2010 01:48:12 +0000 (17:48 -0800)]
auth: Fix buggy parsing of g_conf.keyring

Previously, we weren't correctly handling comma-separated lists of
values in g_conf.keyring.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: str_list: const cleanup
Colin Patrick McCabe [Thu, 30 Dec 2010 01:58:21 +0000 (17:58 -0800)]
common: str_list: const cleanup

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd, librados: configurable notify timeout
Yehuda Sadeh [Thu, 30 Dec 2010 01:00:45 +0000 (17:00 -0800)]
osd, librados: configurable notify timeout

14 years agoosd: watch request doesn't use version
Yehuda Sadeh [Tue, 21 Dec 2010 00:49:41 +0000 (16:49 -0800)]
osd: watch request doesn't use version

also fix watch-notify to send the current user_version

14 years agoqa/rbd: minor fixes
Colin Patrick McCabe [Wed, 29 Dec 2010 23:36:22 +0000 (15:36 -0800)]
qa/rbd: minor fixes

* qa/rbd/common: create tempdir for script

* qa/rbd/common: try harder to find monhost (try "mon addr" and also
"mon.a addr")

* qa/rbd/rbd.sh: honor $mnt parameter

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomakefile: ignore mkdir -p errors in install
Colin Patrick McCabe [Wed, 29 Dec 2010 23:33:50 +0000 (15:33 -0800)]
makefile: ignore mkdir -p errors in install

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocleanup: don't use __PRETTY_FUNCTION__
Colin Patrick McCabe [Wed, 29 Dec 2010 22:34:17 +0000 (14:34 -0800)]
cleanup: don't use __PRETTY_FUNCTION__

Its output isn't as pretty as I had hoped.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agologging: clean up some error handling
Colin Patrick McCabe [Wed, 29 Dec 2010 19:12:24 +0000 (11:12 -0800)]
logging: clean up some error handling

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: PG::Info::History: init last_epoch_clean
Colin Patrick McCabe [Wed, 29 Dec 2010 01:03:12 +0000 (17:03 -0800)]
osd: PG::Info::History: init last_epoch_clean

It seems that we have not been zeroing
PG::Info::History:last_epoch_clean when the History structure is
created. This led to some very interesting log output (and bugs!)

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agosignals: handle_fatal_signal: use SA_NODEFER
Colin Patrick McCabe [Tue, 28 Dec 2010 02:04:17 +0000 (18:04 -0800)]
signals: handle_fatal_signal: use SA_NODEFER

SA_RESETHAND | SA_NODEFER allows the "re-trigger default signal handler"
trick to work for signals other than SIGSEGV.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agosignals: backtrace some more exotic fatal signals
Colin Patrick McCabe [Tue, 28 Dec 2010 01:49:57 +0000 (17:49 -0800)]
signals: backtrace some more exotic fatal signals

We're not likely to see these, but if we do, we want it in the logs!

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agosignals: test infinite_recursion
Colin Patrick McCabe [Tue, 28 Dec 2010 01:37:39 +0000 (17:37 -0800)]
signals: test infinite_recursion

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: make generic_usage a little prettier
Colin Patrick McCabe [Tue, 28 Dec 2010 01:18:58 +0000 (17:18 -0800)]
common: make generic_usage a little prettier

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agosignals: Handle SIGILL, SIGBUS, SIGFPE.
Colin Patrick McCabe [Tue, 28 Dec 2010 01:29:57 +0000 (17:29 -0800)]
signals: Handle SIGILL, SIGBUS, SIGFPE.

Print out a backtrace when we get SIGILL, SIGBUS, or SIGFPE. Fix a bug
where we failed to install a SIGABRT handler.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agotest: add TestSignalHandlers
Colin Patrick McCabe [Mon, 27 Dec 2010 21:34:01 +0000 (13:34 -0800)]
test: add TestSignalHandlers

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agorgw_admin: fix compile error in usage
Samuel Just [Tue, 21 Dec 2010 21:56:35 +0000 (13:56 -0800)]
rgw_admin: fix compile error in usage

generic_usage was changed in c4b5c33b123edfc7770e156b4b7f183f8b0af0c9
but this use was not updated.  Should call generic_client_usage.

14 years agolibrados: Fix compile error by adding std:: namespace
Greg Farnum [Tue, 21 Dec 2010 18:19:51 +0000 (10:19 -0800)]
librados: Fix compile error by adding std:: namespace

No idea how this got left out or passed any testing?

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agov0.24 v0.24
Sage Weil [Wed, 15 Dec 2010 21:01:57 +0000 (13:01 -0800)]
v0.24

14 years agoosd: compensate for replicas with tail > last_complete
Sage Weil [Mon, 20 Dec 2010 21:22:49 +0000 (13:22 -0800)]
osd: compensate for replicas with tail > last_complete

Normally we shouldn't ever have a last_complete < log.tail (&& !backlog).
But maybe we do (old bugs, whatever; see #590).  In that case, the primary
can compensate by sending more log info to the replica.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjectcacher: Fix erroneous reference to "lock" with "flock."
Greg Farnum [Mon, 20 Dec 2010 19:34:46 +0000 (11:34 -0800)]
objectcacher: Fix erroneous reference to "lock" with "flock."

This looks to be an old bug introduced years ago in
267679abc7e29e73655da7367d87e22a0a0d2375, and left
undiscovered due to code unuse.
Discovered by inspection while searching for clues to other issues.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agomds: make nested scatterlock state change check more robust
Sage Weil [Sat, 18 Dec 2010 05:02:58 +0000 (21:02 -0800)]
mds: make nested scatterlock state change check more robust

The predirty_journal_parents() calls wrlock_start() with nowait=true
because it has a journal entry open and we don't want to trigger a nested
scatterlock change that needs to journal something again (either
via scatter_writebehind or scatter_start).  (MDLog can only handle a single
log entry open at once because building multiple at once would require very
very very careful ordering of predirty() calls and versions.)

We were already check for the simple_lock() case (which may call
writebehind); fix up the check to also cover the scatter_mix() (which may
call scatter_start) case.

Fixes this crash:

mds/MDLog.h: In function 'void MDLog::start_entry(LogEvent*)':
mds/MDLog.h:191: FAILED assert(cur_event == __null)
 ceph version 0.24~rc (commit:fe10300317383ec29948d7dbe3cb31b3aa277e3c)
 1: (CInode::finish_scatter_update(ScatterLock*, CDir*, unsigned long, unsigned long)+0x804) [0x606e14]
 2: (CInode::start_scatter(ScatterLock*)+0xaa) [0x60dc1a]
 3: (Locker::scatter_mix(ScatterLock*, bool*)+0x1ca) [0x589a9a]
 4: (Locker::wrlock_start(SimpleLock*, MDRequest*, bool)+0x165) [0x597d65]
 5: (MDCache::predirty_journal_parents(Mutation*, EMetaBlob*, CInode*, CDir*, int, int, snapid_t)+0x153e) [0x55a70e]
 6: (Locker::scatter_writebehind(ScatterLock*)+0x42d) [0x58553d]
 7: (Locker::simple_lock(SimpleLock*, bool*)+0x7ab) [0x58beeb]
 8: (Locker::scatter_nudge(ScatterLock*, Context*, bool)+0x3ad) [0x58c49d]
 9: (Locker::scatter_tick()+0x28a) [0x58c98a]
 10: (MDS::tick()+0x4e4) [0x4b26a4]
 11: (SafeTimer::timer_thread()+0x22c) [0x6d164c]
 12: (SafeTimerThread::entry()+0xd) [0x6d34bd]
 13: (Thread::_entry_func(void*)+0xa) [0x4943da]
 14: /lib/libpthread.so.0 [0x7fc87810b73a]
 15: (clone()+0x6d) [0x7fc876dad69d]

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: issue caps on regular files created via MKNOD
Sage Weil [Sat, 18 Dec 2010 00:51:32 +0000 (16:51 -0800)]
mds: issue caps on regular files created via MKNOD

Give the client some caps to write with.  This is similar to the current
MKDIR behavior, but with different bits.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set a writeable client range on regular files created via MKNOD
Sage Weil [Sat, 18 Dec 2010 00:33:15 +0000 (16:33 -0800)]
mds: set a writeable client range on regular files created via MKNOD

If the client reexports ceph via nfs, file creations come through as
a MKNOD followed by OPEN.  If it's a MKNOD on a normal file, assume that
the client will probably write to it and set them up with the caps and
client_range to do so without asking us again first.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set layout on files created by MKNOD instead of CREATE
Sage Weil [Sat, 18 Dec 2010 00:28:19 +0000 (16:28 -0800)]
mds: set layout on files created by MKNOD instead of CREATE

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocephx: fix uninitialized value
Sage Weil [Sat, 18 Dec 2010 00:02:45 +0000 (16:02 -0800)]
cephx: fix uninitialized value

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: make OpSequencer::flush() work for writeahead journaling items
Sage Weil [Fri, 17 Dec 2010 23:12:17 +0000 (15:12 -0800)]
filestore: make OpSequencer::flush() work for writeahead journaling items

It was only waiting for items in the op_queue to complete.  The goal is
to wait for anything we've called queue_transactions(&osr,...) on. If we
do writeahead journaling, though, there might be new ops that are still
journaling but not yet submitted to the fs that are missed.

This adds a journal queue to the OpSequencer, and uses it in the writeahead
case only.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: build_initial_monmap: fix mismatched alloc
Colin Patrick McCabe [Fri, 17 Dec 2010 23:31:41 +0000 (15:31 -0800)]
mon: build_initial_monmap: fix mismatched alloc

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: cleanups
Colin Patrick McCabe [Fri, 17 Dec 2010 23:06:40 +0000 (15:06 -0800)]
common: cleanups

common_init: avoid (mismatched) heap allocation

ConfFile::_parse: avoid memory leak on error path

ConfFile: NULL filename if not set, rather than leaving it undefined

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: PG::choose_acting: fix major iterator mistake
Colin Patrick McCabe [Fri, 17 Dec 2010 23:05:56 +0000 (15:05 -0800)]
osd: PG::choose_acting: fix major iterator mistake

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agorgw: fix fd leak on error path
Colin Patrick McCabe [Fri, 17 Dec 2010 23:05:36 +0000 (15:05 -0800)]
rgw: fix fd leak on error path

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agohadoop: fix a bunch of mismatched allocations
Colin Patrick McCabe [Fri, 17 Dec 2010 23:04:17 +0000 (15:04 -0800)]
hadoop: fix a bunch of mismatched allocations

Using array new means you need array delete.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoauth: avoid mismatched allocation
Colin Patrick McCabe [Fri, 17 Dec 2010 23:03:37 +0000 (15:03 -0800)]
auth: avoid mismatched allocation

Can't pair strdup and free.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: flush pg writes to disk before starting scrub scan
Sage Weil [Fri, 17 Dec 2010 20:54:38 +0000 (12:54 -0800)]
osd: flush pg writes to disk before starting scrub scan

This avoids two races:
 - we just completed recovery by pushing objects to the replica, and the
   replica starts scanning before those writes reach the fs.
 - we just trimmed to something after last_update_applied.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofilestore: add per-sequencer flush operation
Sage Weil [Fri, 17 Dec 2010 20:51:19 +0000 (12:51 -0800)]
filestore: add per-sequencer flush operation

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: debug scan_list and scrub a bit better
Sage Weil [Fri, 17 Dec 2010 20:51:03 +0000 (12:51 -0800)]
osd: debug scan_list and scrub a bit better

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: refactor _get_pool / _put_pool a little bit
Colin Patrick McCabe [Fri, 17 Dec 2010 20:28:23 +0000 (12:28 -0800)]
osd: refactor _get_pool / _put_pool a little bit

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: OSD::_lookup_pool: avoid double lookup
Colin Patrick McCabe [Fri, 17 Dec 2010 20:00:13 +0000 (12:00 -0800)]
osd: OSD::_lookup_pool: avoid double lookup

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agotest: create test_pools.sh
Colin Patrick McCabe [Fri, 17 Dec 2010 19:52:01 +0000 (11:52 -0800)]
test: create test_pools.sh

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: clear INCONSISTENT if scrub detects no errors
Sage Weil [Fri, 17 Dec 2010 18:59:45 +0000 (10:59 -0800)]
osd: clear INCONSISTENT if scrub detects no errors

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: add assert that we're replica
Sage Weil [Fri, 17 Dec 2010 18:36:34 +0000 (10:36 -0800)]
osd: add assert that we're replica

ar Fred saw a crash where we got into merge_log as a stray, which really
shouldn't ever happen!  See #590.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agodebian: don't strip rados classes
Laszlo Boszormenyi [Fri, 17 Dec 2010 16:31:00 +0000 (08:31 -0800)]
debian: don't strip rados classes

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agodebian: rename ceph.lintian -> ceph.lintian-overrides
Laszlo Boszormenyi [Fri, 17 Dec 2010 16:30:03 +0000 (08:30 -0800)]
debian: rename ceph.lintian -> ceph.lintian-overrides

Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@newdream.net>