]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agotest/rados-api/aio: fix uninit ptr
Sage Weil [Fri, 24 Aug 2012 23:19:26 +0000 (16:19 -0700)]
test/rados-api/aio: fix uninit ptr

Coverity cid #717392
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: fix uninitialized scalar in constructor
Sage Weil [Fri, 24 Aug 2012 23:18:04 +0000 (16:18 -0700)]
cephtool: fix uninitialized scalar in constructor

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/Object: comment out dead code
Sage Weil [Fri, 24 Aug 2012 23:16:24 +0000 (16:16 -0700)]
test/Object: comment out dead code

Coverity cid #717397
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: fix unused value
Sage Weil [Fri, 24 Aug 2012 23:15:23 +0000 (16:15 -0700)]
mds: fix unused value

This value was never used before it was clobbered.

Coverity cid #717398
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: drop unused value
Sage Weil [Fri, 24 Aug 2012 23:13:37 +0000 (16:13 -0700)]
mds: drop unused value

Coverity cid #717400
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agofiler: add missing return
Sage Weil [Fri, 24 Aug 2012 23:12:06 +0000 (16:12 -0700)]
filer: add missing return

Coverity cid 717404
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorgw: fix use-after-free
Sage Weil [Fri, 24 Aug 2012 23:11:16 +0000 (16:11 -0700)]
rgw: fix use-after-free

Coverity cid 717405
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest_librbd: add missing va_end()
Sage Weil [Fri, 24 Aug 2012 23:09:32 +0000 (16:09 -0700)]
test_librbd: add missing va_end()

Coverity cid 717407
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-rbd-children'
Josh Durgin [Thu, 30 Aug 2012 23:06:37 +0000 (16:06 -0700)]
Merge branch 'wip-rbd-children'

13 years agodoc: clarify rbd man page (esp. layering)
Josh Durgin [Thu, 30 Aug 2012 00:30:17 +0000 (17:30 -0700)]
doc: clarify rbd man page (esp. layering)

* a clone's size can't be overridden
* note which commands require format 2
* clarify details of copy
* add examples for cloning
* add pool to map example for consistency
* fix a couple warnings and re-sync man page with rst

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: add --format option
Josh Durgin [Wed, 29 Aug 2012 17:58:30 +0000 (10:58 -0700)]
rbd: add --format option

This chooses whether to use the original (supported by krbd)
or the new (supports layering) format.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoclient: renew/submit subs on startup
Sage Weil [Thu, 30 Aug 2012 21:03:11 +0000 (14:03 -0700)]
client: renew/submit subs on startup

This fixes a delay in getting the initial MDSMap during startup (we wait
for the MonClient tick()).

Reported-by: Noah Watkins <jayhawk@cs.ucsc.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
13 years ago:doc: Added constraints and revised a description per joshd.
John Wilkins [Thu, 30 Aug 2012 18:48:47 +0000 (11:48 -0700)]
:doc: Added constraints and revised a description per joshd.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agoupstart, ceph-create-keys: Make client.admin key generation automatic.
Tommi Virtanen [Thu, 30 Aug 2012 14:16:52 +0000 (10:16 -0400)]
upstart, ceph-create-keys: Make client.admin key generation automatic.

This should help simplify Chef etc deployments. Now (when using the
Upstart jobs), when a ceph-mon is started, ceph-create-admin-key is
triggered. If /etc/ceph/$cluster.client.admin.keyring already exists,
it does nothing; otherwise, it waits for ceph-mon to reach quorum, and
then does a "ceph auth get-or-create" to create the key, and writes it
atomically to disk.

The equivalent code can be removed from the Chef cookbook once this is
in.

13 years agoupstart: Make instance jobs export their cluster and id variables.
Tommi Virtanen [Thu, 30 Aug 2012 14:11:09 +0000 (10:11 -0400)]
upstart: Make instance jobs export their cluster and id variables.

