]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agolibrbd: remove the set-r-and-return idiom from some functions.
Greg Farnum [Sat, 16 Jun 2012 00:26:04 +0000 (17:26 -0700)]
librbd: remove the set-r-and-return idiom from some functions.

Josh hates this, and I have to admit it seems silly.

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agolibrbd: add cooperative image locking to the C and C++ interfaces
Greg Farnum [Thu, 14 Jun 2012 21:18:25 +0000 (14:18 -0700)]
librbd: add cooperative image locking to the C and C++ interfaces

While we're at it, increment the version number.

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agolibrbd: include the image lockers in the ImageCtx mutable metadata
Greg Farnum [Thu, 14 Jun 2012 20:43:29 +0000 (13:43 -0700)]
librbd: include the image lockers in the ImageCtx mutable metadata

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agotest: add rbd image locking tests to test_cls_rbd
Greg Farnum [Tue, 12 Jun 2012 22:12:49 +0000 (15:12 -0700)]
test: add rbd image locking tests to test_cls_rbd

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agocls_rbd_client: expose locking operations
Greg Farnum [Tue, 12 Jun 2012 22:12:19 +0000 (15:12 -0700)]
cls_rbd_client: expose locking operations

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agocls_rbd: add failure logging to all callers of read_key.
Greg Farnum [Sat, 16 Jun 2012 00:11:02 +0000 (17:11 -0700)]
cls_rbd: add failure logging to all callers of read_key.

Previously, read_key was printing out error messages when it failed.
But because some callers are fine with it failing on ENOENT, and they
all have more context anyway, it no longer does so and they need
their own logging output. Now they have it.

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agocls_rbd: add locking functions.
Greg Farnum [Tue, 12 Jun 2012 20:03:36 +0000 (13:03 -0700)]
cls_rbd: add locking functions.

Users can now place shared or exclusive locks, can remove their own
locks, can break the locks of others, and can list locks. All these
functions are considered PUBLIC_EXEC to match the other rbd methods.

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agoobjclass: allow class methods to retrieve their triggering entity_inst
Greg Farnum [Mon, 11 Jun 2012 22:36:06 +0000 (15:36 -0700)]
objclass: allow class methods to retrieve their triggering entity_inst

Signed-off-by: Greg Farnum <greg@inktank.com>
13 years agoworkunits/rbd: add workunit for running cls_rbd tests
Josh Durgin [Mon, 11 Jun 2012 05:01:19 +0000 (22:01 -0700)]
workunits/rbd: add workunit for running cls_rbd tests

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoworkunits/rbd: disable remove_with_watcher test
Josh Durgin [Mon, 11 Jun 2012 04:59:07 +0000 (21:59 -0700)]
workunits/rbd: disable remove_with_watcher test

This will fail until #2533 is fixed.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-rbd-format'
Sage Weil [Sun, 10 Jun 2012 21:12:16 +0000 (14:12 -0700)]
Merge remote-tracking branch 'gh/wip-rbd-format'

13 years agolibrbd: remove unnecessary notify from add_snap()
Josh Durgin [Sun, 10 Jun 2012 00:27:31 +0000 (17:27 -0700)]
librbd: remove unnecessary notify from add_snap()

The only caller, snapshot_add(), already does a notify when add_snap()
succeeds.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: ignore RBD_MAX_BLOCK_NAME_SIZE when generating object ids
Josh Durgin [Sun, 10 Jun 2012 00:16:45 +0000 (17:16 -0700)]
librbd: ignore RBD_MAX_BLOCK_NAME_SIZE when generating object ids

The actual data object ids don't need to be artificially restricted in
length.  RBD_MAX_BLOCK_NAME_SIZE just limits the size of the object
prefix, since it's used in rbd_info_t.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoworkunits/rbd: allow creating images in different formats
Josh Durgin [Fri, 8 Jun 2012 15:43:43 +0000 (08:43 -0700)]
workunits/rbd: allow creating images in different formats

