]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoFileStore: next_finish is not used
Samuel Just [Wed, 17 Oct 2012 20:06:51 +0000 (13:06 -0700)]
FileStore: next_finish is not used

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agotest/bench: add tp bench
Samuel Just [Tue, 23 Oct 2012 05:04:40 +0000 (22:04 -0700)]
test/bench: add tp bench

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agotest/bench: small io benchmarker
Samuel Just [Sat, 6 Oct 2012 20:58:37 +0000 (13:58 -0700)]
test/bench: small io benchmarker

Precreates objects and does writes to random offsets within
random objects.

Includes rados, filestore, and vanilla fs variants

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoMutex: Instrument Mutex with perfcouter for Lock() wait
Samuel Just [Thu, 11 Oct 2012 01:20:31 +0000 (18:20 -0700)]
Mutex: Instrument Mutex with perfcouter for Lock() wait

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agomsg/SimpleMessenger: start accepter in ready()
Sage Weil [Tue, 30 Oct 2012 20:19:30 +0000 (13:19 -0700)]
msg/SimpleMessenger: start accepter in ready()

Start the accepter thread when the first dispatcher is ready.  This ensures
that there will be someone around to verify authorizers for incoming
connections, and means we have a bit less failure noise on the monitors
as a result.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon: separate pre- and post-fork init
Sage Weil [Tue, 30 Oct 2012 20:16:57 +0000 (13:16 -0700)]
mon: separate pre- and post-fork init

Do most init pre-fork, then do the last little bit (start up messenger,
bootstrap) post-fork.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: fix seq # fix
Sage Weil [Tue, 30 Oct 2012 20:08:57 +0000 (13:08 -0700)]
msg/Pipe: fix seq # fix

02f6262f47f72178a78d410f4facab7bbc97b098 got this all wrong (though it
worked by accident).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: verify authorizers for heartbeat dispatcher
Sage Weil [Tue, 30 Oct 2012 19:49:53 +0000 (12:49 -0700)]
osd: verify authorizers for heartbeat dispatcher

This was broken with the fixed messenger behavior with missing
verify_authorizer methods in 100fcca3cb54c97c4332328aad67d4b796f33ec2.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: fix typo in cinder upstart config name
Josh Durgin [Tue, 30 Oct 2012 19:34:19 +0000 (12:34 -0700)]
doc: fix typo in cinder upstart config name

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodoc: Added syntax fixes to Peter's session authentication doc.
John Wilkins [Tue, 30 Oct 2012 18:20:51 +0000 (11:20 -0700)]
doc: Added syntax fixes to Peter's session authentication doc.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agomsg/Pipe: whitespace cleanup
Sage Weil [Tue, 30 Oct 2012 17:00:54 +0000 (10:00 -0700)]
msg/Pipe: whitespace cleanup

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomsg/Pipe: only randomize start seq #'s if MSG_AUTH feature is present
Sage Weil [Tue, 30 Oct 2012 17:00:42 +0000 (10:00 -0700)]
msg/Pipe: only randomize start seq #'s if MSG_AUTH feature is present

The kernel client expects seq #'s to start at 1 or else it is unhappy.
So, only randomize these values if the MSG_AUTH feature is present--that is
the only time it matters anyway.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: update fs recommendations
Sage Weil [Mon, 29 Oct 2012 20:01:06 +0000 (13:01 -0700)]
doc: update fs recommendations

More forceful about recommending XFS.  More warning about using btrfs in
production deployments.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agocephx: don't check signature if MSG_AUTH feature isn't present
Sage Weil [Mon, 29 Oct 2012 22:48:15 +0000 (15:48 -0700)]
cephx: don't check signature if MSG_AUTH feature isn't present

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoauth: include features in cephx SessionHandler
Sage Weil [Mon, 29 Oct 2012 22:47:45 +0000 (15:47 -0700)]
auth: include features in cephx SessionHandler

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoFixed problem with checking authorizer in accept().
Peter Reiher [Mon, 29 Oct 2012 21:36:08 +0000 (14:36 -0700)]
Fixed problem with checking authorizer in accept().

