]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agolttng: Add distro packaging 2253/head 2260/head
Adam Crume [Fri, 15 Aug 2014 04:33:43 +0000 (21:33 -0700)]
lttng: Add distro packaging

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Fix "make distcheck"
Adam Crume [Fri, 15 Aug 2014 01:25:20 +0000 (18:25 -0700)]
lttng: Fix "make distcheck"

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Support --with-lttng=check
Adam Crume [Wed, 13 Aug 2014 22:22:42 +0000 (15:22 -0700)]
lttng: Support --with-lttng=check

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Remove tracing from libcommon
Adam Crume [Wed, 13 Aug 2014 18:42:00 +0000 (11:42 -0700)]
lttng: Remove tracing from libcommon

This is a short-term fix for issues caused by tracepoints in libcommon.
Code crashes at runtime if the same tracepoints are linked into the
program multiple times.  This happens with libcommon because it is
statically linked into dynamic libraries such as librados, then
statically linked into executables because symbols from libcommon are
not exposed in librados.  Therefore, any programs that use librados and
libcommon would crash because of duplicate tracepoints.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Fix bug in rbd-replay-prep, Thread::issued_io with wrong IO
Adam Crume [Wed, 13 Aug 2014 00:42:31 +0000 (17:42 -0700)]
rbd-replay: Fix bug in rbd-replay-prep, Thread::issued_io with wrong IO

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Remove extent tracepoints and inline extents
Adam Crume [Tue, 12 Aug 2014 23:10:53 +0000 (16:10 -0700)]
rbd-replay: Remove extent tracepoints and inline extents

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Move tracepoints from internal.cc to librbd.cc
Adam Crume [Tue, 12 Aug 2014 22:49:53 +0000 (15:49 -0700)]
rbd-replay: Move tracepoints from internal.cc to librbd.cc

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add man page and package binaries for rbd-replay-prep
Adam Crume [Tue, 12 Aug 2014 03:52:45 +0000 (20:52 -0700)]
rbd-replay: Add man page and package binaries for rbd-replay-prep

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Convert prep-for-replay.py to rbd-replay-prep.cc
Adam Crume [Thu, 7 Aug 2014 20:38:19 +0000 (13:38 -0700)]
rbd-replay: Convert prep-for-replay.py to rbd-replay-prep.cc

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add man page, and add binaries to Debian packaging
Adam Crume [Fri, 8 Aug 2014 00:20:05 +0000 (17:20 -0700)]
rbd-replay: Add man page, and add binaries to Debian packaging

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Remove outdated message that says regexes are used
Adam Crume [Fri, 8 Aug 2014 00:18:04 +0000 (17:18 -0700)]
rbd-replay: Remove outdated message that says regexes are used

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Replace Boost dependencies with custom string code
Adam Crume [Thu, 7 Aug 2014 22:11:37 +0000 (15:11 -0700)]
lttng: Replace Boost dependencies with custom string code

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Remove boost_regex from LIBADD and LDADD
Adam Crume [Thu, 7 Aug 2014 19:12:39 +0000 (12:12 -0700)]
rbd-replay: Remove boost_regex from LIBADD and LDADD

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Fix compiler warning in unit tests
Adam Crume [Thu, 7 Aug 2014 16:05:00 +0000 (09:05 -0700)]
rbd-replay: Fix compiler warning in unit tests

Was getting:
test/test_rbd_replay.cc:44:3: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]