This will allow adding more arguments for testing combinations
of features in the future.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorados: add commands to interact with object maps
Josh Durgin [Fri, 8 Jun 2012 15:40:27 +0000 (08:40 -0700)]
rados: add commands to interact with object maps

The input values are stored as-is, and any values read are dumped in
hex. Rename listomap to listomapkeys to distinguish from
listomapvalues. Also add it to the man page.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agotest_librbd, test_rbd.py: optionally use the new format
Josh Durgin [Fri, 8 Jun 2012 15:31:14 +0000 (08:31 -0700)]
test_librbd, test_rbd.py: optionally use the new format

Read the desired features from an environment variable, RBD_FEATURES.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd.py: add support for creating images in the new format
Josh Durgin [Fri, 8 Jun 2012 15:09:35 +0000 (08:09 -0700)]
rbd.py: add support for creating images in the new format

The new arguments are optional, so they are backwards compatible.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: update for the new format
Josh Durgin [Fri, 8 Jun 2012 15:07:40 +0000 (08:07 -0700)]
rbd: update for the new format

No features exist right now, so there are no extra options for them.
The old format is still used by default, and since the default will
change with layering, --new-format will be removed at that point and is
intentionally left undocumented.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: add create2 to create an image with the new format
Josh Durgin [Fri, 8 Jun 2012 14:43:32 +0000 (07:43 -0700)]
librbd: add create2 to create an image with the new format

This will fail if features are requested that the client or server
does not support. Currently there are no features defined, so
zero is the only valid value.

copy() preserves the format and features of the source image.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agodoc: Segregated set up git from clone.
John Wilkins [Sat, 9 Jun 2012 21:45:05 +0000 (14:45 -0700)]
doc: Segregated set up git from clone.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodebian: ceph depends on python
Sage Weil [Sat, 9 Jun 2012 05:10:43 +0000 (22:10 -0700)]
debian: ceph depends on python

Due to the new ceph-disk-* scripts.  Newer dists are smart enough to figure
this out, but maverick is not.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: add 'auth get-or-create' variant that outputs a keyring
Sage Weil [Wed, 23 May 2012 01:54:10 +0000 (18:54 -0700)]
mon: add 'auth get-or-create' variant that outputs a keyring

This is more convenient when you're creating daemons, since you want to
write out a keyring file for them.  This lets you do it in a single
command.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agolibrbd: use ImageCtx members instead of the old header in resize()
Josh Durgin [Fri, 8 Jun 2012 14:56:59 +0000 (07:56 -0700)]
librbd: use ImageCtx members instead of the old header in resize()

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: validate order before creating an image
Josh Durgin [Fri, 8 Jun 2012 14:55:52 +0000 (07:55 -0700)]
librbd: validate order before creating an image

The value must be passed, and it shouldn't be below 4k
(enforced by the command line tool already) or above the
range expressible in the header.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: rename md_oid parameters to header_oid
Josh Durgin [Fri, 8 Jun 2012 14:54:02 +0000 (07:54 -0700)]
librbd: rename md_oid parameters to header_oid

This is more consistent with the rest of the code now,
and is a bit more clear.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: make rename work with any header format
Josh Durgin [Fri, 8 Jun 2012 14:53:07 +0000 (07:53 -0700)]
librbd: make rename work with any header format

Instead of interpreting the header, just copy all the data and
omap values from the original header to the newly name one.
This will continue working with future header changes.

We can create the new header and write all data and omap values
to it atomically to avoid some races.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: use cls_client functions for calling class methods
Josh Durgin [Fri, 8 Jun 2012 14:49:04 +0000 (07:49 -0700)]
librbd: use cls_client functions for calling class methods

Use the old or new methods make resize, snapshot add and snapsnhot
remove work with both old and new formats.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: remove on-disk header argument from helper functions
Josh Durgin [Fri, 8 Jun 2012 07:05:41 +0000 (00:05 -0700)]
librbd: remove on-disk header argument from helper functions

