MDSMap:: constify a bunch of methods

Signed-off-by: Sage Weil <sage@inktank.com>
MDSMap: improve health check

Note if the cluster is degraded.  If so, indicate specifically which MDSs
are degraded and what state they are in.

Signed-off-by: Sage Weil <sage@inktank.com>
java: support ceph_get_file_extent_osds

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
java: support ceph_get_osd_crush_location

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
java: support ceph_get_osd_addr

Adds a few JNI utilities from the Android project (license: Apache) to
help with IP address conversions. These functions are also updated to
work in our environment (use Ceph exception utilities, edit header
paths).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
java: pretty print Ceph extent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
ceph-disk: fix indention

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: print subprocess.CalledProcessError on error

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: add some more docstrings

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: rename some constants to upper case variable names

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: fix naming of a local variable in find_cluster_by_uuid

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
ceph-disk: rename some local variabels in list_*partitions

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
rgw: bucket index ops on system buckets shouldn't do anything

Fixes: #4508
Backport: bobtail
On certain bucket index operations we didn't check whether
the bucket was a system bucket, which caused the operations
to fail. This triggered an error message on bucket removal
operations.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
CrushWrapper.cc: remove some std::string::c_str() calls

Passing the result of c_str() to a function that takes
std::string as argument is slow and redundant.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
client: Remove got_safe from MetaRequest

Once a safe reply is received, we remove the
request from the mds_requests map, so checking that
it might be a duplicate won't succeed.  This patch
removes the got_safe checks in the reply handling code
and the got_safe field on the MetaRequest to avoid confusion.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client: Always cleanup request after safe

The client MetaRequest should always be cleaned up
and removed from the mds_requests map once the client
gets a safe reply.  This patch avoids a leak where the
mds does not send back an unsafe reply and the request
is never cleaned up.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client: Handle duplicate safe replies

If the mds sends a duplicate safe reply, the mds_requests
map won't contain a matching request id (tid).  Instead of
assert failing, we log a message that we saw a reply without
a matching request.

Also remove redundant mds_requests->erase(tid) line.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
client: Cleanup request signaling

Split up the conditionals handling unsafe reply
and signaling the caller to improve readability.
The overall behavior of the code remains the same.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Merge pull request #145 from dalgaaf/wip-da-c_str

CrushWrapper.cc: remove some std::string::c_str() calls

Reviewed-by: Sage Weil <sage@inktank.com>
java: fix test name typo

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>