Fixed by changing EXPECT_EQ(false, xxx) to EXPECT_FALSE(xxx).
For completeness, also changed EXPECT_EQ(true, xxx) to EXPECT_TRUE(xxx).

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Switch ImageNameMap from regex to plain string matching
Adam Crume [Thu, 7 Aug 2014 00:37:10 +0000 (17:37 -0700)]
rbd-replay: Switch ImageNameMap from regex to plain string matching

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Switch ImageNameMap to using rbd_loc
Adam Crume [Wed, 6 Aug 2014 23:00:40 +0000 (16:00 -0700)]
rbd-replay: Switch ImageNameMap to using rbd_loc

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add rbd_replay::rbd_loc
Adam Crume [Wed, 6 Aug 2014 23:39:56 +0000 (16:39 -0700)]
rbd-replay: Add rbd_replay::rbd_loc

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Use standard image@snap instead of image/snap
Adam Crume [Wed, 6 Aug 2014 18:56:05 +0000 (11:56 -0700)]
rbd-replay: Use standard image@snap instead of image/snap

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Fix ceph_ctf_stringp
Adam Crume [Fri, 1 Aug 2014 00:39:12 +0000 (17:39 -0700)]
lttng: Fix ceph_ctf_stringp

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Support replaying partial traces
Adam Crume [Thu, 31 Jul 2014 23:22:44 +0000 (16:22 -0700)]
rbd-replay: Support replaying partial traces

Tracing may start after the application is started, and image open calls
may missed. To support replaying these traces, additional information is
traced, allowing missing open calls to be generated.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Use non-zero fake data
Adam Crume [Thu, 31 Jul 2014 19:21:35 +0000 (12:21 -0700)]
rbd-replay: Use non-zero fake data

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add unit tests
Adam Crume [Thu, 31 Jul 2014 01:48:46 +0000 (18:48 -0700)]
rbd-replay: Add unit tests

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Preload liblttng-ust-fork.so in TESTS_ENVIRONMENT
Adam Crume [Mon, 28 Jul 2014 23:32:15 +0000 (16:32 -0700)]
lttng: Preload liblttng-ust-fork.so in TESTS_ENVIRONMENT

This adds LD_PRELOAD=liblttng-ust-fork.so to TESTS_ENVIRONMENT.
This prevents lttng from complaining when processes are forked.
The complaints otherwise taint the output and cause tests to fail.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Disable LTTng by default, add --with-lttng configure option
Adam Crume [Mon, 28 Jul 2014 16:44:42 +0000 (09:44 -0700)]
lttng: Disable LTTng by default, add --with-lttng configure option

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Fix 'make check' by setting up fake HOME
Adam Crume [Wed, 23 Jul 2014 15:48:39 +0000 (08:48 -0700)]
lttng: Fix 'make check' by setting up fake HOME

If the HOME variable is not set, LTTng complains, and the extra output
fails to match what the tests expect, so they fail.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add --map-image option for image name mapping
Adam Crume [Tue, 22 Jul 2014 23:06:52 +0000 (16:06 -0700)]
rbd-replay: Add --map-image option for image name mapping

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add --pool option
Adam Crume [Tue, 22 Jul 2014 23:09:29 +0000 (16:09 -0700)]
rbd-replay: Add --pool option

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add assertions
Adam Crume [Mon, 21 Jul 2014 22:57:45 +0000 (15:57 -0700)]
rbd-replay: Add assertions

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Default to not storing buffer content
Adam Crume [Mon, 21 Jul 2014 22:35:32 +0000 (15:35 -0700)]
lttng: Default to not storing buffer content

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add command-line arguments to prep-for-replay.py
Adam Crume [Mon, 21 Jul 2014 21:40:29 +0000 (14:40 -0700)]
rbd-replay: Add command-line arguments to prep-for-replay.py

Includes:
--print-on-read
--print-on-write
--window

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Fix async writes in prep-for-replay.py
Adam Crume [Mon, 21 Jul 2014 21:39:42 +0000 (14:39 -0700)]
rbd-replay: Fix async writes in prep-for-replay.py

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add --read-only flag
Adam Crume [Mon, 21 Jul 2014 21:38:28 +0000 (14:38 -0700)]
rbd-replay: Add --read-only flag