This allows other jobs listening to Upstart "started ceph-mon" events
to see what instance started.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
13 years agoconfig: Add a per-name default keyring to front of keyring search path.
Tommi Virtanen [Thu, 30 Aug 2012 14:21:29 +0000 (10:21 -0400)]
config: Add a per-name default keyring to front of keyring search path.

This lets us have e.g. /etc/ceph/ceph.client.admin.keyring that is
owned by root:admin and mode u=rw,g=r,o= without making every non-root
run of the command line tools complain and fail.

This is what the Chef cookbook has been doing for a while already.

13 years agodoc: Modified index page with table. Pools and Auth will go to Ops.
John Wilkins [Thu, 30 Aug 2012 07:38:01 +0000 (00:38 -0700)]
doc: Modified index page with table. Pools and Auth will go to Ops.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Some improvements. This still needs review.
John Wilkins [Thu, 30 Aug 2012 07:37:02 +0000 (00:37 -0700)]
doc: Some improvements. This still needs review.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added additional note to mount data disk to data path.
John Wilkins [Thu, 30 Aug 2012 07:35:31 +0000 (00:35 -0700)]
doc: Added additional note to mount data disk to data path.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a document for general config settings.
John Wilkins [Thu, 30 Aug 2012 07:33:58 +0000 (00:33 -0700)]
doc: Added a document for general config settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a doc for filestore settings.
John Wilkins [Thu, 30 Aug 2012 07:29:14 +0000 (00:29 -0700)]
doc: Added a doc for filestore settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added a document for RBD cache settings.
John Wilkins [Thu, 30 Aug 2012 07:28:29 +0000 (00:28 -0700)]
doc: Added a document for RBD cache settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added substantial detail to OSD setting descriptions.
John Wilkins [Thu, 30 Aug 2012 07:26:38 +0000 (00:26 -0700)]
doc: Added substantial detail to OSD setting descriptions.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: minor edit to use # for comments.
John Wilkins [Thu, 30 Aug 2012 07:25:17 +0000 (00:25 -0700)]
doc: minor edit to use # for comments.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Restructured ceph config. Added network and OSD config details.
John Wilkins [Thu, 30 Aug 2012 07:24:26 +0000 (00:24 -0700)]
doc: Restructured ceph config. Added network and OSD config details.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agolibrbd: prevent racing clone and snap unprotect
Josh Durgin [Wed, 29 Aug 2012 00:24:47 +0000 (17:24 -0700)]
librbd: prevent racing clone and snap unprotect

If the following sequence of events occured,
a clone could be created of an unprotected snapshot:

1. A: begin clone - check that snap foo is protected
2. B: rbd unprotect snap foo
3. B: check that all pools have no clones of foo
4. B: unprotect snap foo
5. A: finish creating clone of foo, add it as a child

To stop this from happening, check at the beginning and end of
cloning that the parent snapshot is protected. If it is not,
or checking protection status fails (possibly because the parent
snapshot was removed), remove the clone and return an error.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: add "children" command, update cli test files
Dan Mick [Tue, 21 Aug 2012 23:07:25 +0000 (16:07 -0700)]
rbd: add "children" command, update cli test files

Fixes: #2720
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: add {rbd_}list_children() methods
Dan Mick [Tue, 21 Aug 2012 22:58:21 +0000 (15:58 -0700)]
librbd: add {rbd_}list_children() methods

These iterate over all pools and check for children of a
particular snapshot.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
13 years agorgw: remove unused block of code
Yehuda Sadeh [Wed, 29 Aug 2012 21:20:38 +0000 (14:20 -0700)]
rgw: remove unused block of code

We were reading bucket info, but that wasn't necessary.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorgw_admin.cc: Prevent clobbering the index when linking a bucket.
caleb miles [Tue, 28 Aug 2012 17:41:42 +0000 (10:41 -0700)]
rgw_admin.cc: Prevent clobbering the index when linking a bucket.

Prevent the 'bucket link' command from overwriting the index of an
existing bucket. Corrects bug 2935:

http://tracker.newdream.net/issues/2935

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agorgw: clear usage map before reading usage
Yehuda Sadeh [Tue, 28 Aug 2012 23:17:21 +0000 (16:17 -0700)]
rgw: clear usage map before reading usage

Fixes: #3057
Since we read usage in chunks we need to clear the
usage map before reading the next chunk, otherwise
we're going to aggregate the old data as well.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Tue, 28 Aug 2012 22:15:08 +0000 (15:15 -0700)]
Merge branch 'next'

13 years agoosd: fix waiting_for_disk assertion
Sage Weil [Tue, 28 Aug 2012 22:14:41 +0000 (15:14 -0700)]
osd: fix waiting_for_disk assertion

If requeue is false, we won't have cleared out waiting_for_ondisk; adjust
assert placement as appropriate.  Also, make sur we handle the requeue
and !op case properly (although I'm not sure offhand if/when it would
come up).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agorados_bench: wait for completion callbacks before returning
Mike Ryan [Tue, 28 Aug 2012 18:57:03 +0000 (11:57 -0700)]
rados_bench: wait for completion callbacks before returning

If we don't wait for the callback, the finisher may cleanup the callback
context before the callback is actually invoked, causing a
use-after-free error.

This fixes #3048.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoMakefile.am: add missing .h
Yehuda Sadeh [Tue, 28 Aug 2012 21:13:53 +0000 (14:13 -0700)]
Makefile.am: add missing .h

Was missing rgw_html_errors.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoMerge remote-tracking branch 'origin/wip-multi-delete'
Yehuda Sadeh [Tue, 28 Aug 2012 20:36:35 +0000 (13:36 -0700)]
Merge remote-tracking branch 'origin/wip-multi-delete'

Conflicts:
src/Makefile.am

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorados_bench: wait for completion callbacks before returning
Mike Ryan [Tue, 28 Aug 2012 18:57:03 +0000 (11:57 -0700)]
rados_bench: wait for completion callbacks before returning

If we don't wait for the callback, the finisher may cleanup the callback
context before the callback is actually invoked, causing a
use-after-free error.

This fixes #3048.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agodoc: Completed and reviewed RGW config reference.
John Wilkins [Tue, 28 Aug 2012 20:25:44 +0000 (13:25 -0700)]
doc: Completed and reviewed RGW config reference.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: added admonishment. Updated header syntax, copy semantics and x-ref.
John Wilkins [Tue, 28 Aug 2012 20:24:29 +0000 (13:24 -0700)]
doc: added admonishment. Updated header syntax, copy semantics and x-ref.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agorgw: fix usage log read
Yehuda Sadeh [Tue, 28 Aug 2012 19:51:55 +0000 (12:51 -0700)]
rgw: fix usage log read

The usage log read got broken in a recent cleanup work.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agodoc: Added internal references. Clarified language in disk prepare.
John Wilkins [Tue, 28 Aug 2012 18:41:59 +0000 (11:41 -0700)]
doc: Added internal references. Clarified language in disk prepare.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: added sudo for hdparm command.
John Wilkins [Tue, 28 Aug 2012 18:02:13 +0000 (11:02 -0700)]
doc: added sudo for hdparm command.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: added internal hyperlink targets.
John Wilkins [Tue, 28 Aug 2012 17:55:04 +0000 (10:55 -0700)]
doc: added internal hyperlink targets.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Clean up quick start to ensure nobody uses "localhost".
John Wilkins [Tue, 28 Aug 2012 17:01:20 +0000 (10:01 -0700)]
doc: Clean up quick start to ensure nobody uses "localhost".

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Cleaned up syntax errors, and converted table to list.
John Wilkins [Tue, 28 Aug 2012 16:24:22 +0000 (09:24 -0700)]
doc: Cleaned up syntax errors, and converted table to list.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Tue, 28 Aug 2012 00:44:53 +0000 (17:44 -0700)]
Merge branch 'next'

