Commit Graph

18288 Commits

Author SHA1 Message Date
Sage Weil
cd5a8f7e60 ceph.spec.in: add ceph-dencoder
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-21 15:44:55 -08:00
Sage Weil
a6c7f999d0 ceph-dencoder: man page
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-21 15:44:55 -08:00
Sage Weil
e67c0ff0c6 osd: make object_info_t::dump using hobject_t and object_locator_t dumpers
Makes the output more readable.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-21 15:08:26 -08:00
Sage Weil
f7feded073 Merge remote-tracking branch 'gh/wip-dump-stuck-pgs'
Reviewed-by: Sage Weil <sage@newdream.net>
2012-02-21 14:46:00 -08:00
Sage Weil
04c8e01d80 Merge remote-tracking branch 'gh/wip-osd-write'
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-02-21 14:44:44 -08:00
Sage Weil
55a606519b osdmap: dump embedded crush map in Incremental::dump()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-21 14:43:23 -08:00
Sage Weil
cc78fdaaab Merge branch 'wip-crush'
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-02-21 14:39:16 -08:00
Sage Weil
d2335fab5b crush: write CrushWrapper:dump()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-21 14:37:50 -08:00
Sage Weil
27c8a3f4d2 test/rados-api/misc: fix LibRadosMisc.Operate1PP test
It's a mutation, so we get a result of 0 (or error).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-21 13:58:17 -08:00
Sage Weil
174f6b845c osd: refuse to return data payload if request wrote anything
Write operations aren't allowed to return a data payload because
we can't do so reliably. If the client has to resend the request
and it has already been applied, we will return 0 with no
payload.  Non-deterministic behavior is no good.

See #1765.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-21 13:58:17 -08:00
Sage Weil
270bb5cfce Merge branch 'wip-osdmap'
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-02-21 13:51:27 -08:00
Sage Weil
7cafa255c5 osdmap: dump fullmap from dump()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-21 13:50:34 -08:00
Sage Weil
80d86306f9 Merge branch 'wip-1821'
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-02-21 13:43:36 -08:00
Yehuda Sadeh
0e4367aaac rgw: accepted access key chars should be url safe
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-02-21 12:18:49 -08:00
Sage Weil
9927671b3d Makefile: fix misplaced unit tests
These weren't run on make check because they were defined in the wrong
spot.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 16:03:46 -08:00
Sage Weil
1ff75684eb hobject_t: remove unused back_up_to_bounding_key()
This was a path not taken in the backfill code.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 16:03:39 -08:00
Sage Weil
4d3de03811 osd: sched_scrub() outside of map_lock
Inside sched_scrub() we call _lookup_lock_pg(), which takes
map_lock.get_read().  That's technically okay because RWLock read side is
recursive, but lockdep doesn't know that, and we don't need map_lock
because we hold osd_lock.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 14:41:28 -08:00
Sage Weil
0b7f6e397c global: resurrect lockdep
Add 'lockdep' config option, and initialize g_lockdep from that in
global_init().

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 14:38:20 -08:00
Sage Weil
443203705c mon: disable pg_num adjustment
Until #1515 is fixed/reimplemented.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-20 13:00:14 -08:00
Sage Weil
7d3ae37511 mon: use encode function for new Incremental
When we encode an Incremental, use the encode wrapper function, so that
we can capture the encoded struct when building with ENCODE_DUMP.  Set
all features (the default when encode() is called directly).

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 11:02:49 -08:00
Sage Weil
f3a273a657 osdmap: successfully decode short map
When we send (old) maps to the kclient, we omit the extended section.  Lets
decode those (old, abbreviated maps) successfully, too.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 10:56:42 -08:00
Sage Weil
f3020c4ae7 osdmap: use FEATURE encoder macro
This generates encode/decode functions that pass feature bits into the
encoder, allowing us to encode old formats.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 10:56:42 -08:00
Sage Weil
ebd29b65b9 qa/btrfs/test_rmdir_async_snap
Attempt to reproduce btrfs bug when rmdirs race with an async snap.
Unsuccessful.  Best guess is that we need multiple threads to trigger.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 10:56:42 -08:00
Sage Weil
1e407b4f42 ceph-dencoder: add OSDMap::Incremental
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 10:56:42 -08:00
Sage Weil
a4f2fdb5c4 osdmap: add Incremental::dump()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-20 10:56:42 -08:00
Sage Weil
76cc71b24e osd: don't count SNAPDIR as a clone during backfill
When we are backfilling, we add in objects as we push them.  Do not count
the snapdir object as a clone, or else we'll screw up the count.

