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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>