13 years agoMerge branch 'wip-objecter' into next
Sage Weil [Tue, 28 Aug 2012 00:26:13 +0000 (17:26 -0700)]
Merge branch 'wip-objecter' into next

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjecter: fix skipped map handling
Sage Weil [Mon, 27 Aug 2012 15:24:08 +0000 (08:24 -0700)]
objecter: fix skipped map handling

If we skip a map, we want to translate NO_ACTION to NEED_RESEND, but leave
POOL_DNE alone.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoobjecter: send queued requests when we get first osdmap
Sage Weil [Mon, 27 Aug 2012 14:38:34 +0000 (07:38 -0700)]
objecter: send queued requests when we get first osdmap

If we get our first osdmap and already have requests queued, send them.

Fixes: #3050
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoobjecter: fix is_latest_map() retry on mon session restart
Sage Weil [Mon, 27 Aug 2012 04:21:44 +0000 (21:21 -0700)]
objecter: fix is_latest_map() retry on mon session restart

If the mon session drops, we get an EAGAIN callback, which we already
correctly ignored.  (Clean this up and comment so it's clearer what is
going on.)

Fix ms_handle_connect() to resubmit those requests.

Noticed while fixing #3049.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonclient: pass EAGAIN to is_latest_map() callers
Sage Weil [Mon, 27 Aug 2012 04:17:05 +0000 (21:17 -0700)]
monclient: pass EAGAIN to is_latest_map() callers

If our map get_version check needs to be retried, tell the
is_latest_map() callers instead of giving returning 0 ("no").

Fixes: #3049
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonclient: document get_version(), and fix return value
Sage Weil [Tue, 28 Aug 2012 00:25:54 +0000 (17:25 -0700)]
monclient: document get_version(), and fix return value

Return -EAGAIN instead of -1, since that's more meaningful, and
document it.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoImplement multi-object delete.
caleb miles [Tue, 28 Aug 2012 00:08:44 +0000 (17:08 -0700)]
Implement multi-object delete.

An implimentation of multi-object delete described in
the latest Amazon S3 API provied at

http://docs.amazonwebservices.com/AmazonS3/latest/API

This commit is in response to tracker issue 2797

http://tracker.newdream.net/issues/2797

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agoosd: requeue dup ops inline with in-progress ops
Sage Weil [Mon, 27 Aug 2012 21:31:32 +0000 (14:31 -0700)]
osd: requeue dup ops inline with in-progress ops

We should requeue the dups along with the originals.  This avoids
situations where, after requeue, the dups are reordered with respect to
each other.  For example:

 - client sends A, B, C
 - osd receives A
 - connection drops
 - client sends A', B', C'
 - osd puts A' in waiting_for_ondisk, starts B' and C'
 - on_change() requeues everything

Final queue order (before this patch) is
    A, B', C', A'

After this patch, the resulting queue order is
    A, A', B', C'

Or somewhat more generally, it might be:

    A, A', B, B', B'', C', C'', D'', ....

Fixes (another source of): #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-mon-intparsing'
Sage Weil [Mon, 27 Aug 2012 22:10:35 +0000 (15:10 -0700)]
Merge remote-tracking branch 'gh/wip-mon-intparsing'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoosd: include notif pointer in notify debug output
Sage Weil [Fri, 24 Aug 2012 00:08:20 +0000 (17:08 -0700)]
osd: include notif pointer in notify debug output

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoconfig: add 'fatal signal handlers' option
Sage Weil [Thu, 23 Aug 2012 16:37:37 +0000 (09:37 -0700)]
config: add 'fatal signal handlers' option

This will let us disable the sighandlers for SEGV, etc.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocls_rgw_client: fix #include path
Sage Weil [Mon, 27 Aug 2012 21:41:01 +0000 (14:41 -0700)]
cls_rgw_client: fix #include path

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'origin/master' into wip-gc2
Yehuda Sadeh [Mon, 27 Aug 2012 19:43:27 +0000 (12:43 -0700)]
Merge remote-tracking branch 'origin/master' into wip-gc2

