ceph: return error code when failing to get result from admin socket

Make sure we return a non-zero result code when we fail to read something
from the admin socket.

Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 393c9372f82ef37fc6497dd46fc453507a463d42)
OSD: snap collections can be ignored on split

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 438d9aa152e546b2008ec355b481df71aa1c51a5)
PG: clear snap_collections on upgrade

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 252d71a81ef4536830a74897c84a7015ae6ec9fe)
OSD: handle stray snap collections from upgrade bug

Previously, we failed to clear snap_collections, which causes split to
spawn a bunch of snap collections.  In load_pgs, we now clear any such
snap collections and then snap_collections field on the PG itself.

Related: #4927
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 8e89db89cb36a217fd97cbc1f24fd643b62400dc)
init-ceph: fix osd_data location when checking df utilization

Do not assume default osd data location.

Fixes: #4951
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowelll <gary.lowell@inktank.com>
(cherry picked from commit f2a54cc9c98a9f31aef049c74ea932b2d9000d3c)
ceph-create-keys: gracefully handle no data from admin socket

Old ceph-mon (prior to 393c9372f82ef37fc6497dd46fc453507a463d42) would
return an empty string and success if the command was not registered yet.
Gracefully handle that case by retrying.

If we still fail to parse, exit entirely with EINVAL.

Fixes: #4952
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@intank.com>
(cherry picked from commit e2528ae42c455c522154c9f68b5032a3362fca8e)
osd: don't assert if get_omap_iterator() returns NULL

Fixes: #4949
This can happen if the object does not exist and it's
a write operation. Just return -ENOENT.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 36ec6f9bce63641f4fc2e4ab04d03d3ec1638ea0)
debian/control:  squeeze requres cryptsetup package

Squeeze requires the cryptsetup package which has been renamed
cryptsetup-bin in later versions.  Allow either package to
satisfy the dependency.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
(cherry picked from commit 83bbae415de16f708ca1cb24861ddbb0bd514a7f)
mon: allow leveldb logging

'mon leveldb log = filename'

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit c1d5f815546b731e10bfcb81cbcd48b7d432e9c4)
osd: optionally enable leveldb logging

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 0b4c5c1a3349670d11cc3c4fb3c4b3c1a80b2502)
mon: dump MonitorDBStore transactions to file

Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 797089ef082b99910eebfd9454c03d1f027c93bb)
v0.61.1
Expand C interface for NFS-Ganesha.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Fix some issues that generated type-narrowing warnings by C++11
compiler.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Get rid of C++11 warning about converting bool to pointer.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Block commit barriers.

Implementation optimized for low cost uncommitted writing,
as write tracking is unordered, with constant-time write
completion in all cases.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Ahem.  Add barrier.cc.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Don't return from Unclaimed.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Check for zero length in block commit.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Fix intrusive list use and switch to Boost interval set for barrier

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>