osd: ignore MarkMeDown message if we aren't in PREPARING_TO_STOP state

If we aren't waiting for this, ignore it.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: fix 'ack' to be 'request_ack' in MOSDMarkMeDown

This field was passed along but always set to false.  It did not seem to
indicate whether this was/wasn't an ack (the reply message kept the same
value) or whether an ack was requested (it was always false but we always
reply).

Change this by bumping the message encoding, renaming the field, and
making old messages that are decoded force request_ack to true.  Reply
messages will always have request_ack false (although that part doesn't
matter much since the fact that it is a reply is clear from context).

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: do not reply to MOSDMarkMeDown if ack is not requested

If a reply isn't requested, do not bother to send one.  Note that old
clients did not request an ack, but we will infer that they do from the
message encoding (see previous commit).

Signed-off-by: Sage Weil <sage@inktank.com>
osd/SnapMapper: debug

Signed-off-by: Sage Weil <sage@inktank.com>
osd/SnapMapper: pass snaps set by const ref

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: agent_work() fix next if finished early due to start_max

Backport: firefly

Signed-off-by: David Zafman <david.zafman@inktank.com>
sample.ceph.conf update:

 * corrected URLs.
 * added [client] section.
 * more options and descriptions.
 * filestore settings were moved under [osd].
 * cephx settings to reflect lack of support for authentication in RBD client.
 * many minor corrections and updates.

Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
Merge pull request #1754 from nereocystis/hardware-to-glossary

doc: Include links from hardware-recommendations to glossary
mailmap: Guang Yang name normalization

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: Warren Usui name normalization

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: Florent Bautista affiliation

and name normalization

Signed-off-by: Loic Dachary <loic@dachary.org>
mon/MonClient: remove stray _finish_hunting() calls

Callig _finish_hunting() clears out the bool hunting flag, which means we
don't retry by connection to another mon periodically.  Instead, we send
keepalives every 10s.  But, since we aren't yet in state HAVE_SESSION, we
don't check that the keepalives are getting responses.  This means that an
ill-timed connection reset (say, after we get a MonMap, but before we
finish authenticating) can drop the monc into a black hole that does not
retry.

Instead, we should *only* call _finish_hunting() when we complete the
authentication handshake.

Fixes: #8278
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon/OSDMonitor: share latest map with osd on dup boot message

If we get a dup boot message, share the newer maps with the osd so that
they know they are living in the past.

Fixes: #8279
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon/PGMonitor: set tid on no-op PGStatsAck

The OSD needs to know the tid.  Both generally, and specifically because
the flush_pg_stats may be blocking on it.

Fixes: #8280
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon/OSDMonitor: share latest map with osd on dup boot message

If we get a dup boot message, share the newer maps with the osd so that
they know they are living in the past.

Fixes: #8279
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 2e6b24868da0b203c2d70ac91071166d95d1d851)
mon/PGMonitor: set tid on no-op PGStatsAck

The OSD needs to know the tid.  Both generally, and specifically because
the flush_pg_stats may be blocking on it.

Fixes: #8280
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 5a6ae2a978dcaf96ef89de3aaa74fe951a64def6)
rgw_bucket.cc: return error if update_containers_stats() fails

In case need_stats is set on rgw_read_user_buckets() and the
update_containers_stats() call fails with !-ENOENT, not only
print out a message but also return the error to the function
caller.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Dumper::dump_entries(): remove not needed variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
linux_fiemap.h: remove twice included int_types.h

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
SimpleLock.h: remove twice included osd_types.h

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