]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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>
14 years agologging: eliminate out-of-range dout calls
Colin Patrick McCabe [Fri, 17 Dec 2010 07:55:08 +0000 (23:55 -0800)]
logging: eliminate out-of-range dout calls

Eliminate calls to dout that use non-existent log levels, like negative
levels less than -1. Also trigger a compiler error in the future if they
get re-added. -1 is the highest priority dout level; putting lower
priorities into the output buffer will just cause errors.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocommon: more cerr -> derr conversions
Colin Patrick McCabe [Fri, 17 Dec 2010 00:25:29 +0000 (16:25 -0800)]
common: more cerr -> derr conversions

cmds: cerr -> derr

DoutStreambuf: primitive_log: just write to the stdout fd rather than cerr

assert: don't write output to stderr manually (dout will do that
automatically). Do _dout_lock.Lock rather than TryLock. Failing to wait
for the lock is potentially buggy and provides no benefit in that code.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agogceph,ceph: replace cerr->derr
Colin Patrick McCabe [Thu, 16 Dec 2010 22:57:35 +0000 (14:57 -0800)]
gceph,ceph: replace cerr->derr

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocosd: replace cerr with derr
Colin Patrick McCabe [Thu, 16 Dec 2010 18:53:58 +0000 (10:53 -0800)]
cosd: replace cerr with derr

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoPG.cc:
Samuel Just [Thu, 16 Dec 2010 21:06:43 +0000 (13:06 -0800)]
PG.cc:
sub_op_scrub must set finalizing_scrub on the replica
before waiting for last_update_applied to catch up to
info.last_update.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoosd: FileJournal: use derr
Colin Patrick McCabe [Thu, 16 Dec 2010 18:30:17 +0000 (10:30 -0800)]
osd: FileJournal: use derr

Use derr to announce errors in FileJournal.

Handle EINTR where necessary (still haven't fixed
read/write/pread/pwrite uses).

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agologging: re-introduce derr
Colin Patrick McCabe [Thu, 16 Dec 2010 00:29:37 +0000 (16:29 -0800)]
logging: re-introduce derr

Re-introduce derr as a special log level (level -1) which will show up
in all logs, and on stderr. These messages are the only messages which
will show up on stderr.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoReplicatedPG.cc:
Samuel Just [Wed, 15 Dec 2010 20:57:10 +0000 (12:57 -0800)]
ReplicatedPG.cc:
_scrub must set head when it encounters a head snap
curclone counts down, not up

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
14 years agoosd: send notify message only to unexpired watchers
Yehuda Sadeh [Thu, 16 Dec 2010 00:33:02 +0000 (16:33 -0800)]
osd: send notify message only to unexpired watchers

14 years agoosd: timed out watcher is added to unconnected map
Yehuda Sadeh [Wed, 15 Dec 2010 23:37:32 +0000 (15:37 -0800)]
osd: timed out watcher is added to unconnected map

14 years agologging: close file when reloading global config
Colin Patrick McCabe [Thu, 16 Dec 2010 00:20:53 +0000 (16:20 -0800)]
logging: close file when reloading global config

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: fix watch timer, locking
Yehuda Sadeh [Wed, 15 Dec 2010 23:22:32 +0000 (15:22 -0800)]
osd: fix watch timer, locking

14 years agofilestore: detect final version of async ioctl SNAP_CREATE_V2
Sage Weil [Sat, 11 Dec 2010 00:26:06 +0000 (16:26 -0800)]
filestore: detect final version of async ioctl SNAP_CREATE_V2

Li's revised interface for the async snap ioctl is more flexible.  Update
the ioctl call sites and detection code accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: Save straydn in mdr so it's consistent across retry attempts.
Greg Farnum [Wed, 15 Dec 2010 18:56:18 +0000 (10:56 -0800)]
mds: Save straydn in mdr so it's consistent across retry attempts.

Otherwise, we could choose new stray dirs and fail to get all
the locks we needed (while leaving old strays locked forever!).

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
14 years agotools: don't start msgr thread before daemonize
Colin Patrick McCabe [Wed, 15 Dec 2010 20:28:27 +0000 (12:28 -0800)]
tools: don't start msgr thread before daemonize