13 years agocls_rgw: add cls_rgw unitest, test gc api
Yehuda Sadeh [Mon, 27 Aug 2012 18:19:27 +0000 (11:19 -0700)]
cls_rgw: add cls_rgw unitest, test gc api

Test various cls_rgw gc related functionality.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorgw-admin: get rid of lazy remove option, other fixes
Yehuda Sadeh [Tue, 21 Aug 2012 22:44:30 +0000 (15:44 -0700)]
rgw-admin: get rid of lazy remove option, other fixes

was mishandling parsing of binary flag arguments.
also, fix argument parsing and update radosgw-admin
cli test reference.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agorgw: implement garbage collector
Yehuda Sadeh [Tue, 21 Aug 2012 22:05:38 +0000 (15:05 -0700)]
rgw: implement garbage collector

Add a garbage collector thread that is responsible for clean
up of clutter. When removing an object, store info about the
leftovers in a special gc map (via rgw objclass). A new
radosgw-admin commands to list objects in gc, and to run the
gc process manually. Also, gc processors can run in parallel,
however, each will handle a single gc shard (synchronized
using lock objclass).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agomon: make parse_pos_long() error message more helpful
Sage Weil [Mon, 27 Aug 2012 15:36:41 +0000 (08:36 -0700)]
mon: make parse_pos_long() error message more helpful

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: turn off lockdep during shutdown signal handler
Sage Weil [Sun, 26 Aug 2012 15:42:06 +0000 (08:42 -0700)]
osd: turn off lockdep during shutdown signal handler

We don't shut down all threads, and the surviving ones fight with
exit()'s teardown.  Kludge until we have a clean shutdown process.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge tag 'v0.51'
Sage Weil [Sun, 26 Aug 2012 15:18:45 +0000 (08:18 -0700)]
Merge tag 'v0.51'

v0.51

13 years agov0.51 v0.51
Sage Weil [Sat, 25 Aug 2012 22:58:39 +0000 (15:58 -0700)]
v0.51

13 years agomon: require --id
Sage Weil [Mon, 20 Aug 2012 20:12:26 +0000 (13:12 -0700)]
mon: require --id

Fixes: #2997
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: fix int parsing in monmon
Sage Weil [Fri, 24 Aug 2012 23:05:07 +0000 (16:05 -0700)]
mon: fix int parsing in monmon

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: check for int parsing errors in mdsmon
Sage Weil [Fri, 24 Aug 2012 23:03:02 +0000 (16:03 -0700)]
mon: check for int parsing errors in mdsmon

Fixes: #3014
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: check for int parsing errors in osdmon
Sage Weil [Fri, 24 Aug 2012 23:02:02 +0000 (16:02 -0700)]
mon: check for int parsing errors in osdmon

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agointerval_set: predeclare const_iterator
Sage Weil [Fri, 24 Aug 2012 21:55:12 +0000 (14:55 -0700)]
interval_set: predeclare const_iterator

This makes the coverity build happier.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMakefile: update coverity rules
Sage Weil [Fri, 24 Aug 2012 21:54:51 +0000 (14:54 -0700)]
Makefile: update coverity rules

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrbd-dev.install: package new rbd/features.h header file.
Gary Lowell [Fri, 24 Aug 2012 22:16:05 +0000 (15:16 -0700)]
librbd-dev.install: package new rbd/features.h header file.

13 years agomon: describe how pgs are stuck in 'health detail'
Sage Weil [Fri, 24 Aug 2012 21:43:56 +0000 (14:43 -0700)]
mon: describe how pgs are stuck in 'health detail'

Showing the current state and saying it is stuck doesn't tell you how it
is stuck (e.g. stuck unclean, stuck inactive, etc.).  Also include the
stuck duration.

Fixes: #2876
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Fri, 24 Aug 2012 21:38:58 +0000 (14:38 -0700)]
Merge branch 'next'

