]>
git.apps.os.sepia.ceph.com Git - ceph.git/log
Sage Weil [Wed, 26 Jun 2013 13:01:40 +0000 (06:01 -0700)]
mon: do not reopen MonitorDBStore during startup
level doesn't seem to like this when it races with an internal compaction
attempt (see below). Instead, let the store get opened by the ceph_mon
caller, and pull a bit of the logic into the caller to make the flow a
little easier to follow.
-2> 2013-06-25 17:49:25.184490
7f4d439f8780 10 needs_conversion
-1> 2013-06-25 17:49:25.184495
7f4d4065c700 5 asok(0x13b1460) entry start
0> 2013-06-25 17:49:25.316908
7f4d3fe5b700 -1 *** Caught signal (Segmentation fault) **
in thread
7f4d3fe5b700
ceph version
0.64-667-g089cba8 (
089cba8fc0e8ae8aef9a3111cba7342ecd0f8314 )
1: ceph-mon() [0x649f0a]
2: (()+0xfcb0) [0x7f4d435dccb0]
3: (leveldb::Table::BlockReader(void*, leveldb::ReadOptions const&, leveldb::Slice const&)+0x154) [0x806e54]
4: ceph-mon() [0x808840]
5: ceph-mon() [0x808b39]
6: ceph-mon() [0x806540]
7: (leveldb::DBImpl::DoCompactionWork(leveldb::DBImpl::CompactionState*)+0xdd) [0x7f363d]
8: (leveldb::DBImpl::BackgroundCompaction()+0x2c0) [0x7f4210]
9: (leveldb::DBImpl::BackgroundCall()+0x68) [0x7f4cc8]
10: ceph-mon() [0x80b3af]
11: (()+0x7e9a) [0x7f4d435d4e9a]
12: (clone()+0x6d) [0x7f4d4196bccd]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 23:12:39 +0000 (16:12 -0700)]
mon/Paxos: simplify trim()
Collapse all the trim methods into a single simple method.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Wed, 26 Jun 2013 04:06:14 +0000 (21:06 -0700)]
mon/PaxosService: rename scrub
Make the name patch the one in Paxos.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 23:54:58 +0000 (16:54 -0700)]
mon/Paxos: clean up removal of pre-conversion paxos states
Use a helper, independent of trim machinery, and call on leader, too.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 22:58:43 +0000 (15:58 -0700)]
mon/Paxos: update first_committed only from paxos
Do not touch the in-memory first_committed until the trim commits. This
avoids any possible confusion due to races and keeps commit() as similar
to store_state() as possible.
Similarly, do not touch first_committed from store_state. We should
*only* pull it out of the kv store.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 23:45:05 +0000 (16:45 -0700)]
mon/Paxos: set first_committed on first commit
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 22:43:33 +0000 (15:43 -0700)]
mon/Paxos: never write first_committed except during trim
The trimming is handled by proposing transactions. Do not confuse matters
by writing (incorrect) first_committed values at any other point.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 22:22:05 +0000 (15:22 -0700)]
mon: enable leveldb cache by default
512 MB sounds reasonable to me.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 04:07:09 +0000 (21:07 -0700)]
mon/Paxos: assert that the store gives us back what we just wrote
In bug #5424 I observed leveldb failing internally and then returning
bad info. We then hit a random/confusing assert. Try to detect this
earlier by verifying that a get of a just-written last_committed gives
us back the right thing.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Sage Weil [Tue, 25 Jun 2013 18:58:22 +0000 (11:58 -0700)]
mon/Paxos: drop unnecessary last_committed loads
Drop (apparently) ad-hoc refreshes of last_committed from the store.
These are unnecessary and confusing.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 22:39:23 +0000 (15:39 -0700)]
mon/PaxosService: allow paxos service writes while paxos is updating
In commit
f985de28f86675e974ac7842a49922a35fe24c6c I mistakenly made
is_writeable() false while paxos was updating due to a misread of
Paxos::propose_new_value() (I didn't see that it would queue).
This is problematic because it narrows the window during which each service
is writeable for no reason.
Allow service to be writeable both when paxos is active and updating.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 19:01:53 +0000 (12:01 -0700)]
mon/PGMonitor: store PGMap directly in store, bypassing PaxosService stash_full
Instead of encoding incrementals and periodically dumping the whole encoded
PGMap, instead store everything in a range of keys, and update them
between versions using transactions. The per-version values are now
breadcrumbs indicating which keys were dirtied so they can be refreshed
via update_from_paxos().
This has several benefits:
- we avoid every encoding the entire PGMap
- we avoid dumping that blob into leveldb keys
- we limit the amount of data living in forward-moving keys, which leveldb
has a hard time compacting away
- pgmap data instead lives over a fixed range of keys, which leveldb
excels at
- we only keep the latest copy of the PGMap (which is all we care about)
Bump the internal monitor protocol version.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 21 Jun 2013 00:44:06 +0000 (17:44 -0700)]
mon/AuthMonitor: start at format 1 (latest) for new clusters
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 21:12:16 +0000 (14:12 -0700)]
mon/PaxosService: move upgrade_format() machinery into PaxosService
We originally did this in AuthMonitor, but it is perfect for PGMonitor too,
so make it generic.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 22:22:35 +0000 (15:22 -0700)]
mon/PGMonitor: drop some dead code
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 22:20:00 +0000 (15:20 -0700)]
mon/PGMap: make int type explicit
We get away with this because int is 32-bits on x86_64 and i386 both, but
we should be explicit anyway!
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 16:20:44 +0000 (09:20 -0700)]
mon/PaxosService: s/get_version()/get_last_committed()/
Avoid aliasing simple accessors; use a single name instead. Also, function
name overloading will throw a wrench in the class inheritance later.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 16:01:24 +0000 (09:01 -0700)]
mon/PaxosService: drop unused last_accepted_name
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 01:03:30 +0000 (18:03 -0700)]
mon/PaxosService: some whitespace
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 01:02:30 +0000 (18:02 -0700)]
mon/PaxosService: drop unused {get,set,put}_version(prefix, a, bl)
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 01:00:31 +0000 (18:00 -0700)]
mon/OSDMOnitor: use provided get_version_full()
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:57:00 +0000 (17:57 -0700)]
mon/PaxosService: simplify full helpers, drop single-use helper
We are the only caller for get_version(prefix, name), so move it inline
and drop it. Also rename full_version_name to full_prefix_name, which I
find slightly less confusing.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:46:00 +0000 (17:46 -0700)]
mon/PaxosService: remove mkfs helpers
Keep it simple. These are one-liners.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:17:56 +0000 (17:17 -0700)]
mon: fix mkfs monmap cleanup
exists_key(a,b) was looking for "monmap/mkfs/monmap".
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:39:20 +0000 (17:39 -0700)]
mon: make PaxosService::get_value() int return type 64-bit
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:39:49 +0000 (17:39 -0700)]
mon/PaxosService: drop unused helpers
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:26:41 +0000 (17:26 -0700)]
mon/MonmapMonitor: avoid exists_version() helper
We are the only user; open-code it.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 18 Jun 2013 00:08:55 +0000 (17:08 -0700)]
mon/PaxosService: remove unused exists_version() variant
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Tue, 25 Jun 2013 03:41:15 +0000 (20:41 -0700)]
Merge remote-tracking branch 'gh/next'
Sage Weil [Tue, 25 Jun 2013 01:51:07 +0000 (18:51 -0700)]
mon/Elector: cancel election timer if we bootstrap
If we short-circuit and bootstrap, cancel our timer. Otherwise it will
go off some time later when we are in who knows what state.
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Sage Weil [Tue, 25 Jun 2013 01:12:11 +0000 (18:12 -0700)]
mon: cancel probe timeout on reset
If we are probing and get (say) an election timeout that calls reset(),
cancel the timer. Otherwise, we assert later with a splat like
2013-06-24 01:09:33.675882
7fb9627e7700 4 mon.b@0(leader) e1 probe_timeout 0x307a520
2013-06-24 01:09:33.676956
7fb9627e7700 -1 mon/Monitor.cc: In function 'void Monitor::probe_timeout(int)' thread
7fb9627e7700 time 2013-06-24 01:09:43.675904
mon/Monitor.cc: 1888: FAILED assert(is_probing() || is_synchronizing())
ceph version
0.64-613-g134d08a (
134d08a9654f66634b893d493e4a92f38acc63cf )
1: (Monitor::probe_timeout(int)+0x161) [0x56f5c1]
2: (Context::complete(int)+0xa) [0x574a2a]
3: (SafeTimer::timer_thread()+0x425) [0x7059a5]
4: (SafeTimerThread::entry()+0xd) [0x7065dd]
5: (()+0x7e9a) [0x7fb966f62e9a]
6: (clone()+0x6d) [0x7fb9652f9ccd]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Fixes: #5438
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Sage Weil [Tue, 25 Jun 2013 00:58:48 +0000 (17:58 -0700)]
mon/AuthMonitor: ensure initial rotating keys get encoded when create_initial called 2x
The create_initial() method may get called multiple times; make sure it
will unconditionally generate new/initial rotating keys. Move the block
up so that we can easily assert as much.
Broken by commit
cd98eb0c651d9ee62e19c2cc92eadae9bed678cd .
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Sage Weil [Mon, 24 Jun 2013 23:37:29 +0000 (16:37 -0700)]
osd: tolerate racing threads starting recovery ops
We sample the (max - active) recovery ops to know how many to start, but
do not hold the lock over the full duration, such that it is possible to
start too many ops. This isn't problematic except that our condition
checks for being == max but not beyond it, and we will continue to start
recovery ops when we shouldn't. Fix this by adjusting the conditional
to be <=.
Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
Sage Weil [Tue, 25 Jun 2013 00:42:04 +0000 (17:42 -0700)]
init-radosgw.sysv: remove -x debug mode
Fixes: #5443
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 24 Jun 2013 19:52:44 +0000 (12:52 -0700)]
common/pick_addresses: behave even after internal_safe_to_start_threads
ceph-mon recently started using Preforker to working around forking issues.
As a result, internal_safe_to_start_threads got set sooner and calls to
pick_addresses() which try to set string config values now fail because
there are no config observers for them.
Work around this by observing the change while we adjust the value. We
assume pick_addresses() callers are smart enough to realize that their
result will be reflected by cct->_conf and not magically handled elsewhere.
Fixes: #5195, #5205
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Dan Mick [Mon, 24 Jun 2013 21:50:07 +0000 (14:50 -0700)]
Add python-argparse to dependencies (for pre-2.7 systems)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Mon, 24 Jun 2013 20:47:50 +0000 (13:47 -0700)]
Merge pull request #376 from dalgaaf/wip-da-SCA-cppcheck-3
Reviewed-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 24 Jun 2013 20:04:44 +0000 (13:04 -0700)]
debian, rpm: remove python-lockfile dependency
As for
2a4953b697a3464862fd3913336edfd7eede2487 ceph-disk no longer uses
this.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 24 Jun 2013 19:25:58 +0000 (12:25 -0700)]
Merge remote-tracking branch 'gh/next'
Sage Weil [Fri, 21 Jun 2013 21:23:45 +0000 (14:23 -0700)]
mds: do not assume segment list is non-empty in standby_trim_segments
If we restart standby replay shortly after startup, before we actually have
any segments, we an trigger a segfault here:
ceph version
0.64-441-gc39b99c (
c39b99cdecceaca77f66eafbcc38387406826406 )
1: ceph-mds() [0x975caa]
2: (()+0xfcb0) [0x7fc33b5a5cb0]
3: (MDLog::standby_trim_segments()+0x192) [0x78a932]
4: (MDS::C_MDS_StandbyReplayRestartFinish::finish(int)+0x39) [0x595f69]
5: (Journaler::_finish_reprobe(int, unsigned long, Context*)+0x190) [0x7917b0]
6: (Filer::_probed(Filer::Probe*, object_t const&, unsigned long, utime_t)+0x558) [0x7c6b38]
7: (Objecter::C_Stat::finish(int)+0xc0) [0x7c7930]
8: (Objecter::handle_osd_op_reply(MOSDOpReply*)+0xe48) [0x7b2c78]
9: (MDS::handle_core_message(Message*)+0xae8) [0x589858]
10: (MDS::_dispatch(Message*)+0x2f) [0x589a1f]
11: (MDS::ms_dispatch(Message*)+0x1d3) [0x58b4a3]
12: (DispatchQueue::entry()+0x3f1) [0x943861]
13: (DispatchQueue::DispatchThread::entry()+0xd) [0x86e32d]
Fixes: #5333
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit
abd0ff64e108b7670a062b3fa39baaf3d3e48fb3 )
Sage Weil [Mon, 24 Jun 2013 17:20:24 +0000 (10:20 -0700)]
Merge pull request #374 from ceph/wip-5427
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Danny Al-Gaaf [Mon, 24 Jun 2013 13:29:12 +0000 (15:29 +0200)]
test/librados/cmd.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 13:24:00 +0000 (15:24 +0200)]
osdc/Objecter.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 13:19:41 +0000 (15:19 +0200)]
mon/MonClient.cc: use static_cast instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 12:34:46 +0000 (14:34 +0200)]
common/cmdparse.cc: reduce scope of local variable 'pos'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 12:29:50 +0000 (14:29 +0200)]
common/cmdparse.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 12:24:14 +0000 (14:24 +0200)]
osd/OSD.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 12:18:52 +0000 (14:18 +0200)]
OSDMonitor.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 12:14:38 +0000 (14:14 +0200)]
mon/MonCap.cc: use empty() instead of if(size())
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Mon, 24 Jun 2013 11:50:33 +0000 (13:50 +0200)]
common/cmdparse.cc: prefer prefix ++operator for non-trivial iterator
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Gregory Farnum [Mon, 24 Jun 2013 05:42:07 +0000 (22:42 -0700)]
Merge pull request #375 from ceph/wip-msgr
misc msgr fixes
Reviewed-by: Greg Farnum <greg@inktank.com>
Sage Weil [Mon, 24 Jun 2013 01:09:55 +0000 (18:09 -0700)]
msgr: clear_pipe+queue reset when replacing lossy connections
We already handle the lossless replacement and lossy fault paths, but
not the lossy replacement. This fixes an assert(!cleared) in the
reaper. Adjust comments appropriately.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 17 Jun 2013 20:32:38 +0000 (13:32 -0700)]
msgr: reaper: make sure pipe has been cleared (under pipe_lock)
All paths to pipe shutdown should have cleared the con->pipe reference
already. Assert as much.
Also, do it under pipe_lock!
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 17 Jun 2013 21:14:02 +0000 (14:14 -0700)]
msg/Pipe: goto fail_unlocked on early failures in accept()
Instead of duplicating an incomplete cleanup sequence (that does not
clear_pipe()), goto fail_unlocked and do the cleanup in a generic way.
s/rc/r/ while we are here.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 17 Jun 2013 20:32:07 +0000 (13:32 -0700)]
msgr: clear con->pipe inside pipe_lock on mark_down
We need to do this under protection of the pipe_lock.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 17 Jun 2013 19:47:11 +0000 (12:47 -0700)]
msgr: clear_pipe inside pipe_lock on mark_down_all
Observed a segfault in rebind -> mark_down_all -> clear_pipe -> put that
may have been due to a racing thread clearing the connection_state pointer.
Do the clear_pipe() call under the protection of pipe_lock, as we do in
all other contexts.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sun, 23 Jun 2013 16:25:55 +0000 (09:25 -0700)]
mon/AuthMonitor: make initial auth include rotating keys
This closes a very narrow race during mon creation where there are no
service keys.
Fixes: #5427
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Sun, 23 Jun 2013 15:52:46 +0000 (08:52 -0700)]
mon: do not leak no_reply messages
I think I assumed no_reply() was releasing the references, but it is
not. Which is better, since send_reply() doesn't either. Fix the leaks
by dropping the message ref explicitly.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Sage Weil [Sun, 23 Jun 2013 15:53:09 +0000 (08:53 -0700)]
mon: fix leak of MOSDFailure messages
We need to discard/cancel/free the failure report messages before we
cancel a report out. Assert in the dtor to ensure we didn't forget.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Sage Weil [Sat, 22 Jun 2013 17:28:16 +0000 (10:28 -0700)]
debian: ceph-common requires matching version of python-ceph
If they skew the ceph_argparse.py module may be missing.
Signed-off-by: Sage Weil <sage@inktank.com>
Dan Mick [Sat, 22 Jun 2013 01:46:08 +0000 (18:46 -0700)]
Merge branch 'next'
Conflicts:
src/ceph.in
Dan Mick [Sat, 22 Jun 2013 01:39:59 +0000 (18:39 -0700)]
Add header comments and Inktank copyrights to ceph.in/ceph_argparse.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Dan Mick [Fri, 21 Jun 2013 23:10:35 +0000 (16:10 -0700)]
ceph.in: rip out reusable code to pybind/ceph_argparse.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Conflicts:
src/ceph.in
Sage Weil [Fri, 21 Jun 2013 22:52:32 +0000 (15:52 -0700)]
ceph: even shinier
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Fri, 21 Jun 2013 22:50:59 +0000 (15:50 -0700)]
ceph: do not busy-loop on ceph -w
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Fri, 21 Jun 2013 21:53:22 +0000 (14:53 -0700)]
librados: make cmd test tolerate NXIO for osd commands
The cluster may be thrashing underneath us; tolerate NXIO in case the OSD
is currently down.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 21 Jun 2013 21:25:34 +0000 (14:25 -0700)]
Merge remote-tracking branch 'gh/wip-mds'
Reviewed-by: Sage Weil <sage@inktank.com>
Sage Weil [Fri, 21 Jun 2013 21:23:45 +0000 (14:23 -0700)]
mds: do not assume segment list is non-empty in standby_trim_segments
If we restart standby replay shortly after startup, before we actually have
any segments, we an trigger a segfault here:
ceph version
0.64-441-gc39b99c (
c39b99cdecceaca77f66eafbcc38387406826406 )
1: ceph-mds() [0x975caa]
2: (()+0xfcb0) [0x7fc33b5a5cb0]
3: (MDLog::standby_trim_segments()+0x192) [0x78a932]
4: (MDS::C_MDS_StandbyReplayRestartFinish::finish(int)+0x39) [0x595f69]
5: (Journaler::_finish_reprobe(int, unsigned long, Context*)+0x190) [0x7917b0]
6: (Filer::_probed(Filer::Probe*, object_t const&, unsigned long, utime_t)+0x558) [0x7c6b38]
7: (Objecter::C_Stat::finish(int)+0xc0) [0x7c7930]
8: (Objecter::handle_osd_op_reply(MOSDOpReply*)+0xe48) [0x7b2c78]
9: (MDS::handle_core_message(Message*)+0xae8) [0x589858]
10: (MDS::_dispatch(Message*)+0x2f) [0x589a1f]
11: (MDS::ms_dispatch(Message*)+0x1d3) [0x58b4a3]
12: (DispatchQueue::entry()+0x3f1) [0x943861]
13: (DispatchQueue::DispatchThread::entry()+0xd) [0x86e32d]
Fixes: #5333
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Sage Weil [Fri, 21 Jun 2013 15:20:33 +0000 (08:20 -0700)]
mds: rev protocol
Commit
18b9e63b4df643e1f2fb8f17416089e5d970bf60 changed the OTW lock
encoding.
Signed-off-by: Sage Weil <sage@inktank.com>
Yan, Zheng [Fri, 21 Jun 2013 06:39:27 +0000 (14:39 +0800)]
mds: kill Server::handle_client_lookup_hash()
Server::handle_client_lookup_ino() is more simple and robust. Use it
to handle both LOOKUPHASH and LOOKUINO requests.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Yan, Zheng [Fri, 21 Jun 2013 06:39:26 +0000 (14:39 +0800)]
mds: use "open-by-ino" helper to handle LOOKUPINO request
Fixes #3541
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Sage Weil [Thu, 20 Jun 2013 22:55:41 +0000 (15:55 -0700)]
Merge remote-tracking branch 'yan/wip-mds' into wip-mds
Dan Mick [Thu, 20 Jun 2013 22:12:24 +0000 (15:12 -0700)]
ceph.in: remove some TAB chars
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Dan Mick [Thu, 20 Jun 2013 22:11:03 +0000 (15:11 -0700)]
ceph.in: fix ^C handling in watch (trap exception in while, too)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Thu, 20 Jun 2013 22:04:51 +0000 (15:04 -0700)]
ceph: --version as well as -v
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 19:30:54 +0000 (12:30 -0700)]
Merge remote-tracking branch 'gh/next'
Yan, Zheng [Thu, 20 Jun 2013 07:50:18 +0000 (15:50 +0800)]
osdc: re-calculate truncate_size for strip objects
Feed truncate_size through the striping algorithm so that it reflects the
correct per-object offset (as opposed to the file offset).
Fixes #5380
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Sage Weil [Sun, 16 Jun 2013 03:42:39 +0000 (20:42 -0700)]
qa/workunits/misc/multiple_rsync.sh: wtf
2013-06-15T12:55:29.808 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.1
2013-06-15T12:55:29.808 INFO:teuthology.task.workunit.client.0.err:+ tee a
2013-06-15T12:55:29.820 INFO:teuthology.task.workunit.client.0.out:sending incremental file list
2013-06-15T12:56:46.019 INFO:teuthology.task.workunit.client.0.out:
2013-06-15T12:56:46.020 INFO:teuthology.task.workunit.client.0.out:sent
1452634 bytes received 7485 bytes 19086.52 bytes/sec
2013-06-15T12:56:46.020 INFO:teuthology.task.workunit.client.0.out:total size is
3205063225 speedup is 2195.07
2013-06-15T12:56:46.020 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-15T12:56:46.021 INFO:teuthology.task.workunit.client.0.out:4 a
2013-06-15T12:56:46.022 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-15T12:56:46.022 INFO:teuthology.task.workunit.client.0.err:+ grep 4
2013-06-15T12:56:46.023 INFO:teuthology.task.workunit.client.0.out:4 a
2013-06-15T12:56:46.024 INFO:teuthology.task.workunit.client.0.err:+ rsync -auv --exclude local/ /usr/ usr.2
2013-06-15T12:56:46.024 INFO:teuthology.task.workunit.client.0.err:+ tee a
2013-06-15T12:56:46.112 INFO:teuthology.task.workunit.client.0.out:sending incremental file list
2013-06-15T12:57:17.172 INFO:teuthology.task.workunit.client.0.out:
2013-06-15T12:57:17.174 INFO:teuthology.task.workunit.client.0.out:sent
1452634 bytes received 7485 bytes 46352.98 bytes/sec
2013-06-15T12:57:17.174 INFO:teuthology.task.workunit.client.0.out:total size is
3205063225 speedup is 2195.07
2013-06-15T12:57:17.175 INFO:teuthology.task.workunit.client.0.err:+ wc -l a
2013-06-15T12:57:17.175 INFO:teuthology.task.workunit.client.0.out:3 a
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
21e85f90be3e4915376106dd384f6982086e2311 )
Sage Weil [Thu, 20 Jun 2013 18:28:26 +0000 (11:28 -0700)]
qa/workunits/cephtool/test.sh: fix and cleanup several tests
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 18:23:38 +0000 (11:23 -0700)]
mon: drop deprecated 'stop_cluster'
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 18:23:11 +0000 (11:23 -0700)]
mds: make 'mds compat rm_*compat' idempotent
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 18:11:50 +0000 (11:11 -0700)]
mon: make 'log ...' command wait for commit before reply
Previously we would just dump the command argument to our local log client
and reply immediately, which could lose the message if we then restarted.
Instead, commit directly and wait before replying.
Also, log as the actual client, not as the monitor processing the message.
Fixes: #5409
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Thu, 20 Jun 2013 18:04:26 +0000 (11:04 -0700)]
a/workunits/cephtool/test.sh: --no-log-to-stderr when examining stderr
We can get random messages to stderror from socket reconnects and such;
discard those if we are looking at stderr in the test.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 16:46:42 +0000 (09:46 -0700)]
mon: more fix dout use in sync_requester_abort()
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Mon, 10 Jun 2013 18:48:25 +0000 (11:48 -0700)]
mon: fix raw use of *_dout in sync_requester_abort()
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 15:08:14 +0000 (08:08 -0700)]
doc/release-notes: v0.61.4
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 03:02:27 +0000 (20:02 -0700)]
Merge pull request #367 from ceph/wip-ceph-cli
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Samuel Just [Thu, 20 Jun 2013 02:54:31 +0000 (19:54 -0700)]
Merge remote-tracking branch 'upstream/next'
Samuel Just [Thu, 20 Jun 2013 02:46:06 +0000 (19:46 -0700)]
FileStore: handle observers in constructor/destructor
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Sage Weil [Thu, 20 Jun 2013 02:38:17 +0000 (19:38 -0700)]
init-radosgw: use radosgw --show-config-value to get config values
This way we get the correct default values, as reflected by radosgw
itself.
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Wed, 19 Jun 2013 23:28:10 +0000 (16:28 -0700)]
ceph: fix ceph-conf call to get admin socket path for 'daemon <name> ...'
Signed-off-by: Sage Weil <sage@inktank.com>
Sage Weil [Wed, 19 Jun 2013 23:27:34 +0000 (16:27 -0700)]
ceph-conf: make --show-config-value reflect daemon defaults
We want DAEMON defaults, but we don't want global_init to do anything else
daemonish like print a banner or mkdir /var/run/ceph. This lets us use
ceph-conf -n osd.0 --show-config-value log_file
to get the default, while
ceph-conf -n osd.0 log_file
only reflects what is in the config file.
Signed-off-by: Sage Weil <sage@inktank.com>
Samuel Just [Thu, 20 Jun 2013 01:57:05 +0000 (18:57 -0700)]
FileStore: apply changes after disabling m_filestore_replica_fadvise
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit
ed8b0e65bde14d0a3a08bc233dee6a997e379dcc )
Samuel Just [Thu, 20 Jun 2013 01:57:05 +0000 (18:57 -0700)]
FileStore: apply changes after disabling m_filestore_replica_fadvise
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Thu, 20 Jun 2013 00:27:49 +0000 (17:27 -0700)]
ceph-disk: use unix lock instead of lockfile class
The lockfile class relies on file system trickery to get safe mutual
exclusion. However, the unix syscalls do this for us. More
importantly, the unix locks go away when the owning process dies, which
is behavior that we want here.
Fixes: #5387
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Sage Weil [Thu, 20 Jun 2013 00:55:20 +0000 (17:55 -0700)]
Merge remote-tracking branch 'gh/next'
Alexandre Maragone [Tue, 18 Jun 2013 23:18:01 +0000 (16:18 -0700)]
ceph-disk: make list_partition behave with unusual device names
When you get device names like sdaa you do not want to mistakenly conclude that
sdaa is a partition of sda. Use /sys/block/$device/$partition existence
instead.
Fixes: #5211
Backport: cuttlefish
Signed-off-by: Alexandre Maragone <alexandre.maragone@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
athanatos [Wed, 19 Jun 2013 22:59:39 +0000 (15:59 -0700)]
Merge pull request #364 from dachary/wip-5213
unit tests for PGLog::proc_replica_log
Reviewed-by: Samuel Just <sam.just@inktank.com>
athanatos [Wed, 19 Jun 2013 22:57:28 +0000 (15:57 -0700)]
Merge pull request #366 from dachary/wip-5398
PGLog::rewind_divergent_log must not call mark_dirty_from on end()
Reviewed-by: Samuel Just <sam.just@inktank.com>
Samuel Just [Wed, 19 Jun 2013 22:11:28 +0000 (15:11 -0700)]
FileStore: get_index prior to taking fdcache_lock in lfn_unlink
We take the fdcache_lock while holding onto index objects
elsewhere in the code.
Fixes: #5389
Reviewed-by: David Zafman <david.zafman@inktank.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>