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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>