Commit Graph

12525 Commits

Author SHA1 Message Date
Colin Patrick McCabe
323ac1a72d qa: rbd: disable automatic keyring discovery
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 10:38:36 -08:00
Colin Patrick McCabe
adbfd95ce4 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>
2010-12-30 10:38:36 -08:00
Colin Patrick McCabe
e1a1e1e6a6 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>
2010-12-29 18:33:08 -08:00
Colin Patrick McCabe
27cba78148 common: str_list: const cleanup
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-29 17:58:50 -08:00
Yehuda Sadeh
7e206dfec0 osd, librados: configurable notify timeout 2010-12-29 17:02:06 -08:00
Yehuda Sadeh
a4223d4f02 osd: watch request doesn't use version
also fix watch-notify to send the current user_version
2010-12-29 17:02:06 -08:00
Colin Patrick McCabe
de8f021204 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>
2010-12-29 15:36:22 -08:00
Colin Patrick McCabe
ace90971df makefile: ignore mkdir -p errors in install
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-29 15:33:50 -08:00
Colin Patrick McCabe
fddbd903d5 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>
2010-12-29 14:34:17 -08:00
Colin Patrick McCabe
bbd0ce2589 logging: clean up some error handling
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-29 11:13:56 -08:00
Colin Patrick McCabe
22828b9a4e 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>
2010-12-28 17:07:07 -08:00
Colin Patrick McCabe
b3bb8922d0 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>
2010-12-27 18:04:17 -08:00
Colin Patrick McCabe
cbeddc2376 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>
2010-12-27 17:51:09 -08:00
Colin Patrick McCabe
ce81e6a5c1 signals: test infinite_recursion
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-27 17:38:52 -08:00
Colin Patrick McCabe
ff6e4d4dec common: make generic_usage a little prettier
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-27 17:34:51 -08:00
Colin Patrick McCabe
247b11b7b7 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>
2010-12-27 17:32:37 -08:00
Colin Patrick McCabe
a410360a91 test: add TestSignalHandlers
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-27 13:34:01 -08:00
Samuel Just
532522da51 rgw_admin: fix compile error in usage
generic_usage was changed in c4b5c33b12
but this use was not updated.  Should call generic_client_usage.
2010-12-21 13:56:35 -08:00
Greg Farnum
61f964c60d 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>
2010-12-21 10:48:35 -08:00
Sage Weil
180a417603 v0.24 2010-12-20 15:58:09 -08:00
Sage Weil
69940e2717 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>
2010-12-20 13:22:49 -08:00
Greg Farnum
0e510dbe8f objectcacher: Fix erroneous reference to "lock" with "flock."
This looks to be an old bug introduced years ago in
267679abc7, 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>
2010-12-20 11:34:46 -08:00
Sage Weil
b04b6f4823 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>
2010-12-17 21:02:58 -08:00
Sage Weil
df7e3ffd0b 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>
2010-12-17 16:52:05 -08:00
Sage Weil
7d33830af5 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>
2010-12-17 16:52:05 -08:00
Sage Weil
d64616b95b mds: set layout on files created by MKNOD instead of CREATE
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:52:05 -08:00
Sage Weil
7df469368d cephx: fix uninitialized value
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 16:02:45 -08:00
Sage Weil
3a235b0f21 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>
2010-12-17 15:30:39 -08:00
Colin Patrick McCabe
285f351b72 mon: build_initial_monmap: fix mismatched alloc
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:31:41 -08:00
Colin Patrick McCabe
caa4609387 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>
2010-12-17 15:26:37 -08:00
Colin Patrick McCabe
28bcf0bc98 osd: PG::choose_acting: fix major iterator mistake
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Colin Patrick McCabe
f7dc1a9239 rgw: fix fd leak on error path
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Colin Patrick McCabe
795811d66a hadoop: fix a bunch of mismatched allocations
Using array new means you need array delete.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Colin Patrick McCabe
2f916086a6 auth: avoid mismatched allocation
Can't pair strdup and free.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 15:14:53 -08:00
Sage Weil
3c7d30f1ac 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>
2010-12-17 14:15:35 -08:00
Sage Weil
5184db4424 filestore: add per-sequencer flush operation
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 14:15:35 -08:00
Sage Weil
2fb60daf68 osd: debug scan_list and scrub a bit better
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 12:51:03 -08:00
Colin Patrick McCabe
c3a24fc5d3 osd: refactor _get_pool / _put_pool a little bit
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 12:28:23 -08:00
Colin Patrick McCabe
39aff22128 osd: OSD::_lookup_pool: avoid double lookup
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 12:00:13 -08:00
Colin Patrick McCabe
bf4529b908 test: create test_pools.sh
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-17 11:52:01 -08:00
Sage Weil
1cfad2ea77 osd: clear INCONSISTENT if scrub detects no errors
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 10:59:45 -08:00
Sage Weil
b190875548 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>
2010-12-17 10:36:34 -08:00
Laszlo Boszormenyi
1e291fc9ef debian: don't strip rados classes
Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 08:31:00 -08:00
Laszlo Boszormenyi
9c173bb400 debian: rename ceph.lintian -> ceph.lintian-overrides
Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-17 08:30:43 -08:00
Colin Patrick McCabe
b2746c94d0 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>
2010-12-17 00:00:25 -08:00
Colin Patrick McCabe
c4b5c33b12 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>
2010-12-16 16:25:29 -08:00
Colin Patrick McCabe
30f752cd32 gceph,ceph: replace cerr->derr
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 14:57:35 -08:00
Colin Patrick McCabe
c76379fd56 cosd: replace cerr with derr
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 14:05:50 -08:00
Samuel Just
73669d87e6 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>
2010-12-16 13:06:43 -08:00
Colin Patrick McCabe
4644247ce4 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>
2010-12-16 10:32:47 -08:00