Signed-off-by: Peter Reiher <reiher@inktank.com>
12 years agolibrbd: Fix 32-bit compilation errors
Dan Mick [Mon, 29 Oct 2012 18:03:15 +0000 (11:03 -0700)]
librbd: Fix 32-bit compilation errors

Switch size_t in clip_io to uint64_t; it's just easier, and the
alternative would be to limit 32-bit builds to sizes <= 4GB

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'master' of github.com:ceph/ceph
Peter Reiher [Mon, 29 Oct 2012 19:47:18 +0000 (12:47 -0700)]
Merge branch 'master' of github.com:ceph/ceph

12 years agoTemporary patch to a problem in Pipe related to monitor initialization.
Peter Reiher [Mon, 29 Oct 2012 19:42:29 +0000 (12:42 -0700)]
Temporary patch to a problem in Pipe related to monitor initialization.

Signed-off-by: Peter Reiher <reiher@inktank.com>
12 years agoMerge branch 'wip-oc-neg'
Sage Weil [Mon, 29 Oct 2012 19:37:08 +0000 (12:37 -0700)]
Merge branch 'wip-oc-neg'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agodep-report.sh: ceph package dependency report.
Gary Lowell [Mon, 29 Oct 2012 16:55:33 +0000 (09:55 -0700)]
dep-report.sh:  ceph package dependency report.

This script searches the ceph build area for dependent header files and
and libraries to attempt to identify ceph package dependecies.

12 years agoclient: Fix ref counting double free with hardlink
Sam Lang [Mon, 29 Oct 2012 15:30:01 +0000 (10:30 -0500)]
client: Fix ref counting double free with hardlink

Peforming a hard link through the libcephfs interface causes
a double free on shutdown, due to the Client::link call decrementing
the parent (of the target) directory's inode.  This fix removes the
put_inode(dir) call, to match the behavior of Client::ll_link.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agotest: Functional test for hardlink/unmount pattern
Sam Lang [Fri, 19 Oct 2012 16:38:33 +0000 (11:38 -0500)]
test: Functional test for hardlink/unmount pattern

This test currently breaks on libcephfs as reported
in #3367.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoosdc/ObjectCacher: remove dead locking code
Sage Weil [Sat, 27 Oct 2012 20:56:24 +0000 (13:56 -0700)]
osdc/ObjectCacher: remove dead locking code

This is unused, and mostly broken in that there is no cleanup when there
is a failure.  Also, the support in the OSD has been largely removed.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: clip requests past end-of-image.
Dan Mick [Tue, 23 Oct 2012 04:15:51 +0000 (21:15 -0700)]
librbd: clip requests past end-of-image.

Rename check_io to clip_io, which can modify the passed-in length
to clamp it to the device size.  This is expected behavior for
block-device emulation.

Call clip_io in rbd_write(); need to return clipped length there,
even though aio_write() is calling clip_io() as well (for the
direct path).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agolibrbd: size max objects based on actual image object order size
Sage Weil [Sat, 27 Oct 2012 00:12:44 +0000 (17:12 -0700)]
librbd: size max objects based on actual image object order size

This has to happen after we open the image.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw_cache: change call signature to overwrite rgw_rados put_obj_meta()
caleb miles [Fri, 26 Oct 2012 19:17:05 +0000 (15:17 -0400)]
rgw_cache: change call signature to overwrite rgw_rados put_obj_meta()

Signed-off-by: caleb miles <caleb.miles@inktank.com>
12 years agoMerge branch 'master' of github.com:ceph/ceph
Peter Reiher [Fri, 26 Oct 2012 22:32:48 +0000 (15:32 -0700)]
Merge branch 'master' of github.com:ceph/ceph

12 years agoMerge branch 'master' of https://github.com/ceph/ceph
John Wilkins [Fri, 26 Oct 2012 21:49:00 +0000 (14:49 -0700)]
Merge branch 'master' of https://github.com/ceph/ceph