Calling messenger->add_dispatcher_head() has the side-effect of starting
the messenger thread. So we must not do it before calling
messenger->start(), which sometimes calls daemonize.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoMerge branch 'objecter' into unstable
Sage Weil [Wed, 15 Dec 2010 19:02:19 +0000 (11:02 -0800)]
Merge branch 'objecter' into unstable

14 years agoobjecter: check for pg mapping changes in each incremental; refactor misc resubmissio...
Sage Weil [Wed, 15 Dec 2010 19:01:25 +0000 (11:01 -0800)]
objecter: check for pg mapping changes in each incremental; refactor misc resubmission code

We need to detect when a pg mapping changes but the primary stays the same.
That means we can't just look at the final osdmap and see what is says; we
have to look at each intervening map and check each request to see if
something switched and the osd has thrown our request out.

Also refactor and clean up the linger vs normal op stuff some more.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: add reopen_session helper
Sage Weil [Wed, 15 Dec 2010 02:04:03 +0000 (18:04 -0800)]
objecter: add reopen_session helper

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: cleanup: rename op maps
Sage Weil [Wed, 15 Dec 2010 00:18:55 +0000 (16:18 -0800)]
objecter: cleanup: rename op maps

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobjecter: track pending requests by osd, not pg
Sage Weil [Wed, 15 Dec 2010 00:15:04 +0000 (16:15 -0800)]
objecter: track pending requests by osd, not pg

This is a big cleanup.  Also
 - switch to keeping per-osd Connection *'s
 - make requests time out independently (not very efficiently yet)

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix inode ancestor attr encoding
Sage Weil [Tue, 14 Dec 2010 23:13:16 +0000 (15:13 -0800)]
mds: fix inode ancestor attr encoding

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomsgr: mark down by Connection*
Sage Weil [Tue, 14 Dec 2010 22:28:26 +0000 (14:28 -0800)]
msgr: mark down by Connection*

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoautomake: ignore rmdir errors during uninstall
Colin Patrick McCabe [Wed, 15 Dec 2010 18:15:49 +0000 (10:15 -0800)]
automake: ignore rmdir errors during uninstall

We don't want to fail "make distcheck" for a silly reason.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agoosd: send pending notification for reconnected watcher
Yehuda Sadeh [Wed, 15 Dec 2010 01:00:49 +0000 (17:00 -0800)]
osd: send pending notification for reconnected watcher

14 years agoautomake: add osd/Watch.h to noinst_HEADERS
Colin Patrick McCabe [Wed, 15 Dec 2010 00:28:39 +0000 (16:28 -0800)]
automake: add osd/Watch.h to noinst_HEADERS

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agomon: trim pgmap less aggressively
Sage Weil [Tue, 14 Dec 2010 17:26:12 +0000 (09:26 -0800)]
mon: trim pgmap less aggressively

This will make observer crashes due to missed states (#648) much harder to
hit.  Eventually the pgmap state trim problem will go away when the
monitor/paxos code is restructured (#647).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agocrypto: catch cryptopp decrypt/encrypt exceptions
Yehuda Sadeh [Tue, 14 Dec 2010 18:51:08 +0000 (10:51 -0800)]
crypto: catch cryptopp decrypt/encrypt exceptions

14 years agologging: use Mutex::Locker
Colin Patrick McCabe [Tue, 14 Dec 2010 14:56:27 +0000 (06:56 -0800)]
logging: use Mutex::Locker

Use Mutex::Locker to make logging exception-safe. That is, if you are
doing "dout() << foo() << dendl;" and foo throws an exception, the dout
mutex will not be left in a locked state.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agologger: Fix DoutStreambuf::create_rank_symlink
Colin Patrick McCabe [Tue, 14 Dec 2010 14:20:23 +0000 (06:20 -0800)]
logger: Fix DoutStreambuf::create_rank_symlink

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
14 years agocephtool: rename tools files
Colin Patrick McCabe [Tue, 14 Dec 2010 12:59:05 +0000 (04:59 -0800)]
cephtool: rename tools files

Rename tools files to be more consistent. For example, the main()
function for ./ceph should be in ceph.cc.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>