]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoskip TEST(EXT4StoreTest, _detect_fs) if DISK or MOUNTPOINT are undefined 379/head
Loic Dachary [Tue, 25 Jun 2013 13:04:34 +0000 (15:04 +0200)]
skip TEST(EXT4StoreTest, _detect_fs) if DISK or MOUNTPOINT are undefined

The TEST(EXT4StoreTest, _detect_fs) test is meant to be run from
qa/workunits/filestore/filestore.sh, after the ext4 file system was
created. If the DISK and MOUNTPOINT environment variables are not
defined, display a message explaining the expected environment and
silentely skip the test. The tests in store_test.cc are not unit tests
because they depend on their environment.

http://tracker.ceph.com/issues/5312 fixes #5312

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 25 Jun 2013 03:41:15 +0000 (20:41 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agomon/Elector: cancel election timer if we bootstrap
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>
12 years agomon: cancel probe timeout on reset
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>
12 years agomon/AuthMonitor: ensure initial rotating keys get encoded when create_initial called 2x
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>
12 years agoosd: tolerate racing threads starting recovery ops
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>
12 years agoinit-radosgw.sysv: remove -x debug mode
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>
12 years agocommon/pick_addresses: behave even after internal_safe_to_start_threads
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>
12 years agoAdd python-argparse to dependencies (for pre-2.7 systems)
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>
12 years agoMerge pull request #376 from dalgaaf/wip-da-SCA-cppcheck-3
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>
12 years agodebian, rpm: remove python-lockfile dependency
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>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Mon, 24 Jun 2013 19:25:58 +0000 (12:25 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agomds: do not assume segment list is non-empty in standby_trim_segments
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)

12 years agoMerge pull request #374 from ceph/wip-5427
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>
12 years agotest/librados/cmd.cc: use static_cast instead of C-Style cast 376/head
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>
12 years agoosdc/Objecter.cc: use static_cast instead of C-Style cast
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>
12 years agomon/MonClient.cc: use static_cast instead of C-Style cast
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>
12 years agocommon/cmdparse.cc: reduce scope of local variable 'pos'
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>
12 years agocommon/cmdparse.cc: remove unused variable
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>
12 years agoosd/OSD.cc: prefer prefix ++operator for non-trivial iterator
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>
12 years agoOSDMonitor.cc: prefer prefix ++operator for non-trivial iterator
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>
12 years agomon/MonCap.cc: use empty() instead of if(size())
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>
12 years agocommon/cmdparse.cc: prefer prefix ++operator for non-trivial iterator
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>
12 years agoMerge pull request #375 from ceph/wip-msgr
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>
12 years agomsgr: clear_pipe+queue reset when replacing lossy connections 375/head
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>
12 years agomsgr: reaper: make sure pipe has been cleared (under pipe_lock)
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>
12 years agomsg/Pipe: goto fail_unlocked on early failures in accept()
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>
12 years agomsgr: clear con->pipe inside pipe_lock on mark_down
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>
12 years agomsgr: clear_pipe inside pipe_lock on mark_down_all
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>
12 years agomon/AuthMonitor: make initial auth include rotating keys 374/head
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>
12 years agomon: do not leak no_reply messages
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>
12 years agomon: fix leak of MOSDFailure messages
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>
12 years agodebian: ceph-common requires matching version of python-ceph
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>
12 years agoMerge branch 'next'
Dan Mick [Sat, 22 Jun 2013 01:46:08 +0000 (18:46 -0700)]
Merge branch 'next'

Conflicts:
src/ceph.in

12 years agoAdd header comments and Inktank copyrights to ceph.in/ceph_argparse.py
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>
12 years agoceph.in: rip out reusable code to pybind/ceph_argparse.py
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

12 years agoceph: even shinier
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>
12 years agoceph: do not busy-loop on ceph -w
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>
12 years agolibrados: make cmd test tolerate NXIO for osd commands
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>
12 years agoMerge remote-tracking branch 'gh/wip-mds'
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>
12 years agomds: do not assume segment list is non-empty in standby_trim_segments
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>
12 years agomds: rev protocol
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>
12 years agomds: kill Server::handle_client_lookup_hash()
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>
12 years agomds: use "open-by-ino" helper to handle LOOKUPINO request
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>
12 years agoMerge remote-tracking branch 'yan/wip-mds' into wip-mds
Sage Weil [Thu, 20 Jun 2013 22:55:41 +0000 (15:55 -0700)]
Merge remote-tracking branch 'yan/wip-mds' into wip-mds

12 years agoceph.in: remove some TAB chars
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>
12 years agoceph.in: fix ^C handling in watch (trap exception in while, too)
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>
12 years agoceph: --version as well as -v
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>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 20 Jun 2013 19:30:54 +0000 (12:30 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoosdc: re-calculate truncate_size for strip objects
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>
12 years agoqa/workunits/misc/multiple_rsync.sh: wtf
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)

12 years agoqa/workunits/cephtool/test.sh: fix and cleanup several tests
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>
12 years agomon: drop deprecated 'stop_cluster'
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>
12 years agomds: make 'mds compat rm_*compat' idempotent
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>
12 years agomon: make 'log ...' command wait for commit before reply
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>
12 years agoa/workunits/cephtool/test.sh: --no-log-to-stderr when examining stderr
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>
12 years agomon: more fix dout use in sync_requester_abort()
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>
12 years agomon: fix raw use of *_dout in sync_requester_abort()
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>
12 years agodoc/release-notes: v0.61.4
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>
12 years agoMerge pull request #367 from ceph/wip-ceph-cli
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>
12 years agoMerge remote-tracking branch 'upstream/next'
Samuel Just [Thu, 20 Jun 2013 02:54:31 +0000 (19:54 -0700)]
Merge remote-tracking branch 'upstream/next'

12 years agoFileStore: handle observers in constructor/destructor
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>
12 years agoinit-radosgw: use radosgw --show-config-value to get config values 367/head
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>
12 years agoceph: fix ceph-conf call to get admin socket path for 'daemon <name> ...'
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>
12 years agoceph-conf: make --show-config-value reflect daemon defaults
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>
12 years agoFileStore: apply changes after disabling m_filestore_replica_fadvise
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)

