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>
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>
mon: "mds stat" must open/close section around dump_info

dump_info() got a new field outside the mdsmap section; it's ok for
the overall "report", but not for "mds stat".  Add an enclosing section
in "mds stat".  Fix test to expect new level.

Fixes: #5718
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: "osd stat" needs a flush now that osdmap.print_summary() doesn't

Fixes: #5719
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: "status" is missing a close_section for the overall output

Fixes: #5720
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mon: PGMap dump shouldn't use strings containing '+' as tags

XML has a problem with tags containing +, like the PG state names.
Use an enclosing array, and name the state and count items explicitly.

Fixes: #5721
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge branch 'wip-formatted-output' into next

Formatted output bugfixes
mon: add quorum_names to quorum_status command output

Signed-off-by: Sage Weil <sage@inktank.com>
client: add Context*-based wait_on_list/signal_context_list helpers

These are better when the list may need to be deallocated.  Context's are
single-shot and the list is not referenced by the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
client: signal mds sessions with Contexts instead of Conds

If we try to open an mds session and the MDS responds with close (aka,
"no"), we call _closed_mds_session() which signals the Cond*'s but then
deallocates the list.  wait_on_list() then does a use-after-free trying
to remove itself.

Instead, use Context*'s, so that the waiter does not reference the list.

Fixes: #5689
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
mon/MonmapMonitor: make 'mon remove ...' idempotent

Signed-off-by: Sage Weil <sage@inktank.com>
global/signal_handler: use poll(2) instead of select(2)

Starting with commit 61a298c39c1a6684682e2b749e45a66d073182c8 we delay the
signal handler setup until after lots of other initialization has happened,
which can result in us having very large (>1024) open fds, which will
break the FD_SET macros for select(2).  Use poll(2) instead.

Fixes: #5722
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Merge remote-tracking branch 'gh/next'