12 years agodoc: updated front page graphic.
John Wilkins [Fri, 26 Oct 2012 21:45:08 +0000 (14:45 -0700)]
doc: updated front page graphic.

fixes: #3412

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'wip-java-cephfs'
Noah Watkins [Fri, 26 Oct 2012 21:37:25 +0000 (14:37 -0700)]
Merge branch 'wip-java-cephfs'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Joe Buck <joe.buck@inktank.com>
12 years agoPG: Do not discard op data too early
Jim Schutt [Thu, 27 Sep 2012 21:56:15 +0000 (15:56 -0600)]
PG: Do not discard op data too early

Under a sustained cephfs write load where the offered load is higher
than the storage cluster write throughput, a backlog of replication ops
that arrive via the cluster messenger builds up.  The client message
policy throttler, which should be limiting the total write workload
accepted by the storage cluster, is unable to prevent it, for any
value of osd_client_message_size_cap, under such an overload condition.

The root cause is that op data is released too early, in op_applied().

If instead the op data is released at op deletion, then the limit
imposed by the client policy throttler applies over the entire
lifetime of the op, including commits of replication ops.  That
makes the policy throttler an effective means for an OSD to
protect itself from a sustained high offered load, because it can
effectively limit the total, cluster-wide resources needed to process
in-progress write ops.

Signed-off-by: Jim Schutt <jaschut@sandia.gov>
12 years agojava: use unique directory in test
Noah Watkins [Fri, 26 Oct 2012 20:28:52 +0000 (13:28 -0700)]
java: use unique directory in test

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add tests for double mounting
Noah Watkins [Thu, 25 Oct 2012 22:10:17 +0000 (15:10 -0700)]
java: add tests for double mounting

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add AlreadyMounted exception
Noah Watkins [Thu, 25 Oct 2012 22:09:54 +0000 (15:09 -0700)]
java: add AlreadyMounted exception

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: remove deprecated ceph_shutdown
Noah Watkins [Thu, 25 Oct 2012 21:42:27 +0000 (14:42 -0700)]
java: remove deprecated ceph_shutdown

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: clean-up in finalize()
Noah Watkins [Thu, 25 Oct 2012 21:43:09 +0000 (14:43 -0700)]
java: clean-up in finalize()

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: enable ceph_release
Noah Watkins [Thu, 25 Oct 2012 21:23:18 +0000 (14:23 -0700)]
java: enable ceph_release

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: enable ceph_unmount
Noah Watkins [Thu, 25 Oct 2012 21:10:24 +0000 (14:10 -0700)]
java: enable ceph_unmount

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: mkdirs returns IOException
Noah Watkins [Sat, 20 Oct 2012 17:58:23 +0000 (10:58 -0700)]
java: mkdirs returns IOException

For example, CephFileAlreadyExistsException may be returned if mkdirs is
called to create a directory already present.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: log listdir contents in java client
Noah Watkins [Thu, 25 Oct 2012 15:51:33 +0000 (08:51 -0700)]
java: log listdir contents in java client

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: remove tabs to fix formatting
Noah Watkins [Fri, 19 Oct 2012 19:22:05 +0000 (12:22 -0700)]
java: remove tabs to fix formatting

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add O_WRONLY open flag
Noah Watkins [Fri, 19 Oct 2012 19:20:40 +0000 (12:20 -0700)]
java: add O_WRONLY open flag

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agojava: add FileAlreadyExists exception
Noah Watkins [Fri, 19 Oct 2012 19:10:25 +0000 (12:10 -0700)]
java: add FileAlreadyExists exception

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoosdc/ObjectCacher: handle zero bufferheads on read
Sage Weil [Fri, 26 Oct 2012 18:55:34 +0000 (11:55 -0700)]
osdc/ObjectCacher: handle zero bufferheads on read

Interpret a zero bufferhead as zeros in _readx().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: add ZERO bufferheads from map_read()
Sage Weil [Fri, 26 Oct 2012 18:54:50 +0000 (11:54 -0700)]
osdc/ObjectCacher: add ZERO bufferheads from map_read()

