Commit Graph

12367 Commits

Author SHA1 Message Date
Colin Patrick McCabe
8adaa0478a 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>
2011-01-05 15:53:36 -08:00
Colin Patrick McCabe
bba356b866 rgw_admin: call common_set_defaults as non-daemon
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-05 15:29:48 -08:00
Sage Weil
f377168905 debian: update scripts to build ubuntu (maverick, lucid) packages too
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-05 12:40:55 -08:00
Sage Weil
6dce7b0f07 mds: move flock types into separate header
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-05 09:33:37 -08:00
Wido den Hollander
4b2ba49e28 rados tool: Remove duplicate line in usage
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-05 09:18:36 -08:00
Colin Patrick McCabe
065e2acbd4 common: generic_dout needs to take the dout mutex
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-04 18:25:56 -08:00
Yehuda Sadeh
c46d8d5dac osd: add pgls filtering by parent ino 2011-01-04 17:18:14 -08:00
Colin Patrick McCabe
edd5686e24 common: handle_fatal_signal: print threadid in hex
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-04 17:02:48 -08:00
Sage Weil
4a1c1b4a6a 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>
2011-01-04 16:14:43 -08:00
Sage Weil
3d04d96b5c 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>
2011-01-04 15:27:16 -08:00
Sage Weil
a5f9a36c98 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>
2011-01-04 15:27:16 -08:00
Sage Weil
4c53c72627 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>
2011-01-04 15:27:16 -08:00
Sage Weil
f66d472845 frag: const cleanup fragset_t
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-04 15:27:16 -08:00
Yehuda Sadeh
1b0bb7a1e9 osd, objecter: pgls filtering option 2011-01-04 15:01:16 -08:00
Sage Weil
8f104243f8 osd: set default pg_bits higher; pgp_bits to old value
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-04 11:29:19 -08:00
Sage Weil
aafb79c773 assert: print thread id in hex
Signed-off-by: Sage Weil <sage@newdream.net>
2011-01-04 10:50:06 -08:00
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