Make most of them take the parameters they actually use.
trim_image() now takes an ImageCtx, which means remove() must
open the image. This has the nice side effect of not duplicating
the snapshot listing code for the old format.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: check that the current snapid for a snap name matches
Josh Durgin [Fri, 8 Jun 2012 15:04:12 +0000 (08:04 -0700)]
librbd: check that the current snapid for a snap name matches

Checking that it exists doesn't prevent you from having the snapshot
change out from under you in the following situation:

You have the image open at snapshot "foo".
Someone removes snapshot "foo", writes some data to the image, and
creates a new snapshot called "foo".

This second snapshot will have a different id, but nothing prevents it
from having the name of a previously deleted snapshot.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: update ictx_refresh to work with both formats
Josh Durgin [Fri, 8 Jun 2012 15:01:19 +0000 (08:01 -0700)]
librbd: update ictx_refresh to work with both formats

It now sets the member variables of ImageCtx so other functions
don't have to use the on-disk header. If the features use by
the new format are incompatible with this client, an error is returned.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: Update ImageCtx for new format
Josh Durgin [Fri, 8 Jun 2012 06:14:17 +0000 (23:14 -0700)]
librbd: Update ImageCtx for new format

Detect the format when an image is opened by the presence of the
original format header object. Use member variables of ImageCtx to
store image metadata instead of the on-disk header format
ImageCtx::header.

This lays the foundation for changing the rest of librbd to work with
old and new formats.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agocls_rbd: add methods for interacting with the new header format
Josh Durgin [Fri, 8 Jun 2012 05:54:45 +0000 (22:54 -0700)]
cls_rbd: add methods for interacting with the new header format

Add the client side (cls_rbd_client) for testing as well.
librbd will use the functions in cls_rbd_client to interact with cls_rbd.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: remove useless ENOMEM checks
Josh Durgin [Mon, 4 Jun 2012 02:42:23 +0000 (19:42 -0700)]
librbd: remove useless ENOMEM checks

There will be an exception if memory can't be allocated.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoDBObjectMap: remove extra semicolon
Josh Durgin [Sun, 3 Jun 2012 10:45:15 +0000 (03:45 -0700)]
DBObjectMap: remove extra semicolon

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agovstart: debug osd classes when debugging is on
Josh Durgin [Sun, 3 Jun 2012 10:43:40 +0000 (03:43 -0700)]
vstart: debug osd classes when debugging is on

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjclass: add methods to get keys without values, and set multiple values
Josh Durgin [Sun, 3 Jun 2012 10:42:43 +0000 (03:42 -0700)]
objclass: add methods to get keys without values, and set multiple values

These will be useful in the new rbd header format. This brings the
API into parity with the available OSD ops for omaps.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjclass: rename omap methods to be consistent with other interfaces
Josh Durgin [Sun, 3 Jun 2012 10:41:02 +0000 (03:41 -0700)]
objclass: rename omap methods to be consistent with other interfaces

The osd ops and the librados methods all distinguish between keys
and values. It's useful to be able to read a bunch of keys without
fetching the values sometimes too.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjclass: allow classes to log at different levels
Josh Durgin [Sun, 3 Jun 2012 10:35:38 +0000 (03:35 -0700)]
objclass: allow classes to log at different levels

Add a logging level parameter to CLS_LOG, and a CLS_ERR that's
analagous to derr.

For now cls_rgw is all logging at level 1, preserving existing
behavior. I'm more familiar with cls_rbd, so I changed those
logging levels.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoclass_debug: add indent settings header
Josh Durgin [Sun, 3 Jun 2012 10:27:32 +0000 (03:27 -0700)]
class_debug: add indent settings header

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agotest_librbd: don't include a .cc file
Josh Durgin [Sun, 3 Jun 2012 10:26:47 +0000 (03:26 -0700)]
test_librbd: don't include a .cc file

