Commit Graph

12351 Commits

Author SHA1 Message Date
Sage Weil
3d4e1d9956 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>
2011-01-04 10:20:18 -08:00
Sage Weil
062c4cc820 vstart.sh: specify keyring in ceph.conf
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-04 10:18:29 -08:00
Sage Weil
d257810774 remove ancient uofs.h
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-04 09:16:52 -08:00
Matthew Roy
9befd1eacd mkcephfs: Clarified numosd message
Signed-off-by: Matthew Roy <matthew@royhousehold.net>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-04 09:09:54 -08:00
Colin Patrick McCabe
16c603b26f 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>
2011-01-03 17:44:09 -08:00
Colin Patrick McCabe
5dc66244e1 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>
2011-01-03 16:14:24 -08:00
Sage Weil
aad9ffec26 Merge branch 'testing' into unstable 2011-01-03 15:15:26 -08:00
Sage Weil
b40e7dc0f7 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>
2011-01-03 14:33:03 -08:00
Greg Farnum
20593b0d38 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>
2011-01-03 14:15:24 -08:00
Sage Weil
4efa300601 filestore: assert on out of order journal pipeline submissions
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-03 13:14:49 -08:00
Sage Weil
259c509a89 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>
2011-01-03 13:14:13 -08:00
Colin Patrick McCabe
62e4cdea62 common: print thread ID in sig handlers and assert
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-03 12:22:56 -08:00
Sage Weil
15dcc65199 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>
2011-01-03 11:50:53 -08:00
Yehuda Sadeh
266cc6c6e0 rbd: add watch option for rbd tool 2011-01-03 11:37:53 -08:00
Colin Patrick McCabe
6cdfa30455 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>
2011-01-03 10:30:56 -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
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