Fixes: #2080
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-20 09:40:03 -08:00
Sage Weil
24b470a9b1 crush: fix CrushCompiler warning
warning: crush/CrushCompiler.cc:595: ‘r’ may be used uninitialized in this function

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-20 06:40:44 -08:00
Sage Weil
d74e029406 test/encoding/readable.sh: sh, not dash
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-20 06:28:21 -08:00
Sage Weil
e33bf5afcc crushtool: fix clitests
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-20 06:27:39 -08:00
Sage Weil
d6de0bb83b Merge branch 'stable' 2012-02-19 19:36:00 -08:00
Sage Weil
0429aa79be msgr: fix shutdown race again
Only unlock once.  Sigh.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-19 19:37:13 -08:00
Sage Weil
b205c64c68 v0.42 2012-02-19 15:30:37 -08:00
Sage Weil
76e88d10a0 msgr: fix accept shutdown race fault
Need to hold pipe_lock.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-19 14:52:41 -08:00
Sage Weil
ca04ee13cc mon: test injected crush map
Run a bunch of inputs through an injected crush map to make sure it isn't
broken.

Fixes: #1932
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-19 14:50:15 -08:00
Sage Weil
5dd24f9f9d crush: move crushtool --test into CrushTester
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-19 14:48:05 -08:00
Sage Weil
e42a0e9f59 crush: move (de)compile into CrushCompiler class
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-19 14:44:06 -08:00
Sage Weil
2c2b3881bf mon: fix message discard on shutdown
Return true, so the messenger is happy, and drop the message reference.

Avoids an assert like

2012-02-19T12:36:05.102 INFO:teuthology.task.ceph.mon.2.err:ms_deliver_dispatch: fatal error: unhandled message 0x1b7b280 paxos(auth lease_ack lc 8 fc 1 pn 0 opn 0) v1 from mon.2 10.3.14.197:6789/0msg/Messenger.h: In function 'void Messenger::ms_deliver_dispatch(Message*)' thread 7fd7fe360700 time 2012-02-19 12:36:05.094713
2012-02-19T12:36:05.102 INFO:teuthology.task.ceph.mon.2.err:msg/Messenger.h: 143: FAILED assert(0)

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-19 12:44:58 -08:00
Sage Weil
4dd8c3542a crush: uninline encode/decode
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-19 12:08:11 -08:00
Sage Weil
6b5be27634 crush: cleanup: use temp var for curstep
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-19 11:59:11 -08:00
Sage Weil
ff5178c86a mds: use want_state to indicate shutdown
State gets DNE when we receive the first map.  And want_ makes more sense
anyway.  Fixes MDS startup.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-19 07:41:47 -08:00
Sage Weil
344c202203 osd: fix up argument to PG::init()
Commit cefa55b288b40e17ade9875493dd94de52ac22bf moved PG initialization
into init(), but passed acting for both up and acting args.  This lead to
confusion between primary and replica.

Also fix debug print so that the output is useful.

Fixes: #2075, #2070
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 22:17:35 -08:00
Sage Weil
2500a9b691 SimpleMessenger: drop unused sigint()
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 22:12:26 -08:00
Sage Weil
1f5e446d8a msgr: promote SimpleMessenger::Policy to Messenger::Policy
This is part of the generic interface, not specific to the implementation.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 22:12:26 -08:00
Sage Weil
10016923c9 mds: ignore all msgr callbacks on shutdown, not just dispatch
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 22:12:26 -08:00
Sage Weil
1f240ca4ff mon: discard messages while shutting down
Add SHUTDOWN state.  Ignore any msgr callbacks if set.