Add it as a source like the rest of the gtests.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agocls_rgw: add indent settings header
Josh Durgin [Sun, 3 Jun 2012 10:25:13 +0000 (03:25 -0700)]
cls_rgw: add indent settings header

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjclass: pass strings as const references
Josh Durgin [Wed, 30 May 2012 03:13:52 +0000 (20:13 -0700)]
objclass: pass strings as const references

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoobjclass: add indent settings header
Josh Durgin [Wed, 30 May 2012 00:33:58 +0000 (17:33 -0700)]
objclass: add indent settings header

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agocls_rbd: add indent settings header
Josh Durgin [Fri, 25 May 2012 21:12:18 +0000 (14:12 -0700)]
cls_rbd: add indent settings header

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agocls_rbd: remove unused test_exec and snap_revert methods
Josh Durgin [Fri, 25 May 2012 21:09:02 +0000 (14:09 -0700)]
cls_rbd: remove unused test_exec and snap_revert methods

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agomon: require force argument for 'mds newfs ...'
Sage Weil [Fri, 8 Jun 2012 19:48:02 +0000 (12:48 -0700)]
mon: require force argument for 'mds newfs ...'

This is dangerous, make sure they know what they're doing.  I bet <someone>
$1 that Greg asked me to do this originally.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-crush-tunables'
Sage Weil [Fri, 8 Jun 2012 18:18:59 +0000 (11:18 -0700)]
Merge branch 'wip-crush-tunables'

Reviewed-by: Sam Just <sam.just@inktank.com>
13 years agocrushtool: refine tunables warning message
Sage Weil [Fri, 8 Jun 2012 18:17:14 +0000 (11:17 -0700)]
crushtool: refine tunables warning message

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agore-include assert after boost::pool
Sage Weil [Fri, 8 Jun 2012 18:02:44 +0000 (11:02 -0700)]
re-include assert after boost::pool

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrush: compile/decompile tunables
Sage Weil [Fri, 8 Jun 2012 17:56:57 +0000 (10:56 -0700)]
crush: compile/decompile tunables

Lines like

 tunable <name> <value>

will adjust tunables.  Right now only three are defined.

--enable-unsafe-tunables is required.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrushtool: add --enable-unsafe-tunables option
Sage Weil [Fri, 8 Jun 2012 17:57:28 +0000 (10:57 -0700)]
crushtool: add --enable-unsafe-tunables option

This is required to adjust tunables.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrushtool: --show-* instead of --output-*
Sage Weil [Fri, 8 Jun 2012 15:52:43 +0000 (08:52 -0700)]
crushtool: --show-* instead of --output-*

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoCrushTester: clean up output interface
Sage Weil [Fri, 8 Jun 2012 02:33:14 +0000 (19:33 -0700)]
CrushTester: clean up output interface

Multiple accessors.  Init in ctor.  Avoid temp vars in crushtool.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoCrushTester: dump histogram of choose attempts
Sage Weil [Fri, 8 Jun 2012 02:21:51 +0000 (19:21 -0700)]
CrushTester: dump histogram of choose attempts

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrush: generate histogram of choose tries
Sage Weil [Fri, 8 Jun 2012 02:21:36 +0000 (19:21 -0700)]
crush: generate histogram of choose tries

Optionally populate a histogram of choose descent attempts.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrush: fix leaf recursion if we already collided
Sage Weil [Thu, 7 Jun 2012 23:52:57 +0000 (16:52 -0700)]
crush: fix leaf recursion if we already collided

This just saves us some cycles, but does not effect placement results at
all.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoCrushTester: optionally output bad mappings
Sage Weil [Thu, 7 Jun 2012 23:34:11 +0000 (16:34 -0700)]
CrushTester: optionally output bad mappings