13 years agoosd: fix use-after-free in handle_notify_timeout
Sage Weil [Fri, 24 Aug 2012 18:16:01 +0000 (11:16 -0700)]
osd: fix use-after-free in handle_notify_timeout

Valgrind turned this up.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoceph.spec.in: package new rados library.
Gary Lowell [Fri, 24 Aug 2012 04:35:21 +0000 (21:35 -0700)]
ceph.spec.in: package new rados library.

13 years agoMerge remote-tracking branch 'gh/wip-mon-report'
Sage Weil [Thu, 23 Aug 2012 23:11:58 +0000 (16:11 -0700)]
Merge remote-tracking branch 'gh/wip-mon-report'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip_rados_bench_really_final'
Sage Weil [Thu, 23 Aug 2012 23:07:32 +0000 (16:07 -0700)]
Merge remote-tracking branch 'gh/wip_rados_bench_really_final'

Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agoobj_bencher: use async remove during slow remove-by-prefix
Mike Ryan [Thu, 21 Jun 2012 18:03:15 +0000 (11:03 -0700)]
obj_bencher: use async remove during slow remove-by-prefix

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoobj_bencher: remove all benchmark files matching a prefix
Mike Ryan [Tue, 24 Jul 2012 03:45:31 +0000 (20:45 -0700)]
obj_bencher: remove all benchmark files matching a prefix

This is a fallback for when a user wishes to delete ALL benchmark files
matching a particular prefix. In the fast case, a metadata file tells us
enough to quickly delete the files in parallel. This is the slow case,
where each file's name must be checked against the prefix.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoobj_bencher: cleanup files in parallel using aio
Mike Ryan [Thu, 23 Aug 2012 18:52:51 +0000 (11:52 -0700)]
obj_bencher: cleanup files in parallel using aio

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoobj_bencher: remove benchmark objects by prefix
Mike Ryan [Thu, 21 Jun 2012 17:08:53 +0000 (10:08 -0700)]
obj_bencher: remove benchmark objects by prefix

This intelligently removes objects from a rados or rest benchmark run by
using parameters from the metadata file.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoobj_bencher: store per-benchmark metadata
Mike Ryan [Wed, 20 Jun 2012 21:50:04 +0000 (14:50 -0700)]
obj_bencher: store per-benchmark metadata

Store metadata for each benchmark run so that the objects can be
efficiently removed at a later point.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoobj_bencher: clean up objects after a write benchmark
Mike Ryan [Wed, 20 Jun 2012 21:47:46 +0000 (14:47 -0700)]
obj_bencher: clean up objects after a write benchmark

Per #2477, objects created during rados or rest write benchmark are
automatically cleaned up after the test. They can optionally be left in
place.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoobj_bencher: announce prefix during write benchmark
Mike Ryan [Tue, 19 Jun 2012 20:54:40 +0000 (13:54 -0700)]
obj_bencher: announce prefix during write benchmark

Per #2477 this can be used during a post-benchmark cleanup in rest and
rados bench.

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agoDon't package crush header files.
Gary Lowell [Thu, 23 Aug 2012 18:48:50 +0000 (11:48 -0700)]
Don't package crush header files.

13 years agoceph.spec.in: package new rbd header and rados library.
Gary Lowell [Thu, 23 Aug 2012 20:40:18 +0000 (13:40 -0700)]
ceph.spec.in:  package new rbd header and rados library.

13 years agoMerge branch 'wip-msgr'
Sage Weil [Thu, 23 Aug 2012 20:29:10 +0000 (13:29 -0700)]
Merge branch 'wip-msgr'

13 years agomsg/Pipe: conditionally detect session reset
Sage Weil [Thu, 23 Aug 2012 20:26:32 +0000 (13:26 -0700)]
msg/Pipe: conditionally detect session reset