Removes ignoreWrites flag in prep-for-replay.py

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Fix examples/rbd-replay/replay
Adam Crume [Mon, 21 Jul 2014 21:33:26 +0000 (14:33 -0700)]
rbd-replay: Fix examples/rbd-replay/replay

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Clean up prep-for-replay.py
Adam Crume [Mon, 21 Jul 2014 19:02:54 +0000 (12:02 -0700)]
rbd-replay: Clean up prep-for-replay.py

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Hash completions across multiple mutexes to reduce contention
Adam Crume [Mon, 21 Jul 2014 18:14:01 +0000 (11:14 -0700)]
rbd-replay: Hash completions across multiple mutexes to reduce contention

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add --latency-multiplier option to usage statement
Adam Crume [Mon, 21 Jul 2014 18:12:48 +0000 (11:12 -0700)]
rbd-replay: Add --latency-multiplier option to usage statement

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agodoc: Add usage comment to librbd::RBD::AioCompletion
Adam Crume [Mon, 21 Jul 2014 17:37:29 +0000 (10:37 -0700)]
doc: Add usage comment to librbd::RBD::AioCompletion

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Fix memory leak in PendingIO
Adam Crume [Mon, 21 Jul 2014 17:36:51 +0000 (10:36 -0700)]
rbd-replay: Fix memory leak in PendingIO

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Check that return values are non-negative
Adam Crume [Fri, 18 Jul 2014 21:37:57 +0000 (14:37 -0700)]
rbd-replay: Check that return values are non-negative

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Support writing Actions to ostreams
Adam Crume [Fri, 18 Jul 2014 20:57:16 +0000 (13:57 -0700)]
rbd-replay: Support writing Actions to ostreams

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Print "Still waiting for" more judiciously
Adam Crume [Fri, 18 Jul 2014 20:49:15 +0000 (13:49 -0700)]
rbd-replay: Print "Still waiting for" more judiciously

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Change Worker::m_pending_ios from vector to map
Adam Crume [Fri, 18 Jul 2014 20:42:43 +0000 (13:42 -0700)]
rbd-replay: Change Worker::m_pending_ios from vector to map

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Printing pending IOs when worker threads waiting to die
Adam Crume [Fri, 18 Jul 2014 20:11:24 +0000 (13:11 -0700)]
rbd-replay: Printing pending IOs when worker threads waiting to die

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Bugfix: ensure PendingIOs are added before they're removed
Adam Crume [Fri, 18 Jul 2014 19:16:59 +0000 (12:16 -0700)]
rbd-replay: Bugfix: ensure PendingIOs are added before they're removed

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Add rbd_replay subsystem
Adam Crume [Fri, 18 Jul 2014 19:08:41 +0000 (12:08 -0700)]
rbd-replay: Add rbd_replay subsystem

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agoAdd assertf macro
Adam Crume [Fri, 18 Jul 2014 19:06:19 +0000 (12:06 -0700)]
Add assertf macro

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agorbd-replay: Switch logging from cout to dout
Adam Crume [Thu, 17 Jul 2014 22:01:42 +0000 (15:01 -0700)]
rbd-replay: Switch logging from cout to dout

To enable logs, we also have to use global_init to parse our
command-line args, so we now have other standard Ceph goodies
such as picking up config options from the environment.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Add rbd-replay
Adam Crume [Thu, 17 Jul 2014 16:39:35 +0000 (09:39 -0700)]
lttng: Add rbd-replay

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Add more tracing to librbd
Adam Crume [Wed, 9 Jul 2014 17:20:26 +0000 (10:20 -0700)]
lttng: Add more tracing to librbd

Includes:
- aio_complete
- aio_discard
- aio_flush
- aio_get_return_value
- aio_is_complete
- aio_read
- aio_wait_for_complete
- aio_write
- copy
- discard
- flush
- invalidate_cache
- rename
- resize
- Add ImageCtx pointer to trace points
- Add snap_name and readonly flag to trace point open_image_enter

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agotracing: instrument filestore
Noah Watkins [Tue, 1 Jul 2014 22:48:00 +0000 (15:48 -0700)]
tracing: instrument filestore