Optionally dump bad inputs to stdout.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrushtool: arguments to adjust tunables
Sage Weil [Thu, 7 Jun 2012 23:08:23 +0000 (16:08 -0700)]
crushtool: arguments to adjust tunables

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrush: make magic numbers tunable
Sage Weil [Thu, 7 Jun 2012 22:57:09 +0000 (15:57 -0700)]
crush: make magic numbers tunable

We have three magic numbers in crush_choose that are now tunable.  The
first two control the local retry behavior, including fallback to a
permutation.  The last is the total map descent attempts.

We can avoid a drastic incompatibility by making these tunable and encoded
in the map.  That means users can enable/disable local retry, for example,
without changing the code.  As long as the clients understand the tunables,
they can be adjusted.

This patch doesn't address the compatibility and feature bit issue.  We may
want to roll that into a larger revision with more drastic changes, once
we know what those changes will look like.  However, a careful user can
use the new code and modify the behavior.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: use mode 0600 throughout
Sage Weil [Thu, 7 Jun 2012 20:57:10 +0000 (13:57 -0700)]
mon: use mode 0600 throughout

Fixes: #2526
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/mon-auth'
Sage Weil [Thu, 7 Jun 2012 19:22:47 +0000 (12:22 -0700)]
Merge remote-tracking branch 'gh/mon-auth'

Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agodoc: Added mount cephfs with fstab.
John Wilkins [Thu, 7 Jun 2012 18:35:37 +0000 (11:35 -0700)]
doc: Added mount cephfs with fstab.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agoosd: include past_intervals in pg query results
Sage Weil [Thu, 7 Jun 2012 18:17:12 +0000 (11:17 -0700)]
osd: include past_intervals in pg query results

This will help us figure out *why* nodes are in the prior set.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
13 years agoOSD: _have_pg should return NULL if pg is not in map
Samuel Just [Mon, 14 May 2012 20:12:18 +0000 (13:12 -0700)]
OSD: _have_pg should return NULL if pg is not in map

Signed-off-by: Samuel Just <sam.just@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-assert2'
Sage Weil [Thu, 7 Jun 2012 18:21:39 +0000 (11:21 -0700)]
Merge remote-tracking branch 'gh/wip-assert2'

"So be it"

Reviewed-by: Sam Just <sam.just@dreamhost.com>
13 years agodeliberately break encoding macros when wrong assert is present
Sage Weil [Thu, 7 Jun 2012 17:19:09 +0000 (10:19 -0700)]
deliberately break encoding macros when wrong assert is present

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomisc assert #include cleanup, hackery
Sage Weil [Thu, 7 Jun 2012 17:18:56 +0000 (10:18 -0700)]
misc assert #include cleanup, hackery

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoreinclude assert.h after json_spirit
Sage Weil [Thu, 7 Jun 2012 17:18:38 +0000 (10:18 -0700)]
reinclude assert.h after json_spirit

json_spirit clobbers it!

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agodoc: Incorporated Sam's comments.
John Wilkins [Thu, 7 Jun 2012 17:08:16 +0000 (10:08 -0700)]
doc: Incorporated Sam's comments.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-assert'
Sage Weil [Thu, 7 Jun 2012 16:41:14 +0000 (09:41 -0700)]
Merge remote-tracking branch 'gh/wip-assert'

Reviewed-by: Sam Just <sam.just@inktank.com>
13 years agodoc: Typo fix.
John Wilkins [Thu, 7 Jun 2012 14:38:36 +0000 (07:38 -0700)]
doc: Typo fix.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agomon: set policy for client, mds before throttler
Sage Weil [Thu, 7 Jun 2012 02:19:59 +0000 (19:19 -0700)]
mon: set policy for client, mds before throttler

Otherwise we fail the assert in Messenger::set_policy_throttler()!

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoDBObjectMap: fix some warnings
Sage Weil [Thu, 7 Jun 2012 02:05:46 +0000 (19:05 -0700)]
DBObjectMap: fix some warnings