When we add a bufferhead with zeros to the Object data map, use the new
zero type instead of allocating actual zeros.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: add zero bufferhead state
Sage Weil [Fri, 26 Oct 2012 18:48:51 +0000 (11:48 -0700)]
osdc/ObjectCacher: add zero bufferhead state

Wired up, but not yet used.

Treat these as clean.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest_librbd_fsx: sleep before exit
Sage Weil [Fri, 26 Oct 2012 18:33:31 +0000 (11:33 -0700)]
test_librbd_fsx: sleep before exit

This gives the log time to flush to disk.  Kludgey!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: some extra debugging
Sage Weil [Fri, 26 Oct 2012 18:32:44 +0000 (11:32 -0700)]
osdc/ObjectCacher: some extra debugging

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: fill in zero buffers in map_read() on miss if complete
Sage Weil [Wed, 24 Oct 2012 21:42:50 +0000 (14:42 -0700)]
osdc/ObjectCacher: fill in zero buffers in map_read() on miss if complete

If we know we have the complete object in cache, fill in zero buffers
when we miss.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: improve debug output for readx()
Sage Weil [Wed, 24 Oct 2012 21:43:03 +0000 (14:43 -0700)]
osdc/ObjectCacher: improve debug output for readx()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: set complete flag when we observe ENOENT
Sage Weil [Wed, 24 Oct 2012 21:41:38 +0000 (14:41 -0700)]
osdc/ObjectCacher: set complete flag when we observe ENOENT

If we observe an ENOENT on a read, set the complete flag.  Any dirty
buffers we have will still be in memory, even if the write are in flight,
because the TX state remains pinned until the writes commit.  Writes cannot
proceed faster than reads, even though reads may proceed faster than
writes.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: clear complete on trim, release
Sage Weil [Wed, 24 Oct 2012 21:36:05 +0000 (14:36 -0700)]
osdc/ObjectCacher: clear complete on trim, release

Clear the complete flag when we are discarding buffers.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: add complete flag
Sage Weil [Wed, 24 Oct 2012 21:35:24 +0000 (14:35 -0700)]
osdc/ObjectCacher: add complete flag

This is set when we know we have *all* the data for this object.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: refresh iterator in read apply loop
Sage Weil [Wed, 24 Oct 2012 19:48:02 +0000 (12:48 -0700)]
osdc/ObjectCacher: refresh iterator in read apply loop

The p iterator points to the next bh, but try_merge_bh() at the end of the
loop might merge that into our result and invalidate the iterator.  Fix
this by repeating the lookup on each pass through the loop.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: do read completions after assimilating read result
Sage Weil [Wed, 24 Oct 2012 19:44:25 +0000 (12:44 -0700)]
osdc/ObjectCacher: do read completions after assimilating read result

Wait until we have applied the entire read result to the cache before we
trigger any read completion events.  This is a cleaner and safer approach
since we can be sure that the callback won't get blocked again on data we
have but haven't applied yet.  It also fixes a crash I just observed where
the completion did a read, called trim(), and invalidated/destroyed the
iterator/bh p was referencing.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: do not close objects explicitly
Sage Weil [Tue, 23 Oct 2012 16:20:53 +0000 (09:20 -0700)]
osdc/ObjectCacher: do not close objects explicitly

Let the trimmer do that.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: make trim() trim Objects
Sage Weil [Tue, 23 Oct 2012 16:20:35 +0000 (09:20 -0700)]
osdc/ObjectCacher: make trim() trim Objects

Pull unpinned objects off the LRU in trim().  This never happens currently
due to all the explicit calls to close_object()...

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: check lru_is_expireable() in can_close()
Sage Weil [Tue, 23 Oct 2012 16:18:04 +0000 (09:18 -0700)]
osdc/ObjectCacher: check lru_is_expireable() in can_close()

We assert that if can_close(), the Object isn't pinned in the LRU.  This
assumes we did yur get/put refcounting properly, such that the pins are
at least as restrictive as can_close().

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: add LRU for Object
Sage Weil [Tue, 23 Oct 2012 12:58:27 +0000 (05:58 -0700)]
osdc/ObjectCacher: add LRU for Object