This adds objectstore tracepoints for the filestore. It'd be nice to add
these to the objectstore interface some how so we can get all
implementations for free, but that might just be a bit difficult
especially since each impl will apply transactions in a differnet way.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agolttng: Basic tracing of librbd
Adam Crume [Fri, 27 Jun 2014 23:48:19 +0000 (16:48 -0700)]
lttng: Basic tracing of librbd

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY
Adam Crume [Mon, 30 Jun 2014 14:17:32 +0000 (07:17 -0700)]
lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY

'ver' is obsolete and variable exists only for proper deserialization

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Split up libtracepoints
Adam Crume [Fri, 27 Jun 2014 23:27:20 +0000 (16:27 -0700)]
lttng: Split up libtracepoints

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Prevent deletion of tracing-common.h when cleaning
Adam Crume [Fri, 27 Jun 2014 22:40:25 +0000 (15:40 -0700)]
lttng: Prevent deletion of tracing-common.h when cleaning

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Prevent creation of incorrect .o files when generating from .tp
Adam Crume [Fri, 27 Jun 2014 22:38:24 +0000 (15:38 -0700)]
lttng: Prevent creation of incorrect .o files when generating from .tp

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Trace librados C API
Adam Crume [Wed, 25 Jun 2014 20:59:08 +0000 (13:59 -0700)]
lttng: Trace librados C API

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agoexamples: Add example for the librados C API
Adam Crume [Thu, 26 Jun 2014 15:46:10 +0000 (08:46 -0700)]
examples: Add example for the librados C API

Simply copied and modified the C++ API example.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Add tracing-common.h
Adam Crume [Wed, 25 Jun 2014 20:57:42 +0000 (13:57 -0700)]
lttng: Add tracing-common.h

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Trace ReplicatedPG::do_osd_ops
Adam Crume [Wed, 18 Jun 2014 18:01:19 +0000 (11:01 -0700)]
lttng: Trace ReplicatedPG::do_osd_ops

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Add rmw_flags to tracepoint in PG::queue_op
Adam Crume [Wed, 18 Jun 2014 17:52:56 +0000 (10:52 -0700)]
lttng: Add rmw_flags to tracepoint in PG::queue_op

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agolttng: Trace OpRequest
Adam Crume [Sat, 14 Jun 2014 00:17:22 +0000 (17:17 -0700)]
lttng: Trace OpRequest

Signed-off-by: Adam Crume <adamcrume@gmail.com>
11 years agotracing: automake-ify tracepoint generation
Noah Watkins [Fri, 20 Jun 2014 23:49:28 +0000 (16:49 -0700)]
tracing: automake-ify tracepoint generation

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agolttng: Check for lttng/tracepoint.h when configuring
Adam Crume [Thu, 12 Jun 2014 23:27:19 +0000 (16:27 -0700)]
lttng: Check for lttng/tracepoint.h when configuring

11 years agolttng: add pg and osd tracepoints
Noah Watkins [Sat, 7 Jun 2014 16:37:39 +0000 (09:37 -0700)]
lttng: add pg and osd tracepoints

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agolttng: trace mutex::unlock
Noah Watkins [Sat, 31 May 2014 22:59:27 +0000 (15:59 -0700)]
lttng: trace mutex::unlock

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotracing: bootstrap lttng-ust with mutex events
Noah Watkins [Fri, 30 May 2014 21:13:12 +0000 (14:13 -0700)]
tracing: bootstrap lttng-ust with mutex events

See src/tracing/README.md

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agomon: fix divide by zero when pg_num adjusted and no osds
Sage Weil [Wed, 13 Aug 2014 20:31:10 +0000 (13:31 -0700)]
mon: fix divide by zero when pg_num adjusted and no osds