os/DBObjectMap.cc:197: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomake everyone use our assert #include and macro
Sage Weil [Wed, 6 Jun 2012 23:57:31 +0000 (16:57 -0700)]
make everyone use our assert #include and macro

...as detected by the previous patch.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoassert: detect when /usr/include/assert.h clobbers us
Sage Weil [Wed, 6 Jun 2012 23:06:28 +0000 (16:06 -0700)]
assert: detect when /usr/include/assert.h clobbers us

The normal assert.h is very rude in that it clobbers any existing assert
define and replaces it with its own.  An sadly, lots of things we include
include the generic version.

Be extra rude in response.  Clobber any existing assert #define, and also
#define _ASSERT_H to be a magic value that our commonly-used dendl #define
depends on.  This way we get a compile error if the system version replaces
out own.

This is imperfect, since we will only detect their rudeness when we use
the debug macros.  I'm not coming up with something that is more widely
used that would work better, however.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-msgr-interface'
Sage Weil [Wed, 6 Jun 2012 23:01:19 +0000 (16:01 -0700)]
Merge remote-tracking branch 'gh/wip-msgr-interface'

Reviewed-by: Sage Weil <sage@inktank.com>
13 years agokeyserver: also authenticate against mon keyring
Sage Weil [Wed, 6 Jun 2012 22:30:36 +0000 (15:30 -0700)]
keyserver: also authenticate against mon keyring

If we don't have a secret, also check in the extra_secrets keyring.

This means we can also authenticate as any users that appear in the mon
keyring, and get the caps defined there.  This lets us bootstrap the
client.admin key with mon. key, provided mon 'allow *' caps appear in the
mon keyring.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agokeyring: implement get_caps()
Sage Weil [Wed, 6 Jun 2012 22:26:53 +0000 (15:26 -0700)]
keyring: implement get_caps()

Simple accessor, mirrors KeyServerData.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: share mon keyring with KeyServer
Sage Weil [Wed, 6 Jun 2012 22:26:28 +0000 (15:26 -0700)]
mon: share mon keyring with KeyServer

This will let us authenticate against items in the mon keyring, like the
mon. key itself.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip_hobject_wpool'
Sage Weil [Wed, 6 Jun 2012 21:11:24 +0000 (14:11 -0700)]
Merge remote-tracking branch 'gh/wip_hobject_wpool'

Reviewed-by: Sage Weil <sage@inktank.com>
13 years agomon: put cluster log at /var/log/ceph/$cluster.log and/or send to syslog
Sage Weil [Wed, 6 Jun 2012 21:09:22 +0000 (14:09 -0700)]
mon: put cluster log at /var/log/ceph/$cluster.log and/or send to syslog

Also, stop breaking it down by event severity on disk.  If you want that,
use syslog.

Fixes: #2497
Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agoMerge branch 'wip-crushtool'
Sage Weil [Wed, 6 Jun 2012 18:29:41 +0000 (11:29 -0700)]
Merge branch 'wip-crushtool'

Reviewed-by: Sage Weil <sage@inktank.com>
13 years agomonclient: be paranoid/defensive about send_log vs log_client==NULL
Sage Weil [Wed, 6 Jun 2012 16:13:14 +0000 (09:13 -0700)]
monclient: be paranoid/defensive about send_log vs log_client==NULL

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrushtool: fix cli tests given new less-chatty output, help
Sage Weil [Wed, 6 Jun 2012 18:05:57 +0000 (11:05 -0700)]
crushtool: fix cli tests given new less-chatty output, help

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrushtool: allow user to select output reporting in blocks
caleb miles [Tue, 5 Jun 2012 22:50:54 +0000 (15:50 -0700)]
crushtool: allow user to select output reporting in blocks

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agodoc: Added mount cephfs and included it in quick start.
John Wilkins [Wed, 6 Jun 2012 17:45:26 +0000 (10:45 -0700)]
doc: Added mount cephfs and included it in quick start.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agologclient: fix warning
Sage Weil [Wed, 6 Jun 2012 04:06:01 +0000 (21:06 -0700)]
logclient: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: include pg acting in health detail
Sage Weil [Wed, 6 Jun 2012 04:05:55 +0000 (21:05 -0700)]
mon: include pg acting in health detail

Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: include all types of stuck pgs in health detail
Sage Weil [Wed, 6 Jun 2012 04:04:24 +0000 (21:04 -0700)]
mon: include all types of stuck pgs in health detail

