Commit Graph

12337 Commits

Author SHA1 Message Date
Yehuda Sadeh
266cc6c6e0 rbd: add watch option for rbd tool 2011-01-03 11:37:53 -08:00
Sage Weil
7e83b570e4 Merge branch 'testing' into unstable
Conflicts:
	configure.ac
2011-01-03 10:24:47 -08:00
Sage Weil
56861bd506 Merge remote branch 'origin/keyring_cleanup' into unstable 2011-01-03 10:24:08 -08:00
Sage Weil
1d5a69ff82 debian: try to update pbuild env as needed
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-03 10:15:16 -08:00
Samuel Just
9ad05cf7ff 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>
2011-01-03 10:14:52 -08:00
Colin Patrick McCabe
924355df23 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>
2011-01-02 12:52:10 -08:00
Colin Patrick McCabe
13e8507b73 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>
2011-01-02 12:19:35 -08:00
Colin Patrick McCabe
789cb9a403 osdmaptool: better error handling
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 15:15:39 -08:00
Colin Patrick McCabe
e2c0f40482 common: bufferlist: handle EINTR, check close rval
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 15:12:12 -08:00
Colin Patrick McCabe
51462d6b83 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>
2010-12-30 14:50:06 -08:00
Colin Patrick McCabe
c846615d8b qa: rbd: small optimization to script
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 10:38:36 -08:00
Colin Patrick McCabe
634cca9530 qa: rbd: Update rbd test to use the new rbd sysfs
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 10:38:36 -08:00
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
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>
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