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>
cls/rgw/cls_rgw.cc: init start_key_added with false

Fix for coverity issue:

CID 1049231 (#1 of 1): Uninitialized scalar variable (UNINIT)
  uninit_use: Using uninitialized value "start_key_added".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_version.cc: fix ressource leak

CID 1049220 (#18 of 18): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_version.cc: fix another ressource leak

CID 1049219 (#17 of 17): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "op" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_version.cc: fix resource leak, delete before new()

CID 1049217 (#1 of 1): Resource leak (RESOURCE_LEAK)
  overwrite_var: Overwriting "op" in "op = new_op()" leaks
  the storage that "op" points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_version.cc: fix resource leak, delete before new()

Fix some more cases where resource wasn't deleted/freed before
call new().

CID 1049216 (#1-9 of 9): Resource leak (RESOURCE_LEAK)
  overwrite_var: Overwriting "op" in "op = new_op()" leaks
  the storage that "op" points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_statelog.cc: fix resource leak, delete rop at end of function

CID 1049215 (#12 of 12): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_statelog.cc: fix resource leak, delete op at end of function

CID 1049214 (#13 of 13): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "op" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_cls_statelog.cc: fix resource leak, delete 'rop' at end of function

CID 1049213 (#3 of 3): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "rop" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
qa/workunits/suites/fsync-tester.sh: lsof at end

Trying to track down occasional EBUSY on umount at end of test.

Signed-off-by: Sage Weil <sage@inktank.com>
doc/release-notes: v0.67-rc1

Signed-off-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: update the osdmap's latest_full with the new full version

We used to do this on encode_full(), but since [1] we no longer rely on
PaxosService to manage the full maps for us.  And we forgot to write down
the latest_full version to the store, leaving it in a truly outdated state.

[1] - 7fb3804fb860dcd0340dd3f7c39eec4315f8e4b6

Fixes: #5704
Backport: cuttlefish
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: get rid of encode_full() as we don't use it.

We have delegated this to encode_trim_extra() since
7fb3804fb860dcd0340dd3f7c39eec4315f8e4b6 -- no need to keep this code
around.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: work around a full version bug introduced in 7fb3804fb

In 7fb3804fb860dcd0340dd3f7c39eec4315f8e4b6 we moved the full version
stashing logic to the encode_trim_extra() function.  However, we forgot
to update the osdmap's 'latest_full' key that should always point to
the latest osdmap full version.  This eventually degenerated in a missing
full version after a trim.  This patch works around this bug by looking
for the latest available full osdmap version in the store and updating
'latest_full' to its proper value.

Related-to: #5704
Backport: cuttlefish

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/next' into next
ceph.spec.in: obsolete ceph-libs only on the affected distro

The ceph-libs package existed only on Redhat based distro,
there was e.g. never such a package on SUSE. Therefore: make
sure the 'Obsoletes' is only set on these affected distros.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
mon/OSDMonitor: fix base case for 7fb3804fb workaround

After cluster creation, we have no full map stored and first_committed ==
1.  In that case, there is no need for a full map, since we can get there
from OSDMap() and the incrementals.

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao@inktank.com>
Merge pull request #461 from dalgaaf/wip-da-fix-spec-obsoletes

ceph.spec.in: obsolete ceph-libs only on the affected distro

Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
ceph.spec.in: obsolete ceph-libs only on the affected distro

The ceph-libs package existed only on Redhat based distro,
there was e.g. never such a package on SUSE. Therefore: make
sure the 'Obsoletes' is only set on these affected distros.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>