Commit Graph

12050 Commits

Author SHA1 Message Date
Colin Patrick McCabe
b15a97c71e test_lost: add lost1 test
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:48:47 -08:00
Colin Patrick McCabe
ad4e5f36d4 osd: ReplicatedPG::do_op: error on read-from-lost
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:48:47 -08:00
Colin Patrick McCabe
136dfdeb70 osd: don't mark objs as lost unless we're active
We don't have enough information to mark objects as lost until we
activate the PG. might_have_unfound isn't even built until PG::activate.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:47:09 -08:00
Colin Patrick McCabe
c0e60afea5 test: dump_osd_store: sort dump output
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:43:44 -08:00
Colin Patrick McCabe
e555899cd3 osd: active replicas process logs from primaries
In _process_pg_info, if the primary sends us a PG::Log, a replica should
merge that log into its own.

mark_all_unfound_as_lost / share_pg_log: don't send the whole PG::Log.
Just send the new entries that were just added when marking the objects
as lost.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:43:44 -08:00
Colin Patrick McCabe
de09422497 osd: object_info_t: add lost field
We can now permanently mark objects as lost by setting the lost bit in
their object_info_t. Rev the object_info_t struct.

get_object_context: re-arrange this so that we're always setting the
lost bit. Also avoid some unecessary steps.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:43:44 -08:00
Colin Patrick McCabe
80f3ea10f5 Add ./ceph dump pg debug degraded_pgs_exist
./ceph dump pg debug degraded_pgs_exist returns TRUE if some pgs are
degraded; false otherwise.

tests: move start_recovery into test_common.sh.
Create recovery1 test.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:43:44 -08:00
Colin Patrick McCabe
fb4734be56 (re)add mechanism for marking objects as lost
In activate_map, we now mark objects that we know are unfindable as
lost. This relies on the might_have_unfound set introduced earlier.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-30 15:43:44 -08:00
Colin Patrick McCabe
0bcdc84a78 osd: osd_types.h: const cleanup
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 16:41:59 -08:00
Colin Patrick McCabe
7ee50addba osd: don't try to load a PG in a nonexistent pool
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 16:40:46 -08:00
Colin Patrick McCabe
c9f864a084 osd: PG::trim: fix inverted conditional in assert
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 15:52:06 -08:00
Colin Patrick McCabe
b2bcf4b3c2 common: prevent infinite recursion on SIGSEGV
Install SIGSEGV / SIGABORT handlers with sigaction using SA_RESETHAND.
This will ensure that if the signal handler itself encounters another
fault, the default signal handler (usually dump core) will be what is
used. Also, flush the log before dumping core.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 15:12:11 -08:00
Colin Patrick McCabe
851918134b osd: Create pg_split test
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 14:12:43 -08:00
Greg Farnum
fb60e11472 logger: Fix a crash when the MDS shuts down cleanly.
We weren't holding the lock on the logger_timer before calling shutdown.
2010-11-29 13:35:23 -08:00
Greg Farnum
b4db4100e3 Timer: add some asserts to catch certain errors. 2010-11-29 13:35:16 -08:00
Colin Patrick McCabe
463d624d38 Makefile: Add --as-needed to LDFLAGS
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 12:18:47 -08:00
Colin Patrick McCabe
e0b927b28f osd: PG::trim: add assert
Assert that we're not trimming the PG log past last_complete.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 11:41:51 -08:00
Colin Patrick McCabe
756918be3b osd: _process_pg_info: add assert for replicas
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-29 09:48:26 -08:00
Colin Patrick McCabe
3ab6009183 osd: dump_missing: also dump missing_loc
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-24 23:36:14 -08:00
Colin Patrick McCabe
da087e47c2 osd: discover_all_missing fix
Don't request information from an OSD unless it is up and part of the
might_have_unfound set. Add more logging.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-24 23:35:59 -08:00
Colin Patrick McCabe
d6e8e8d15d gui: some cleanup
Rather than vectors of pointers, use vectors of NodeInfo structures.
This avoids the problem of freeing the NodeInfo structures.