Incomplete; we aren't trimming yet.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: take Object ref for bh writes
Sage Weil [Tue, 23 Oct 2012 13:04:08 +0000 (06:04 -0700)]
osdc/ObjectCacher: take Object ref for bh writes

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: take refs for inflight lock ops
Sage Weil [Tue, 23 Oct 2012 13:03:09 +0000 (06:03 -0700)]
osdc/ObjectCacher: take refs for inflight lock ops

These are all dead/unused; should probably just rip out this code!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: take Object ref when there are buffers
Sage Weil [Tue, 23 Oct 2012 12:55:50 +0000 (05:55 -0700)]
osdc/ObjectCacher: take Object ref when there are buffers

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: add ref count to Object
Sage Weil [Tue, 23 Oct 2012 12:55:23 +0000 (05:55 -0700)]
osdc/ObjectCacher: add ref count to Object

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosdc/ObjectCacher: rename lru_* -> bh_lru_*
Sage Weil [Tue, 23 Oct 2012 12:42:37 +0000 (05:42 -0700)]
osdc/ObjectCacher: rename lru_* -> bh_lru_*

We'll be adding LRUs for objects, too.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: fix race in AioCompletion that are still being built
Sage Weil [Fri, 26 Oct 2012 18:30:06 +0000 (11:30 -0700)]
librbd: fix race in AioCompletion that are still being built

When caching is enabled, it is possible for the io completion to happen
faster than we call ->finish_adding_requests() (e.g., on cache read).
When that happens, the final read request completion doesn't see a
pending_count == 0 and thus doesn't do all the final buffer construction
that is necessary to return correct data.  In particular, users will see
zeroed buffers.  test_librbd_fsx is turning this up consistently after
several thousand ops with an image size of ~100MB and cloning disabled.

This was introduced with the extra logic added here with striping.

Fix this by making a separate flag to indicate the completion is under
construction, and make sure we call complete() when both pending_count==0
and building==false.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMerge branch 'wip-msgauth4'
Peter Reiher [Fri, 26 Oct 2012 16:25:15 +0000 (09:25 -0700)]
Merge branch 'wip-msgauth4'

Conflicts:
src/common/config_opts.h
Added a couple of options related to session authentication, accepted new values for option from master

12 years agoMerge branch 'wip-client-unmount'
Noah Watkins [Fri, 26 Oct 2012 16:07:19 +0000 (09:07 -0700)]
Merge branch 'wip-client-unmount'

Signed-off-by: Noah Watkins <noah.watkins@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoVarious cleanup changes to session authentication code.
Peter Reiher [Fri, 26 Oct 2012 15:57:29 +0000 (08:57 -0700)]
Various cleanup changes to session authentication code.

Signed-off-by: Peter Reiher <reiher@inktank.com>
12 years agoclient: add ceph_release, ceph_shutdown
Noah Watkins [Thu, 25 Oct 2012 20:00:05 +0000 (13:00 -0700)]
client: add ceph_release, ceph_shutdown

Notes that ceph_shutdown() is now deprecated.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoclient: double mount returns -EISCONN
Noah Watkins [Thu, 25 Oct 2012 19:04:00 +0000 (12:04 -0700)]
client: double mount returns -EISCONN

Change error code from -EDOM to -EISCONN when mounting an already
mounted ceph_mount_info instance.  The current convention is to return
-ENOTCONN when using the libcephfs interface in an unmounted state.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
12 years agoMerge branch 'wip-mds'
Sage Weil [Fri, 26 Oct 2012 03:49:25 +0000 (20:49 -0700)]
Merge branch 'wip-mds'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoclient: do not reset session state on reopened sessions
Sage Weil [Sun, 21 Oct 2012 21:54:23 +0000 (14:54 -0700)]
client: do not reset session state on reopened sessions

We can have a sequence one the MDS like:

 - queue REQUEST_CLOSE to journal
 - force_open, queue open to journal
 - request_close acked, do nothing
 - force_open acked, send OPEN

