Commit Graph

11745 Commits

Author SHA1 Message Date
Colin Patrick McCabe 62716aa7c9 PGMonitor::update_from_paxos: check for bad input
Be more robust against bad data coming in from the network.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-04 16:22:21 -07:00
Colin Patrick McCabe 8f3672dc48 Replace sprintf with snprintf
Replace sprintf with snprintf. This is especially critical when the
format string includes "%s".

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-04 14:33:48 -07:00
Colin Patrick McCabe 56179d12f8 start_profiler/enable_profiler_options:fix memleak
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-04 14:26:08 -07:00
Colin Patrick McCabe e6a751bda5 Set HEAP_PROFILE_INUSE_INTERVAL based on conf
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-04 14:11:41 -07:00
Colin Patrick McCabe 8c8bfdb3e2 CInode::make_path_string: don't coerce ino
CInode::make_path_string: don't coerce the inode number to 32-bits.
Everyone else is treating it as 64 bits; this function should too.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-04 14:09:32 -07:00
Greg Farnum 4df92adea4 Merge branch 'dumpjournal' into unstable 2010-11-04 11:58:30 -07:00
Greg Farnum d3c2b9cb2b cmds: Include journal dumper functionality. 2010-11-04 11:41:26 -07:00
Greg Farnum e0a5de25c1 dumper: Add new Dumper class.
This lets you dump an MDS journal to a file.
2010-11-04 11:41:21 -07:00
Greg Farnum 86d6e51e8b objecter: add new wait_for_osd_map function. 2010-11-04 11:28:52 -07:00
Sage Weil 8a41d096c7 osd: clean up active <-> booting state transitions
Among other things, get rid of the 'wrongly marked down' log message on
normal startup.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-04 11:13:31 -07:00
Colin Patrick McCabe f917df7942 TestEncoding: count number of ctor invocations
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-04 10:24:52 -07:00
Sage Weil 0d1bfe06b3 client: print useful max_size waiting message
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 16:41:29 -07:00
Sage Weil fc9059e527 Merge branch 'mix_stale' into unstable 2010-11-03 16:40:19 -07:00
Sage Weil 4f24fcbc8a debian: add gtk build-depends
For ceph -g.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 16:40:13 -07:00
Sage Weil d0c29d7d2c mds: add 'mds verify scatter' and re-add some scatter asserts
Check on ifile and inest gather that stats match single-frag dirs.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 14:47:32 -07:00
Sage Weil fd57f4de21 mds: fix put_xlock() assert for slave masters
If we are a master of a slave, the state will be LOCK.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 14:47:32 -07:00
Sage Weil a98812f913 mds: rename 'mix stale' => 'mix_stale'
For unambigous debug output

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 14:47:31 -07:00
Sage Weil 4d669c8cfc mds: request unscatter when MIX_STALE on replica
This means implementing REQUNSCATTER.