GuiMonitor::gen_node_info_from_icons: initialize status.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 18:03:18 -08:00
Colin Patrick McCabe
2f13dd8ed9 gui: more reindenting
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 15:39:53 -08:00
Colin Patrick McCabe
66a78c23b7 gui: reindent a bunch of code
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 15:37:15 -08:00
Sage Weil
5ed06ffc7d client: remove inode from flush_caps list when auth_cap changes
Avoid confusing other code (e.g. kick_flushing_caps) by staying on the mds
flushign_caps list when we don't even have an auth_cap with them anymore.
We'll need to re-flush to a new MDS later.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:59:09 -08:00
Sage Weil
4041bf0dda mds: fix set_state_rejoin auth_pin check
We carry an auth pin IFF !stable AND auth.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:59:09 -08:00
Sage Weil
e97eae1518 init-ceph: tolerate failure in cleanallogs
Otherwise /var/log/ceph/stat makes rm -f error out and we fail.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
5498c46780 osd: fix recover_replicas() unfound check
missing_loc.count(soid) == 0 only means unfound if it's not missing on the
primary.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
5452dae6f9 osd: recover_primary() until primary has all found objects
The logic in that if was effectively reversed.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
7ea7a43584 osd: only discover_all_missing if unfound
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
671b1c09fa osd: add get_num_unfound() helper
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
413ecb0bcf osd: only search_for_missing if there are unfound objects
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
36f703e1e7 osd: removing unused variable, fix warning
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Sage Weil
285cc94674 osd: fix is_all_uptodate()
This should only return true when recovery is done, i.e., no more missing
objects.  Nothing to do with unfound.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 13:52:22 -08:00
Colin Patrick McCabe
55570baf03 osd: fix PG::is_all_uptodate
In PG::is_all_uptodate, don't try to look for peer_missing[osd->whoami].
The primary keeps that in PG::missing!

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 13:52:21 -08:00
Colin Patrick McCabe
c0c301d5d8 osd: PG::read_log: don't be clever with lost xattr
Formerly, we had a special case in read_log for dealing with objects
whose objects were present on the disk, but not their attributes. This
conflicts with our plans to mark objects as lost by putting a bit in the
object attributes, since without those attributes, we'll never know if
the objects were formerly marked as lost.

This should almost never happen, and if it does, we just handle the
objects as missing in the normal way.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 13:52:21 -08:00
Colin Patrick McCabe
0e15da8d2e Rename peer_summary_requested to peer_backlog_req
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 13:52:21 -08:00
Colin Patrick McCabe
846122866d Build might_have_unfound set at activation
The might_have_unfound set is used by the primary OSD during recovery.
This set tracks the OSDs which might have unfound objects that the
primary OSD needs. As we receive Missing from each OSD in
might_have_unfound, we will remove the OSD from the set.

When might_have_unfound is empty, we will mark objects as LOST if the
latest version of the object resided on an OSD marked as lost.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-23 13:52:21 -08:00
Samuel Just
36c6569c11 monmaptool: Return a non-zero error code and print a useful error
message if unable to read the monmap file.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
2010-11-23 12:26:38 -08:00
Sage Weil
fc212548ae mds: allow for old fs's with stray instead of stray0
New fs's get stray0, but we want to still behave with old ones.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-23 09:43:49 -08:00
Sage Weil
de61991a87 Merge branch 'testing' into unstable
Conflicts:
	configure.ac
2010-11-23 09:37:13 -08:00
Sage Weil
868665d5f2 v0.23.1 2010-11-22 23:02:09 -08:00
Sage Weil
c327c6a206 mon: always use send_reply for auth replies
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-22 22:41:57 -08:00
Sage Weil
61dd4f03e6 mon: simplify send_reply code
No need to specify destination in send_reply, as we always have the request
for reference.

Simplify MRoute constructors (keep the ones we use) for tid and bcast
best-effort case.

Do NOT do a best-effort forward of a reply with a tid specified if the tid
is not in the routed-request map.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-22 22:41:42 -08:00
Colin Patrick McCabe
2c71bd3345 osd: add assert to _process_pg_info
When activating an inactive replica, assert that we are doing so based
on a message from the primary.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-22 17:37:55 -08:00
Colin Patrick McCabe
a70943fded osd: re-indent some code in _process_pg_info
Re-indent the code and add a comment.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-11-22 17:35:12 -08:00
Sage Weil
71369541ab msgr: tolerate 0 bytes from tcp_read_nonblocking
This can happen, I belive when we get a signal or something.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-22 16:12:10 -08:00
Sage Weil
7ec0034b65 init-ceph: fix (and test!) cleanlogs and cleanalllogs
Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-22 16:12:01 -08:00
Sage Weil
7b4a801fec mds: fix rejoin_scour_survivor_replicas inode check
We want to remove replicas that we don't ack, but those don't appear in
the strong_inode map; they're appended to the base_inode bufferlist.  Make
a (temporary) set to track who those are so that we know who to get rid of.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-22 16:03:58 -08:00
Greg Farnum
dd11fe270c types: Allow inodeno_t structs to alias.
This removes a compiler warning that appeared in a gcc upgrade and
is apparently erroneous, about its usage violating strict-aliasing rules
when the + operator is used.
2010-11-22 15:08:15 -08:00
Greg Farnum
8d95b5b61a messenger: init rc to -1, removing compiler warning.
This actually is initialized before all uses, but compilers tend to
have trouble with assignment in if-else branches, and -1 is considered
invalid so there's no danger of refactoring breaking anything.
2010-11-22 15:08:15 -08:00