Fixes: #9052
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agomon: fix potential divide by zero on can_mark_{down,out}
Sage Weil [Wed, 13 Aug 2014 20:15:04 +0000 (13:15 -0700)]
mon: fix potential divide by zero on can_mark_{down,out}

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2236 from ceph/wip-9055
Sage Weil [Wed, 13 Aug 2014 19:54:40 +0000 (12:54 -0700)]
Merge pull request #2236 from ceph/wip-9055

ceph_test_rados_api_tier: fix cache pool cleanup during test

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #2249 from ceph/wip-9096
Samuel Just [Wed, 13 Aug 2014 17:48:32 +0000 (10:48 -0700)]
Merge pull request #2249 from ceph/wip-9096

osd: fix require_same_peer_instance from fast_dispatch

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoosd/ReplicatedPG: only do agent mode calculations for positive values
Sage Weil [Wed, 13 Aug 2014 17:34:53 +0000 (10:34 -0700)]
osd/ReplicatedPG: only do agent mode calculations for positive values

After a split we can get negative values here.  Only do the arithmetic if
we have a valid (positive) value that won't through the floating point
unit for a loop.

Fixes: #9082
Tested-by: Karan Singh <karan.singh@csc.fi>
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoosd: fix some line wrapping 2249/head
Sage Weil [Wed, 13 Aug 2014 16:38:07 +0000 (09:38 -0700)]
osd: fix some line wrapping

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoosd: fix require_same_peer_instance from fast_dispatch
Sage Weil [Wed, 13 Aug 2014 15:30:25 +0000 (08:30 -0700)]
osd: fix require_same_peer_instance from fast_dispatch

The mark-down of old peers needs to take the session_dispatch_lock in order
to safely clear the Session ref cycle.  However, for fast dispatch callers,
that lock is already held.  Pass a flag down from the callers indicating
whether we need to take the additional lock.

Fixes: #9096
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoosd: inline require_osd_up_peer
Sage Weil [Wed, 13 Aug 2014 15:20:42 +0000 (08:20 -0700)]
osd: inline require_osd_up_peer

There is only one caller.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoRevert "ReplicatedPG: do not pass cop into C_Copyfrom"
Samuel Just [Tue, 12 Aug 2014 23:34:30 +0000 (16:34 -0700)]
Revert "ReplicatedPG: do not pass cop into C_Copyfrom"

The ref was introduced in 589b639af7c8834a1e6293d58d77a9c440107bc3
and is actually necessary to keep the buffers around.

This reverts commit 300b5e8ecbb7526b55e2cb5eeba81fd501a8b652.

11 years agoReplicatedPG: do not pass cop into C_Copyfrom
Samuel Just [Tue, 12 Aug 2014 19:20:28 +0000 (12:20 -0700)]
ReplicatedPG: do not pass cop into C_Copyfrom

We do not know when the objecter will finally let go of this Context.  Thus, we
cannot know whether it will happen before the flush, at which point the
object_context held by the cop must have been released.

Also, we simply don't need it, process_copy_chunk alrady works in terms of the
tid!

Fixes: #8894
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #2239 from ceph/wip-8912
Sage Weil [Tue, 12 Aug 2014 19:41:31 +0000 (12:41 -0700)]
Merge pull request #2239 from ceph/wip-8912

librbd: fix error path cleanup for opening an image

Reviewed-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2243 from ceph/wip-log-client
Loic Dachary [Tue, 12 Aug 2014 15:08:37 +0000 (17:08 +0200)]
Merge pull request #2243 from ceph/wip-log-client

common/LogClient: fix sending dup log items

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agocommon/LogClient: fix sending dup log items 2243/head
Sage Weil [Tue, 12 Aug 2014 14:05:34 +0000 (07:05 -0700)]
common/LogClient: fix sending dup log items

We need to skip even the most recently sent item in order to get to the
ones we haven't sent yet.

Fixes: #9080
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agolibrbd: fix error path cleanup for opening an image 2239/head
Josh Durgin [Mon, 11 Aug 2014 23:41:26 +0000 (16:41 -0700)]
librbd: fix error path cleanup for opening an image