Lossless peers (osd<->osd, mds<->mds, mon<->mon) never reset sessions
to each other.  In the osd and mds cases, there is no need to check for
session resets.  More significantly, these checks can trigger with an
unfortunately sequence of socket failures.  In particular,

 - A sends connect request to B
 - B accepts, increments connect_seq, then has a socket failure
   before telling A
 - A reconnects, stil with connect_seq == 0
 - B sees connect_seq == 0 and thinks there was a reset

This warrants a closer look in the fs client <-> mds case, but for now,
in the cluster-internal communications, it is moot, since reset
detection is unnecessary.

In the monitor case: we do need to check with resets because the peers
reuse the same entity_addr_t's (nonce==0), which means that a daemon
restart is effectively a reset.  In that case, use a different policy
that continues to check for resets.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agoosd: prefer acting osds in calc_acting()
Sage Weil [Thu, 23 Aug 2012 20:27:26 +0000 (13:27 -0700)]
osd: prefer acting osds in calc_acting()

We currently prefer up osds, and then pull sequentially from peer_info
(strays we know about at the time).  This adds an additional preference
for the current acting, which means we can avoid changes to acting when
they are largely useless.

In particular, I observed that we chose [5,3] and later (when recovery
completed) chose [5,1] because we had since heard about an eligible stray
on 1.  That switch was basically a waste...

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agolibrados: implement aio_remove
Mike Ryan [Tue, 19 Jun 2012 23:56:40 +0000 (16:56 -0700)]
librados: implement aio_remove

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
13 years agorbd: force all exiting paths through main()/return
Dan Mick [Mon, 20 Aug 2012 22:02:57 +0000 (15:02 -0700)]
rbd: force all exiting paths through main()/return
This properly destroys objects.  In the process, remove usage_exit();
also kill error-handling in set_conf_param (never relevant for rbd.cc,
and if you call it with both pointers NULL, well...)
Also switch to EXIT_FAILURE for consistency.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Fixes: #2948
13 years agoMerge branch 'wip-mon-mkfs'
Sage Weil [Thu, 23 Aug 2012 19:59:28 +0000 (12:59 -0700)]
Merge branch 'wip-mon-mkfs'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agomon: name cluster uuid file 'cluster_uuid'
Sage Weil [Thu, 23 Aug 2012 19:46:40 +0000 (12:46 -0700)]
mon: name cluster uuid file 'cluster_uuid'

Begin the transition.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoobjecter: use ordered map<> for tracking tids to preserve order on resend
Sage Weil [Wed, 22 Aug 2012 04:12:33 +0000 (21:12 -0700)]
objecter: use ordered map<> for tracking tids to preserve order on resend

We are using a hash_map<> to map tids to Op*'s.  In handle_osd_map(),
we will recalc_op_target() on each Op in a random (hash) order.  These
will get put in a temp map<tid,Op*> to ensure they are resent in the
correct order, but their order on the session->ops list will be random.

Then later, if we reset an OSD connection, we will resend everything for
that session in ops order, which is be incorrect.

Fix this by explicitly reordering the requests to resend in
kick_requests(), much like we do in handle_osd_map().  This lets us
continue to use a hash_map<>, which is faster for reasonable numbers of
requests.  A simpler but slower fix would be to just use map<> instead.

This is one of many bugs contributing to #2947.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agoDon't package crush header files.
Gary Lowell [Thu, 23 Aug 2012 18:48:50 +0000 (11:48 -0700)]
Don't package crush header files.

13 years agomon: create cluster_fsid on startup if not present
Sage Weil [Mon, 20 Aug 2012 17:56:37 +0000 (10:56 -0700)]
mon: create cluster_fsid on startup if not present

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: create, verify cluster_fsid file in mon_data dir on mkfs
Sage Weil [Mon, 20 Aug 2012 17:56:14 +0000 (10:56 -0700)]
mon: create, verify cluster_fsid file in mon_data dir on mkfs

Having this present is convenient for external tools.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 23 Aug 2012 03:23:02 +0000 (20:23 -0700)]
Merge remote-tracking branch 'gh/next'