osd_types: add last_became_active to pg_stats

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: timeout watches based on last_became_active

This way a notify on an object with a single defunct watcher
won't necessarily have to wait the full timeout if the pg
has been active for a while.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PendingReleaseNotes: note about rbd resize --allow-shrink

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
mkcephfs: give mon. key 'allow *' mon caps

This will ease the transition from mkcephfs to ceph-deploy by allowing
ceph-create-keys to use the mon. keyring file in $mon_data and get the
caps it needs.

Fixes: #4756
Signed-off-by: Sage Weil <sage@inktank.com>
mon: send clients away while sychronizing

When we are out of quorum, we waitlist client messages or (eventually)
send them elsewhere.  If we are synchronizing, do the same.

Signed-off-by: Sage Weil <sage@inktank.com>
PG: call check_recovery_sources in remove_down_peer_info

If we transition out of peering due to affected
prior set, we won't trigger start_peering_interval
and check_recovery_sources won't get called.  This
will leave an entry in missing_loc_sources without
a matching missing set.  We always want to
check_recovery_sources with remove_down_peer_info.

Fixes: 4805
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'upstream/wip_2476' into next

Fixes: #2476
Reviewed-by: Greg Farnum <greg@inktank.com>
librados: fix calc_snap_set_diff interval calculation

When calculating the [a,b] interval over which a given clone is valid, do
not assume that b == the clone id; that is *not* true when the original
end snap has been deleted/trimmed.

While we are here, make the code a bit cleaner to read.

Fixes: #4785
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
FileStore::_split_collection: src or dest may be removed on replay

If the collection is subsequently removed, the _split_collection
might get replayed and find either src or dest removed.

Fixes: #4806
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
ObjectCacher: remove all buffers from a non-existent object

Once we're sure an object doesn't exist, we retry all the waiters in
order, and they return -ENOENT immediately. If there were a bunch of
BufferHeads waiting for data (rx state), they would be left behind
while the reads that triggered them were complete from the cache
user's perspective. These extra rx BufferHeads would pin the object in
the lru, so they wouldn't be removed by release_set(). This meant that
the assert during shutdown of the cache would be triggered.

To fix this, remove any BufferHeads in this state immediately when we
find out the object doesn't exist. Use the same condition as readx for
determining whether this is safe - if we got -ENOENT and all
BufferHeads for the object are clean or rx.

Fixes: #3664
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #242 from ceph/wip-objectcacher-enoent

Reviewed-by: Sage Weil <sage.weil@inktank.com>
scrub clears inconsistent flag set by deep scrub

Add new num_deep_scrub_errors and num_shallow_scrub_errors to object_stat_sum_t
Show deep-scrub error count when outputing regular scrub errors
Set invalid size in case of a stat error which sets read_error
For now do deep-scrub after repair (see #4783)

fixes: #4778
Signed-off-by: David Zafman <david.zafman@inktank.com>
Merge branch 'wip-4778' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge branch 'wip-4748-b' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
init-ceph: use remote config when starting daemons on remote nodes (-a)

If you use -a to start a remote daemon, assume the remote config is present
instead of pushing the local config.  This makes more sense and simplifies
things.

Note that this means that -a in concert with -c foo means that foo must
also be present on the remote node in the same path.  That, however, is a
use case that I don't particularly care about right now.  :)

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
doc/release-notes: add note about sysvinit script change

See cd7e52cc76878eed0f084f7b9a6cf7c792b716c6.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/next'
PendingReleaseNotes: these are now in the release-notes.rst

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