If the image doesn't exist and caching is enabled, the ObjectCacher
was not being shutdown, and the ImageCtx was leaked. The IoCtx could
later be closed while the ObjectCacher was still running, resulting in
a segfault. Simply use the usual cleanup path in open_image(), which
works fine here.

Fixes: #8912
Backport: dumpling, firefly
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: Don't send error body when it's a HEAD request
Sylvain Munaut [Thu, 5 Jun 2014 09:28:27 +0000 (11:28 +0200)]
rgw: Don't send error body when it's a HEAD request

The main 'operation' know not to send any body for HEAD requests.

However for errors, this was not the case, the formatter would be
flushed and would send the error 'message' in the body in all cases.

For the FastCGI case it doesn't seem to be an issue, it's possible
that the webserver (apache/lighttpd/...) cleans up the response
into shape.

But when using the new civetweb frontend this cause invalid HTTP.

Backport: firefly
Fixes #8539

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
11 years agoMerge pull request #2214 from ceph/wip-rados-df-json
Josh Durgin [Mon, 11 Aug 2014 19:30:35 +0000 (12:30 -0700)]
Merge pull request #2214 from ceph/wip-rados-df-json

rados: fix 'rados df --format=json' field names

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorados: remove {read,write}_kb fields from rados df json output 2214/head
Sage Weil [Wed, 6 Aug 2014 17:45:19 +0000 (10:45 -0700)]
rados: remove {read,write}_kb fields from rados df json output

Redundant.  Do not backport.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agorados: fix {read,write}_bytes value
Sage Weil [Wed, 6 Aug 2014 17:45:00 +0000 (10:45 -0700)]
rados: fix {read,write}_bytes value

Fill this in with kb * 1024 instead of the ops count.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2238 from ceph/wip-9057
Samuel Just [Mon, 11 Aug 2014 17:25:43 +0000 (10:25 -0700)]
Merge pull request #2238 from ceph/wip-9057

msg/Pipe: do not wait for self in Pipe::stop_and_wait()

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agomsg/Pipe: do not wait for self in Pipe::stop_and_wait() 2238/head
Sage Weil [Mon, 11 Aug 2014 03:22:23 +0000 (20:22 -0700)]
msg/Pipe: do not wait for self in Pipe::stop_and_wait()

The fast dispatch code necessitated adding a wait for the fast dispatch
to complete when taking over sockets back in commit
2d5d3097c3998add1061ce253104154d72879237.  This included mark_down()
(although I am not certain mark_down was required to fix the previous set
of races).

In any case, if the fast dispatch thread itself tries to mark down its
own connection, it will deadlock in this method waiting for itself to
return and clear reader_dispatching.  Skip this wait if we are in fact
the reader thread.  This avoids the deadlock.

Alternatively, we could change mark_down() to not use stop_and_wait(), but
I am less clear about the potential races there, so I'm opting for the
minimal (though ugly) fix.

Fixes: #9057
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoceph_test_rados_api_tier: fix cache cleanup (ec too) 2236/head
Sage Weil [Sun, 10 Aug 2014 19:48:29 +0000 (12:48 -0700)]
ceph_test_rados_api_tier: fix cache cleanup (ec too)

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoceph_test_rados_api: fix cleanup of cache pool
Sage Weil [Sun, 10 Aug 2014 19:15:38 +0000 (12:15 -0700)]
ceph_test_rados_api: fix cleanup of cache pool

We can't simply try to delete everything in there because some items may
be whiteouts.  Instead, flush+evict everything, then remove overlay, and
*then* delete what remains.

Fixes: #9055
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agolibrados/TestCase: inheret cleanup_default_namespace
Sage Weil [Sun, 10 Aug 2014 18:41:23 +0000 (11:41 -0700)]
librados/TestCase: inheret cleanup_default_namespace

No need to duplicate this code.

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoOSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper
Greg Farnum [Tue, 29 Jul 2014 01:33:56 +0000 (18:33 -0700)]
OSD: add require_same_peer_inst(OpRequestRef&,OSDMap&) helper

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit e99acf9810976b1fc74b84ad289773af43be973f)