Fixes crash like

2012-02-18T21:57:58.912 INFO:teuthology.task.ceph:Shutting down mon daemons...
2012-02-18T21:57:58.912 DEBUG:teuthology.task.ceph.mon.a:waiting for process to exit
2012-02-18T21:57:58.913 INFO:teuthology.task.ceph.mon.a.err:2012-02-18 21:57:58.927759 7fe98dfa1700 mon.a@1(peon) e1 *** Got Signal Terminated ***
2012-02-18T21:57:59.014 INFO:teuthology.task.ceph.mon.a.err:*** Caught signal (Segmentation fault) **
2012-02-18T21:57:59.014 INFO:teuthology.task.ceph.mon.a.err: in thread 7fe98d7a0700
2012-02-18T21:57:59.014 INFO:teuthology.task.ceph.mon.a.err: ceph version 0.41-382-gc1db900 (commit:c1db9009c2cde9dc7ab8857b0d28a1b6d931e98a)
2012-02-18T21:57:59.015 INFO:teuthology.task.ceph.mon.a.err: 1: /tmp/cephtest/binary/usr/local/bin/ceph-mon() [0x5b0871]
2012-02-18T21:57:59.015 INFO:teuthology.task.ceph.mon.a.err: 2: (()+0xfb40) [0x7fe991a1eb40]
2012-02-18T21:57:59.015 INFO:teuthology.task.ceph.mon.a.err: 3: (PerfCounters::set(int, unsigned long)+0x1a) [0x52008a]
2012-02-18T21:57:59.015 INFO:teuthology.task.ceph.mon.a.err: 4: (PGMonitor::update_logger()+0x96) [0x4d4bf6]
2012-02-18T21:57:59.015 INFO:teuthology.task.ceph.mon.a.err: 5: (PGMonitor::update_from_paxos()+0xa70) [0x4e0980]
2012-02-18T21:57:59.016 INFO:teuthology.task.ceph.mon.a.err: 6: (Monitor::_ms_dispatch(Message*)+0x143b) [0x47bd6b]
2012-02-18T21:57:59.016 INFO:teuthology.task.ceph.mon.a.err: 7: (Monitor::ms_dispatch(Message*)+0x90) [0x489210]
2012-02-18T21:57:59.016 INFO:teuthology.task.ceph.mon.a.err: 8: (SimpleMessenger::dispatch_entry()+0x89a) [0x53959a]
2012-02-18T21:57:59.016 INFO:teuthology.task.ceph.mon.a.err: 9: (SimpleMessenger::DispatchThread::entry()+0x1c) [0x46358c]
2012-02-18T21:57:59.016 INFO:teuthology.task.ceph.mon.a.err: 10: (()+0x7971) [0x7fe991a16971]
2012-02-18T21:57:59.017 INFO:teuthology.task.ceph.mon.a.err: 11: (clone()+0x6d) [0x7fe9902a592d]

which is analogous to #2014.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 21:41:13 -08:00
Sage Weil
787dd17097 msgr: fix shutdown vs accept race
This is a kludge.  The real fix is to rewrite SimpleMessenger as a state
machine.

Fixes: #2073
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 14:28:44 -08:00
Sage Weil
c3a509a0f6 mds: drop all messages during suicide
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-18 14:28:42 -08:00
Sage Weil
fe0859aad5 Merge remote branch 'gh/wip-pg-states' 2012-02-18 14:00:50 -08:00
Sage Weil
806285f629 mon: fix STUCK_STALE check
Look at last_unstale if STALE bit is not set.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-17 16:34:35 -08:00
Josh Durgin
c08615e6e0 mon: add dump_stuck command
This will help monitoring transient pg states at a coarse level.

Fixes: #2005
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-02-17 16:34:35 -08:00