Adding new Wireshark dissector. This is loosely based on the original
dissector, it has been re-worked to bring into line with Wireshark
coding guidelines that aim to ensure portability. It currently only
decodes a handful of messages as test cases, it needs more work to make
it useful. See README.txt for a bit more background.
test: switch the cls_replica_log tests to use a test fixture

Instead of the silly macros.

Signed-off-by: Greg Farnum <greg@inktank.com>
rgw: grab the old mtime when doing a user metadata put

We're about to use this to enable (ick) a timestamp-based update
decision tree, to help in resolving disastrous double-active conflicts.

Signed-off-by: Greg Farnum <greg@inktank.com>
Remove fuse-utils from Recommends in debian/control

The package fuse-utils is obsolete and no longer in Debian unstable.
test_rgw_admin_meta.cc: use static_cast<>() instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_rgw_admin_opstate.cc: use static_cast<>() instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_rgw_admin_meta.cc: remove unused variable 'creds'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_rgw_admin_opstate.cc: remove unused variable 'creds'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_rgw_admin_log.cc: use static_cast<>() instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_rgw_admin_log.cc: remove unused variable 'creds'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw/rgw_metadata.h: init prefix in initialization list

For performance reasons: init 'prefix' with META_LOG_OBJ_PREFIX
in the initialization list of RGWMetadataLog instead of assigning
the value in the constructor body.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph_argparse.py: wrong variable used if valid() fails for Ceph{Osd}Name

self.t isn't valid in the failure case; use t

Signed-off-by: Dan Mick <dan.mick@inktank.com>
osd: Don't put functional code inside of an assert

Fix assert in OSDService::get_map()

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
ceph-disk: use new dumpling-style osd caps if we can, or fall back to old-style ones

Signed-off-by: Alfredo Deza <alfredo@deza.pe>
Reviewed-by: Sage Weil <sage@inktank.com>
remove old push_to_kclient.pl

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: add preliminary support for sync update policies on metadata sync

We want to be able to conditionally apply new updates:
1) if we already have a newer version than the sync is applying for some
reason (replay of logs?), we don't want to go back in time.
2) If both zones were active at the same time, then we'd like to be
able to do a merge based on timestamps.

In order to support this, we add a sync_type flag to the implementations of
RGWMetadataHandler::put, and then check the version or the mtime of the
incoming put to what we have on disk, and refuse the update if needed.
We return the 204 NoContent success code when refusing sync; for the
moment the conversion is automatic but we're going to pull it out in
the next couple commits.

This commit does not complete the feature: we don't provide an interface
for specifying a different sync protocol.

Signed-off-by: Greg Farnum <greg@inktank.com>
rgw: pass the sync mode into the RGWMetadataManager::put() calls.

Signed-off-by: Greg Farnum <greg@inktank.com>
rgw: add sync state parsing code and REST interface

Specify the param "sync-type" as one of "always", "update-by-version",
"update-by-timestamp". It defaults to always.

Signed-off-by: Greg Farnum <greg@inktank.com>
rgw: return the update status on sync requests

Add new STATUS_APPLIED, then specify the RGWX_UPDATE_STATUS header
based on that return code when doing metadata puts.
Add a send_response() function to RGWOp_Metadata_Put in order to
support sending back our new headers. Move the translation from
STATUS_NO_APPLY from set_req_state_err() to this function, so we
can turn different sync results into failures if necessary elsewhere.

Signed-off-by: Greg Farnum <greg@inktank.com>
rgw: expose the version of synced items to the poster

To support this, we add an optional out argument to
RGWMetadatManager::put() and fill in the read_version. When the
function returns, that contains whatever the current on-disk version
of the object is (either what already existed or what we just wrote).

Signed-off-by: Greg Farnum <greg@inktank.com>