11 years agoOSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function
Greg Farnum [Mon, 28 Jul 2014 21:19:59 +0000 (14:19 -0700)]
OSD: introduce require_self_aliveness(OpRequestRef&,epoch_t) function

Take the self-aliveness checks out of require_same_or_newer_map() and use
the new function for that and for require_up_osd_peer().

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit e179e9227b4a4482d8359682092fd7f426b9a919)

11 years agoOSD: use OpRequestRef& for a few require_* functions
Greg Farnum [Mon, 28 Jul 2014 21:08:30 +0000 (14:08 -0700)]
OSD: use OpRequestRef& for a few require_* functions

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit eb2f1ea2c33647934af878b504383829f5a198ce)

11 years agoOSD: introduce require_up_osd_peer() function for gating replica ops
Greg Farnum [Tue, 22 Jul 2014 23:57:00 +0000 (16:57 -0700)]
OSD: introduce require_up_osd_peer() function for gating replica ops

This checks both that a Message originates from an OSD, and that the OSD
is up in the given map epoch.
We use it in handle_replica_op so that we don't inadvertently add operations
from down peers, who might or might not know it.

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit ccd0eec50103b919b3eb6eea96f7dc6438520ed3)

11 years agoMerge pull request #2228 from ceph/wip-pg-epoch
Sage Weil [Sat, 9 Aug 2014 01:17:27 +0000 (18:17 -0700)]
Merge pull request #2228 from ceph/wip-pg-epoch

osd: fix pg epoch floor tracking

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd: fix pg epoch floor tracking 2228/head
Sage Weil [Fri, 8 Aug 2014 00:42:06 +0000 (17:42 -0700)]
osd: fix pg epoch floor tracking

If you call erase() on a multiset it will delete all instances of a value;
we only want to delete one of them.  Fix this by passing an iterator.

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agorados: add {read,write}_ops to df json
Sage Weil [Wed, 6 Aug 2014 17:44:21 +0000 (10:44 -0700)]
rados: add {read,write}_ops to df json

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2198 from ceph/wip-8998
Samuel Just [Mon, 4 Aug 2014 22:12:25 +0000 (15:12 -0700)]
Merge pull request #2198 from ceph/wip-8998

fix OSD SEGV in heartbeat()

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd: simplify dout_prefix macros 2198/head
Sage Weil [Mon, 4 Aug 2014 22:01:15 +0000 (15:01 -0700)]
osd: simplify dout_prefix macros

Use a get_osdmap_epoch() helper that is a bit lighter weight (by avoiding
copying around an OSDMapRef).

Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoosd: reorder OSDService methods under proper dout_prefix macro
Sage Weil [Mon, 4 Aug 2014 21:57:28 +0000 (14:57 -0700)]
osd: reorder OSDService methods under proper dout_prefix macro

The dout_prefix for OSDService uses get_osdmap() to grab a shared_ptr for
the epoch printout.  The OSD one does not, and is not safe to run in all
thread contexts.

In particular, update_osd_stat() is run by the heartbeat thread and can
race with the shared_ptr itself being updated with a new map.

Ironically, if this were simply an OSDMap*, there would be no race since
the pointer is a single word and updates atomically.

Fix this, and any similar issues, by moving the OSDService methods up in
OSD.cc so that they use the safe dout macro.

Fixes: #8998
Backport: firefly (in a minimal form, I think!)
Signed-off-by: Sage Weil <sage@redhat.com>
11 years agoMerge pull request #2192 from ceph/wip-8891
Samuel Just [Mon, 4 Aug 2014 17:30:25 +0000 (10:30 -0700)]
Merge pull request #2192 from ceph/wip-8891

msg/SimpleMessenger: drop msgr lock when joining a Pipe

Reviewed-by: Samuel Just <sam.just@inktank.com>