12 years agoFileStore: apply changes after disabling m_filestore_replica_fadvise
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>
12 years agoceph-disk: use unix lock instead of lockfile class
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>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 20 Jun 2013 00:55:20 +0000 (17:55 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agoceph-disk: make list_partition behave with unusual device names
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>
12 years agoMerge pull request #364 from dachary/wip-5213
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>
12 years agoMerge pull request #366 from dachary/wip-5398
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>
12 years agoFileStore: get_index prior to taking fdcache_lock in lfn_unlink
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>
12 years agoPGLog::rewind_divergent_log must not call mark_dirty_from on end() 366/head
Loic Dachary [Wed, 19 Jun 2013 20:50:30 +0000 (22:50 +0200)]
PGLog::rewind_divergent_log must not call mark_dirty_from on end()

PGLog::rewind_divergent_log is dereferencing iterator "p" though it is
already past the end of its container. When entering the loop for the
first time, p is log.log.end() and must not be dereferenced.

mark_dirty_from must only be called after p--. It
will not rewind past begin() because of the

  if (p == log.log.begin())

test above.

http://tracker.ceph.com/issues/5398 fixes #5398

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agounit tests for PGLog::proc_replica_log 364/head
Loic Dachary [Mon, 17 Jun 2013 09:45:22 +0000 (11:45 +0200)]
unit tests for PGLog::proc_replica_log

The tests covers 100% of the LOC of proc_replica_log. It is broken down
in 7 cases to enumerate all the situations it must address. Each case
is isolated in a independant code block where the conditions are
reproduced.

All tests are done on omissing and oinfo because they are the only
data structures that can be modified by proc_replica_log.

The first case is a noop and checks that only last_complete gets
updated when there are no logs.

The following case includes entries that are supposed to be ignored (
x7, x8 and xa ), however this is not an actual proof that the code
ignoring them is actually run : it only shows in the code coverage
report.

   The log entry (1,3) modifies the object x9 but the olog entry
   (2,3) deletes it : log is authoritative and the object is added
   to missing. x7 is divergent and ignored. x8 has a more recent
   version in the log and the olog entry is ignored. xa is past
   last_backfill and ignored.

The other cases are a variation of the first case with minimal changes
to make them easier to understand and adapt. For instance most of them
start with a tail that is the same ( object with hash x5 and both at
version 1,1 ).

http://tracker.ceph.com/issues/5213 refs #5213

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agoadd constness to PGLog::proc_replica_log
Loic Dachary [Mon, 10 Jun 2013 16:39:47 +0000 (18:39 +0200)]
add constness to PGLog::proc_replica_log

The function is made const by replacing a single call to log.objects[]
with log.objects.find. The olog argument is also a const and does not
require any change.

http://tracker.ceph.com/issues/5213 refs #5213

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agoMerge pull request #342 from ceph/wip-mon
Sage Weil [Wed, 19 Jun 2013 18:33:28 +0000 (11:33 -0700)]
Merge pull request #342 from ceph/wip-mon

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon/PaxosService: not active during paxos UPDATING_PREVIOUS 342/head
Sage Weil [Fri, 7 Jun 2013 18:41:21 +0000 (11:41 -0700)]
mon/PaxosService: not active during paxos UPDATING_PREVIOUS

Treat this as an extension of the recovery process, e.g.

 RECOVERING -> ACTIVE
or
 RECOVERING -> UPDATING_PREVIOUS -> ACTIVE

and we are not active until we get to "the end" in both cases.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: simplify states
Sage Weil [Fri, 7 Jun 2013 18:40:22 +0000 (11:40 -0700)]
mon: simplify states

- make states mutually exclusive (an enum)
- rename locked -> updating_previous
- set state prior to begin() to simplify things a bit

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: not readable when LOCKED
Sage Weil [Fri, 7 Jun 2013 18:14:58 +0000 (11:14 -0700)]
mon/Paxos: not readable when LOCKED

If we are re-proposing a previously accepted value from a previous quorum,
we should not consider it readable, because it is possible it was exposed
to clients as committed (2/3 accepted) but not recored to be committed, and
we do not want to expose old state as readable when new state was
previously readable.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: cleanup: drop unused PREPARING state bit
Sage Weil [Fri, 7 Jun 2013 18:07:38 +0000 (11:07 -0700)]
mon/Paxos: cleanup: drop unused PREPARING state bit

This is never set when we block, and nobody looks at it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: simplify is_writeable
Sage Weil [Thu, 6 Jun 2013 22:20:05 +0000 (15:20 -0700)]
mon/PaxosService: simplify is_writeable

Recast this in terms of paxos check + our conditions, and make it
match wait_for_writeable().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: simplify readable check
Sage Weil [Wed, 5 Jun 2013 00:03:15 +0000 (17:03 -0700)]
mon/PaxosService: simplify readable check

Recast this in terms of the paxos check and our additional conditions,
which match wait_for_readable().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/MonmapMonitor: remove some dead code
Sage Weil [Fri, 31 May 2013 22:35:55 +0000 (15:35 -0700)]
mon/MonmapMonitor: remove some dead code

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/MonmapMonitor: fix typo in check to remove mkfs info
Sage Weil [Fri, 31 May 2013 21:53:19 +0000 (14:53 -0700)]
mon/MonmapMonitor: fix typo in check to remove mkfs info

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: fix whitespace
Sage Weil [Fri, 31 May 2013 21:53:05 +0000 (14:53 -0700)]
mon: fix whitespace

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: debug proposal timers
Sage Weil [Fri, 31 May 2013 21:30:13 +0000 (14:30 -0700)]
mon: debug proposal timers

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: simplify Monitor::init_paxos()
Sage Weil [Fri, 31 May 2013 23:45:08 +0000 (16:45 -0700)]
mon: simplify Monitor::init_paxos()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: go active *after* refreshing
Sage Weil [Fri, 31 May 2013 23:39:37 +0000 (16:39 -0700)]
mon/Paxos: go active *after* refreshing

The update_from_paxos() methods occasionally like to trigger new activity.
As long as they check is_readable() and is_writeable(), they will defer
until we go active and that activity will happen in the normal callbacks.

This fixes the problem where we active but is_writeable() is still false,
triggered by PGMonitor::check_osd_map().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: safely signal bootstrap from MonmapMonitor::update_from_paxos()
Sage Weil [Fri, 31 May 2013 22:32:06 +0000 (15:32 -0700)]
mon: safely signal bootstrap from MonmapMonitor::update_from_paxos()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: do paxos refresh in finish_proposal; and refactor
Sage Weil [Sun, 2 Jun 2013 23:57:11 +0000 (16:57 -0700)]
mon/Paxos: do paxos refresh in finish_proposal; and refactor

Do the paxos refresh inside finish_proposal, ordered *after* the leader
assertion so that MonmapMonitor::update_from_paxos() calling bootstrap()
does not kill us.

Also, remove unnecessary finish_queued_proposal() and move the logic inline
where the bad leader assertion is obvious.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/PaxosService: cache {first,last}_committed
Joao Eduardo Luis [Sun, 2 Jun 2013 23:15:02 +0000 (16:15 -0700)]
mon/PaxosService: cache {first,last}_committed

Refresh the in-memory values when we are told the on-disk paxos state
may have changed.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
12 years agomon: no need to refresh from _active
Sage Weil [Fri, 31 May 2013 21:30:48 +0000 (14:30 -0700)]
mon: no need to refresh from _active

The refresh is done explicitly by the monitor, independent of the more
fragile PaxosService callbacks.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: remove unnecessary update_from_paxos calls
Sage Weil [Sun, 2 Jun 2013 23:10:57 +0000 (16:10 -0700)]
mon: remove unnecessary update_from_paxos calls

The refresh() will do this when the state changes; no need to
opportunistically call this method all of the time.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: explicitly refresh_from_paxos() when leveldb state changes
Sage Weil [Sun, 2 Jun 2013 23:14:01 +0000 (16:14 -0700)]
mon: explicitly refresh_from_paxos() when leveldb state changes

Instead of opportunistically calling each service's update_from_paxos(),
instead explicitly refresh all in-memory state whenever we know the
paxos state may have changed.  This is simpler and less fragile.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos/FileStore: disable fadvise on XFS
Sage Weil [Wed, 19 Jun 2013 04:44:15 +0000 (21:44 -0700)]
os/FileStore: disable fadvise on XFS

fadvise(DONTNEED) on XFS can break writeback ordering and zeroing; see

      http://oss.sgi.com/archives/xfs/2013-06/msg00066.html

If we detect XFS, turn this option off.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoclient: fix warning
Sage Weil [Wed, 19 Jun 2013 17:50:49 +0000 (10:50 -0700)]
client: fix warning

client/Client.cc: In member function 'int Client::_read_sync(Fh*, uint64_t, uint64_t, ceph::bufferlist*)':
warning: client/Client.cc:5831:13: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: fix remote wrlock rejoin
Yan, Zheng [Sun, 16 Jun 2013 07:51:32 +0000 (15:51 +0800)]
mds: fix remote wrlock rejoin

remote wrlock's target is not always inode's auth MDS.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agomds: fix race between scatter gather and dirfrag export
Yan, Zheng [Sat, 15 Jun 2013 23:01:52 +0000 (07:01 +0800)]
mds: fix race between scatter gather and dirfrag export

If we gather dirty scatter lock state while corresponding dirfrag
is been exporting, we may receive different dirfrag states from
two MDS and we need to find which one is the newest. The solution
is adding a new variable "migrate seq" to dirfrag, increase it by
one when dirfrag's auth MDS changes. When gathering dirty scatter
lock state, use "migrate seq" to find the newest dirfrag state.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
12 years agoMerge branch 'next'
Sage Weil [Wed, 19 Jun 2013 16:58:54 +0000 (09:58 -0700)]
Merge branch 'next'