If we encounter a 'key=' with no value, clear any previous value for that
key, so that
'a=foo b=bar a='
is equivalent to
'b=bar'
Fixes: #2540
Signed-off-by: Sage Weil <sage@inktank.com>
* "user gen" is gone and is now "user create"
* --uid option is mandatory for "user create"
Mailing list thread: http://www.spinics.net/lists/ceph-devel/msg06744.html
Signed-off-by: Florian Haas <florian@hastexo.com>
- radosgw-admin usage show
- radosgw-admin usage trim
Both commands can get --start-date, --end-date, --uid
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
New config options for usage logging:
- rgw_enable_usage_log: enable usage logging
- rgw_usage_log_flush_threshold - limit on number of pending updates
before synchronously flushing update
- rgw_usage_log_tick_interval - asynchronous flush interval
- rgw_usage_max_shards - split info across that many objects
- rgw_usage_max_user_shards - split single user info across that many
objects
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
The new methods are:
- user_usage_log_add: add new usage information
- user_usage_log_read: get usage information
- user_usage_log_trim: remove usage information
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This is useful for reporting which features an osd supports, and for
testing rados_exec. Update the rados api tests to use this method
instead of test_exec, which was removed.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
PGMap->num_pg_by_state is a PG state to number of PG in the state
mapping. PGMonitor::update_logger wrongly interprets the mapping.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
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>
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>
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>
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>
This is an ancient test for an old 'bug' in functionality we're removing.
Also, it is sensitive to tester output, which will be changing a lot in
the coming weeks/months.
Signed-off-by: Sage Weil <sage@inktank.com>
- put it in a separate function
- operate on temporary weight vector, not user-modified input
- guard the whole thing with an #ifdef
- permute candidates and use first N, to ensure we end up picking the right
number of buckets/items.
Signed-off-by: Sage Weil <sage@inktank.com>
Move functionality to allow user to control bucket vs device mark-down
probabilities independently.
Signed-off-by: caleb miles <caleb.miles@inktank.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>