In this case, the MDS never actually closed the session, and all of the
state remained valid.  The client, however, gets a suprious OPEN
message and resets the session state.

Fix this by not resetting that state.

A nicer fix might be to not send the second OPEN at all, but that would
require a REOPENING state on the MDS which is more complicated; this is
good enough.  Also, that approach might not give the client an
appropriate opportunity to say "um, no..." and resend the
REQUEST_CLOSE.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: fix handling of cache_expire export
Sage Weil [Sun, 21 Oct 2012 21:22:51 +0000 (14:22 -0700)]
mds: fix handling of cache_expire export

During export, between the warning stage and the final notify, we may
get cache expire messages because the replicas are sending to both us
and the new auth.  This check should look for >= WARNING so that it
includes the EXPORTING states as well as the portion of WARNING after
we heard from that replica.  This aligns the conditional with the
following assert such that they are properly mutually exclusive.

Fixes: #1527
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: do not mark closed connections disposable
Sage Weil [Sun, 21 Oct 2012 20:50:05 +0000 (13:50 -0700)]
mds: do not mark closed connections disposable

These will get reused when the client reconnects.  If we are going to
clean these up, we need a different strategy.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: use connection on closed sessions in force_open_sessions
Sage Weil [Sun, 21 Oct 2012 16:58:44 +0000 (09:58 -0700)]
mds: use connection on closed sessions in force_open_sessions

If the have a Connection*, use it.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: update copyright to include contributors, CC
Ross Turk [Fri, 26 Oct 2012 00:51:04 +0000 (17:51 -0700)]
doc: update copyright to include contributors, CC

Signed-off-by: Ross Turk <ross@inktank.com>
12 years agoMerge branch 'next'
Sage Weil [Thu, 25 Oct 2012 19:00:02 +0000 (12:00 -0700)]
Merge branch 'next'

12 years agoosd: fix populate_obc_watchers() assert
Sage Weil [Thu, 25 Oct 2012 00:00:01 +0000 (17:00 -0700)]
osd: fix populate_obc_watchers() assert

There is one case where populate_obc_watchers gets called when the object
is missing: during a revert.  And in that case we *should* do the populate,
since all that is getting reverted is the object version.

Fixes: #3405
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agomds: check getcwd() return value
Sage Weil [Thu, 25 Oct 2012 04:34:42 +0000 (21:34 -0700)]
mds: check getcwd() return value

warning: mds/MDS.cc:1586:27: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoleveldb: fix accidental submodule revert
Sage Weil [Thu, 25 Oct 2012 00:04:42 +0000 (17:04 -0700)]
leveldb: fix accidental submodule revert

a5eb72ba01bc74886170f2f6b97278ba5fc251d1

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: note raw format required for openstack/rbd
Josh Durgin [Wed, 24 Oct 2012 23:19:21 +0000 (16:19 -0700)]
doc: note raw format required for openstack/rbd

A couple people have been confused by this omission.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agomds: fix #include for getcwd(), simplify
Sage Weil [Wed, 24 Oct 2012 16:38:58 +0000 (09:38 -0700)]
mds: fix #include for getcwd(), simplify

Always use getcwd().. it's more portable.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added hyperlink.
John Wilkins [Wed, 24 Oct 2012 16:27:34 +0000 (09:27 -0700)]
doc: Added hyperlink.

fixes: #3393

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Fixed usage and deleted legacy values.
John Wilkins [Wed, 24 Oct 2012 16:14:12 +0000 (09:14 -0700)]
doc: Fixed usage and deleted legacy values.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agovstart.sh: Use ./init-ceph instead of CEPH_BIN
Sam Lang [Tue, 23 Oct 2012 21:21:02 +0000 (16:21 -0500)]
vstart.sh:  Use ./init-ceph instead of CEPH_BIN

