Commit Graph

18299 Commits

Author SHA1 Message Date
Sage Weil
a1544c0e06 doc: 'deactivate mds' instead of 'stop mds'
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-23 14:28:46 -08:00
Sage Weil
079dd6db38 mon: mds "stop" -> "deactivate"
See #1820.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-23 14:28:46 -08:00
Sage Weil
21c43133c2 mon: refuse to stop mds if max_mds will make it rejoin
Otherwise the MDS will leave the cluster and immediately rejoin, which is
useless and confusing to users.  See #1820.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-23 12:08:52 -08:00
Sage Weil
963dec8288 Merge branch 'wip-2090'
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
2012-02-23 11:16:17 -08:00
Sage Weil
62a113aaa7 mon: unlock mon before msgr shutdown
The ceph_mon.cc main() will delete mon when the msgr dispatch thread
completes.  Make sure we unlock before we shut down the messenger, and
avoid touching this after messenger->shutdown().

Fixes: #2090
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-23 11:15:05 -08:00
Sage Weil
d1fe2f8fd7 mon: deprecate mon 'stop' command
Send SIGTERM.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-23 11:15:05 -08:00
Sage Weil
962aa3ea33 msgr: join dispatch_thread after it completes
This is just for completeness.  No change in behavior, since we don't
get here until the thread has signaled it is done.

Drop the destroy() overload, since we join earlier.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-23 11:14:51 -08:00
Sage Weil
d8192222d0 Merge remote-tracking branch 'gh/wip-stop' 2012-02-23 11:04:30 -08:00
Sage Weil
86a54a6e44 filestore: use IOC_CLONERANGE intead of IOC_CLONE ioctl
This is functionally equivalent, except that valgrind doesn't complain
about a bad pointer passed to an ioctl.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-02-23 09:51:31 -08:00
Sage Weil
49588e9462 osd: drop "stop" command
Send SIGINT.

Fixes: #1820
Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-23 09:43:03 -08:00
Sage Weil
560ddf463c osd: drop unused "stop" check
This is never reached: both callers handle "stop" explicitly.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-02-23 09:42:11 -08:00
Sage Weil
64ca584da1 osd: don't complete recovery if unfound
Otherwise we fail the !needs_recovery() assert.  Because we aren't
recovered.  For example,

2012-02-21 16:16:13.104665 1685c700 osd.5 1217 pg[0.16( v 1215'337 lc 19'2 (0'0,1215'337] n=25 ec=1 les/c 0/1061 1210/1210/1210) [5,3] r=0 lpr=1210 mlcod 0'0 active m=23 u=23 snaptrimq=[1~99,9b~e,aa~72,11d~3d,15b~e,16a~f,17a~5,180~4,185~1a,1a0~a,1ac~10,1bd~4,1c2~8,1cb~1,1cd~1,1cf~1a,1ea~10,1fb~6,202~2,205~2,209~2,20c~8,215~2,218~5,21e~1,220~1,222~9,22c~4,231~3,235~2,238~3,23e~2,241~4,246~1,248~1,24b~1,24d~9,257~6,25e~1,263~1,265~2,268~3,26e~1,273~1,275~5,27e~1,280~2]] needs_recovery osd.3 has 23 missing
osd/PG.cc: In function 'boost::statechart::result PG::RecoveryState::Active::react(const PG::RecoveryState::RecoveryComplete&)' thread 1685c700 time 2012-02-21 16:16:13.108923
osd/PG.cc: 4070: FAILED assert(!pg->needs_recovery())
 ceph version 0.42-70-g0e4367a (commit:0e4367aaac88b99c36386b6ce5e8d816fdd4ada0)
 1: (PG::RecoveryState::Active::react(PG::RecoveryState::RecoveryComplete const&)+0x1b3) [0x6a1173]
 2: (boost::statechart::simple_state<PG::RecoveryState::Active, PG::RecoveryState::Primary, boost::mpl::list<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, (boost::statechart::history_mode)0>::react_impl(boost::statechart::event_base const&, void const*)+0x121) [0x6c7301]
 3: (boost::statechart::state_machine<PG::RecoveryState::RecoveryMachine, PG::RecoveryState::Initial, std::allocator<void>, boost::statechart::null_exception_translator>::process_event(boost::statechart::event_base const&)+0x6b) [0x6bfc6b]
 4: (PG::RecoveryState::handle_recovery_complete(PG::RecoveryCtx*)+0x10c) [0x67c03c]
 5: (ReplicatedPG::start_recovery_ops(int, PG::RecoveryCtx*)+0x241) [0x4f83c1]
 6: (OSD::do_recovery(PG*)+0x345) [0x54b3e5]
 7: (ThreadPool::worker()+0xa26) [0x619e66]
 8: (ThreadPool::WorkThread::entry()+0xd) [0x57ad5d]
 9: (()+0x7971) [0x5037971]
 10: (clone()+0x6d) [0x679f92d]

Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-02-23 09:39:50 -08:00
Sage Weil
761ecc69c2 Makefile: include encoding check scripts in dist tarball
This makes 'make distcheck' happy.  Well, more happy at least; it's still
cranky but I can't tell why.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-21 17:11:02 -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