Eventually this should use TEMPSYNC, but that isn't fully implemented yet.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 14:47:31 -07:00
Sage Weil 8b9342c7b1 mds: disable tempsync
Tempsync is not implemented in the filelock state machine.  Never use it,
at lesat for now!

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 14:47:31 -07:00
Sage Weil 563a9ba669 mds: finish_scatter_update on auth dirfrags too
We can update the dirfrag accounted on auth dirfrags at scatter time too.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 14:47:31 -07:00
Sage Weil 0e079bc85d mds: use helper for scatter dirfrag update; use on local dirfrags
Any time we scatter is an opportunity to update the dirfrag with the
accounted scatter stat if it is out of date.  We should use that
opportunity even when the dirfrag is on the same node as the inode (i.e.,
not just through decode_lock_state).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 13:08:06 -07:00
Colin Patrick McCabe 77ec378d14 Add the ps-ceph.sh tool
This allows you to see at a glance which ceph programs and tools you
have running.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-03 12:52:49 -07:00
Colin Patrick McCabe 4e586dd073 encoding.h: fix compiler warning
Fix a compiler warning about an uninitialized variable. Basically, we
used to insert uninitialized values into a std::multimap and then fix
them later. Rather than doing that, just insert the value we want
directly into the map.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-03 12:19:05 -07:00
Colin Patrick McCabe c98b0268fd TestEncoding: add templated encode-then-decode fn
TestEncoding: add a templated encode-then-decode fn that can be used to
test encoding followed by decoding of any type. Test encoding and
decoding of a std::multimap.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-03 12:19:03 -07:00
Colin Patrick McCabe 84e2da8dd4 Create TestEncoding to test serialization code
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-03 12:18:56 -07:00
Sage Weil 60c59aed15 mds: add some scatterlock notes
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 11:07:40 -07:00
Sage Weil 0dc75a94ce ceph: remove bad assert for old frag stat
It's normal for old fragstat info to be mismatched (stat !=
accounted_stat).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 11:03:37 -07:00
Sage Weil 3413518534 mds: match conditions in finish_scatter_gather_update_accounted
This needs to match the frozen check in finish_scatter_gather_update.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 10:51:42 -07:00
Sage Weil 33268e20e9 mds: handle MIX_STALE on auth too
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 10:12:35 -07:00
Sage Weil 14f4d22cde mds: scatter_info_t ancestor for nest_info_t and frag_info_t
This will facilitate using generic code for the inest and ifile
scatterlocks.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 09:51:15 -07:00
Sage Weil cbacc1d490 mds: only mark auth dirfrags stale in start_scatter
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-03 09:47:23 -07:00
Sage Weil 44574e86bb mds: mark scatterlock stale if any auth dirfrags appear stale
The auth needs to move to MIX_STALE for the same reasons a replica does:
if, on scatter, any dirfrags have an old accounted_*stat, the lock needs to
be marked stale (or updated... TODO!).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 21:51:15 -07:00
Sage Weil 4a0f731262 mds: do not update accounted_*stat if auth and frozen
The auth can't update a frozen dirfrag for the same reason a replica
can't.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 21:49:45 -07:00
Sage Weil 9d1984e803 mds: mark scatterlock stale if dir is frozen, not inode
It's the dir we're auth for and that might potentially be frozen.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 16:28:15 -07:00
Sage Weil 4838016dbc Merge branch 'unstable' into mix_stale 2010-11-02 16:25:37 -07:00
Sage Weil e304a2451a rados: benchmark using unique object names
Include hostname and pid in object name, so that instances running on
different hosts write to unique objects.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 15:26:14 -07:00
Colin Patrick McCabe 38f96c658d debian packaging: set --sbindir=/sbin
We want mkcephfs and mount.ceph to be under /sbin.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-02 14:37:56 -07:00
Sage Weil 68f7fedea1 config: fix sigsegv handler
Fixed this with sigabrt, forgot to do sigsegv too.

See 7a688a9f99.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 13:00:26 -07:00
Sage Weil 235aa1c31f filestore: disable 'filestore btrfs snap' when SNAP_DESTROY is missing
We want to enable the new snap stuff by default.  But we also want to work
with the default configuration on old kernels.

The only downside here is that someone might explicitly enable it, only to
have it disabled on started because their kernel is old.  They'll get a
bright yellow warning in that case, at least.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 11:10:38 -07:00
Wido den Hollander 4cfd198cd9 Makefile.am: include the libcrush headers when installing
Signed-off-by: Wido den Hollander <wido@widodh.nl>
2010-11-02 10:43:18 -07:00
Greg Farnum abb0b6d966 Merge branch 'testing' into unstable 2010-11-02 10:10:24 -07:00
Greg Farnum 5310ab6e10 uclient: Warn on truncate_[size|seq] changes for non-file inodes. 2010-11-02 10:09:41 -07:00
Greg Farnum 630db2a9ca mds: Init system CInodes to have a truncate_size of -1.
This should help with bug #518.
2010-11-02 10:09:33 -07:00
Sage Weil 524c890368 client: match initialization with mds
(see Server::prepare_new_inode())

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 10:09:22 -07:00
Sage Weil 20e8a4519d client: only do truncate on regular files
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-02 10:09:15 -07:00
Wido den Hollander 905ff76352 debian: add pkg-config as build-depends
Signed-off-by: Wido den Hollander <wido@widodh.nl>
2010-11-02 09:45:14 -07:00
Sage Weil bc9bc4cb28 init-ceph: make lockfile dir configuration (redhat)
Reported-by: Ed Burnette <ed.burnette@sas.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-01 22:09:56 -07:00
Colin Patrick McCabe 85ba4f2dbb object.h: const cleanup
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-01 19:31:11 -07:00
Sage Weil 3d85a7b9f0 logrotate: separate rule for stat/*.log
Logrotate seems to ignore the entire rule if any part of the file list
is not found.  This happens on nodes with only monitors.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-01 10:04:15 -07:00
Colin Patrick McCabe 49153c2cb4 osd::PG: Update PG comments
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-01 09:53:18 -07:00