We were just including the last one, which isn't as helpful.

Backport: dho
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/cli/ceph-authtool: keyring.bin -> keyring
Sage Weil [Wed, 6 Jun 2012 03:16:19 +0000 (20:16 -0700)]
test/cli/ceph-authtool: keyring.bin -> keyring

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agodoc: keyring.bin -> keyring everwhere
Sage Weil [Wed, 6 Jun 2012 03:16:04 +0000 (20:16 -0700)]
doc: keyring.bin -> keyring everwhere

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest/: Made omap_bench compatible with teuthology
Eleanor Cawthon [Tue, 5 Jun 2012 22:34:41 +0000 (15:34 -0700)]
test/: Made omap_bench compatible with teuthology

added --name parsing, made histogram better, made rados_id
configurable, changed object names to use configurable prefix.

Signed-off-by: Eleanor Cawthon <eleanor.cawthon@inktank.com>
13 years agodoc: Added the root discussion to deploy with mkcephfs.
John Wilkins [Wed, 6 Jun 2012 00:09:59 +0000 (17:09 -0700)]
doc: Added the root discussion to deploy with mkcephfs.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agodoc: Added chmod for keyring, and moved client.admin user higher.
John Wilkins [Wed, 6 Jun 2012 00:08:45 +0000 (17:08 -0700)]
doc: Added chmod for keyring, and moved client.admin user higher.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
13 years agologclient: fix crashes, fix which entries are sent
Sage Weil [Tue, 5 Jun 2012 23:15:43 +0000 (16:15 -0700)]
logclient: fix crashes, fix which entries are sent

I was seeing crashes when the monitor tried to send log entries.

* Send log entries that haven't already been sent.
* Don't try to be tricky with the deque; i'm paranoid about the stability
  of the iterator.
* various asserts
* better variable names

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomonclient: send more log entries when first set is acked
Sage Weil [Tue, 5 Jun 2012 21:52:42 +0000 (14:52 -0700)]
monclient: send more log entries when first set is acked

Immediately send more log messages if we had more when the first set was
sent.  Otherwise, wait until the next tick to check.  This semi-throttles
logging based on how much the monitor can handle.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agologclient: not a dispatcher
Sage Weil [Tue, 5 Jun 2012 21:51:17 +0000 (14:51 -0700)]
logclient: not a dispatcher

Let MonClient and Monitor handle delivery of messages.  This puts them in
control and lets them trigger sending of more messages when we have a
bunch queued.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agologclient: limit messages per MLog message
Sage Weil [Tue, 5 Jun 2012 21:21:33 +0000 (14:21 -0700)]
logclient: limit messages per MLog message

This will avoid sending huge chunks of entries to the monitor and making
its life difficult.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agomon: limit size of each logm paxos event
Sage Weil [Tue, 5 Jun 2012 20:54:57 +0000 (13:54 -0700)]
mon: limit size of each logm paxos event

Limit the number of log events we cram into a single paxos event.

Fixes: #2518
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
13 years agoconfig_opts: filestore_update_to defaults to 1000
Samuel Just [Tue, 5 Jun 2012 23:33:47 +0000 (16:33 -0700)]
config_opts: filestore_update_to defaults to 1000

This way, filestores will be auto-upgraded by default.

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