This effectively reverts faddb80c4230acad2b4a17aa6cbf0c30ae8d24a9
which prevented vstart.sh from being used in an enviroment where
CEPH_BIN pointed to a make install target.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoScript that generates perl wrapper for teuthology tests
tamil [Tue, 23 Oct 2012 20:08:20 +0000 (13:08 -0700)]
Script that generates perl wrapper for teuthology tests

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agorgw_admin: do not throw error when start-date and end-date are not
caleb miles [Tue, 23 Oct 2012 17:36:53 +0000 (13:36 -0400)]
rgw_admin: do not throw error when start-date and end-date are not
passed to usage::trim()

Signed-off-by: caleb miles <caleb.miles@inktank.com>
12 years agoMerge branch 'wip-assert-exists-2'
Sage Weil [Tue, 23 Oct 2012 12:37:54 +0000 (05:37 -0700)]
Merge branch 'wip-assert-exists-2'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoosd/osd_types: make stat osd_op print nicely
Sage Weil [Tue, 23 Oct 2012 00:57:32 +0000 (17:57 -0700)]
osd/osd_types: make stat osd_op print nicely

No 0~0 crap.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: use assert_exists() to simplify copyup check
Sage Weil [Tue, 23 Oct 2012 00:57:08 +0000 (17:57 -0700)]
librbd: use assert_exists() to simplify copyup check

Previously we would explicitly STAT the object to see if it exists before
sending the write to the OSD.  Instead, send the write optimistically, and
assert that the object already exists.  This avoids an extra round trip in
the optimistic/common case, and makes the existence check in the initial
first-write case more expensive because we send the data payload along.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrados: add assert_exists guard operation
Sage Weil [Tue, 23 Oct 2012 00:51:11 +0000 (17:51 -0700)]
librados: add assert_exists guard operation

Add a guard operation for writes that asserts that the object already
exists.  To avoid requiring new functionality on the OSD side, implement
this by including a STAT operation, and discard the results on the
client side.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: validate copy size against proper snapshot id
Dan Mick [Tue, 23 Oct 2012 03:31:33 +0000 (20:31 -0700)]
librbd: validate copy size against proper snapshot id

Fixes: #3383
Signed-off-by: Dan Mick <dan.mick@inktank.com>
12 years agoosd: return EOPNOTSUPP on bad class or method name
Sage Weil [Tue, 23 Oct 2012 00:30:37 +0000 (17:30 -0700)]
osd: return EOPNOTSUPP on bad class or method name

Currently we return EIO, which isn't particularly informative.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoleveldb: fix accidental revert
Sage Weil [Tue, 23 Oct 2012 00:25:03 +0000 (17:25 -0700)]
leveldb: fix accidental revert

In b85cde576e3444b10c275526ecf43b73bd21afe5

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agorgw: dump an error message if FCGX_Accept fails
Yehuda Sadeh [Mon, 22 Oct 2012 23:52:11 +0000 (16:52 -0700)]
rgw: dump an error message if FCGX_Accept fails

Adding missing debug info.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoworkqueue: make debug output include active threads
Sage Weil [Mon, 22 Oct 2012 22:38:30 +0000 (15:38 -0700)]
workqueue: make debug output include active threads

Include active thread count in threadpool debug output.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-msgr'
Sage Weil [Mon, 22 Oct 2012 21:47:24 +0000 (14:47 -0700)]
Merge branch 'wip-msgr'

12 years agomsg/Pipe: fix tight reconnect loop on connect failure
Sage Weil [Mon, 22 Oct 2012 21:14:09 +0000 (14:14 -0700)]
msg/Pipe: fix tight reconnect loop on connect failure

The fault() call in connect should not set onread=true since connect is
effectively a write path.  This was forcing the writer() into a tight
loop that repeatedly would call connect(); not very polite.

Changing that, we want to avoid treating this as a normal fault (with the
failure callback) and instead back off.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agothrottle: less default log noise
Sage Weil [Mon, 22 Oct 2012 21:41:35 +0000 (14:41 -0700)]
throttle: less default log noise

This tends to drown out anything interesting in the log buffer.

Signed-off-by: Sage Weil <sage@inktank.com>