]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
6 years agoosd: Fix merge_log_dups() not remove dup corresponding to log.tail 27914/head
David Zafman [Thu, 9 May 2019 17:38:36 +0000 (10:38 -0700)]
osd: Fix merge_log_dups() not remove dup corresponding to log.tail

The log tail is not inclusive of the log, so not an overlap
Fix unittest_pglog to verify proper operation

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agotest: unittest_pglog: Additional test cases for trim, copy_up_to and copy_after
David Zafman [Tue, 7 May 2019 04:19:59 +0000 (21:19 -0700)]
test: unittest_pglog: Additional test cases for trim, copy_up_to and copy_after

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agotest: unittest_pglog: Remove irrelevant config values
David Zafman [Tue, 7 May 2019 02:57:55 +0000 (19:57 -0700)]
test: unittest_pglog: Remove irrelevant config values

osd_min_pg_log_entries and osd_max_pg_log_entries are not involved
in the log handling code being tested.

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agotest: Adding standalone test of log copy handling
David Zafman [Fri, 3 May 2019 20:33:39 +0000 (13:33 -0700)]
test: Adding standalone test of log copy handling

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agoosd: Include dups in copy_after() and copy_up_to()
David Zafman [Thu, 2 May 2019 02:47:55 +0000 (19:47 -0700)]
osd: Include dups in copy_after() and copy_up_to()

Client saw out of order results in a test with a very small
pg_log because a backfill/recovery sent a small number of
log entries for duplicate checks.

Since these copy operations are equivalent to both a copy
and trim (an argument controls how many log entries
transfer), we need to include any new dups with enough
existing dups up to the configured maximum.

Fixes: http://tracker.ceph.com/issues/39304
Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agoosd: Remove unused pg_log_t::copy_range()
David Zafman [Tue, 30 Apr 2019 23:09:47 +0000 (16:09 -0700)]
osd: Remove unused pg_log_t::copy_range()

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agoosd: Fix off by 1 error in trim handling of osd_pg_log_dups_tracked
David Zafman [Thu, 2 May 2019 02:44:04 +0000 (19:44 -0700)]
osd: Fix off by 1 error in trim handling of osd_pg_log_dups_tracked

Move log message out of loop so it doesn't repeat for no reason

Signed-off-by: David Zafman <dzafman@redhat.com>
6 years agoMerge pull request #27897 from ivancich/wip-add-editor-comments-rgw-services
Casey Bodley [Thu, 2 May 2019 18:23:33 +0000 (14:23 -0400)]
Merge pull request #27897 from ivancich/wip-add-editor-comments-rgw-services

rgw: add editor directive comments to rgw services source files

Reviewed-by: Casey Bodley <cbodley@redhat.com>
6 years agoMerge pull request #27820 from smithfarm/wip-39361
Abhishek L [Thu, 2 May 2019 17:52:57 +0000 (19:52 +0200)]
Merge pull request #27820 from smithfarm/wip-39361

rgw: drop cloud sync module logs attrs from the log

Reviewed-By: Casey Bodley <cbodley@redhat.com>
Reviewed-By: Abhishek Lekshmanan <abhishek@suse.com>
6 years agoMerge PR #27871 into master
Sage Weil [Thu, 2 May 2019 13:22:04 +0000 (08:22 -0500)]
Merge PR #27871 into master

* refs/pull/27871/head:
ceph_test_objectstore: add very_large_write test
os/bluestore: fix aio pwritev lost data problem.

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
6 years agoMerge pull request #27844 from wjwithagen/wjw-fix-src_common_bit_vector.hpp.diff
Jason Dillaman [Wed, 1 May 2019 22:56:00 +0000 (18:56 -0400)]
Merge pull request #27844 from wjwithagen/wjw-fix-src_common_bit_vector.hpp.diff

common: Clang requires a default constructor, but it can be empty

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
6 years agoMerge pull request #27874 from athanatos/sjust/wip-peering-refactor-forreview
Samuel Just [Wed, 1 May 2019 21:33:38 +0000 (14:33 -0700)]
Merge pull request #27874 from athanatos/sjust/wip-peering-refactor-forreview

Extract peering logic into a module for use in crimson

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
6 years agoMerge PR #27763 into master
Patrick Donnelly [Wed, 1 May 2019 20:22:58 +0000 (13:22 -0700)]
Merge PR #27763 into master

* refs/pull/27763/head:
common/PriorityCache: fix over-aggressive assert when mem limited

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agocommon/PriorityCache: fix over-aggressive assert when mem limited 27763/head
Mark Nelson [Wed, 24 Apr 2019 15:08:22 +0000 (10:08 -0500)]
common/PriorityCache: fix over-aggressive assert when mem limited

Fixes: https://tracker.ceph.com/issues/39437
Signed-off-by: Mark Nelson <mnelson@redhat.com>
6 years agoPGStateUtils: improvements for PGStateHistory 27874/head
Samuel Just [Thu, 25 Apr 2019 18:40:52 +0000 (11:40 -0700)]
PGStateUtils: improvements for PGStateHistory

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: don't zero backfill target num_bytes on activation
sjust@redhat.com [Mon, 22 Apr 2019 21:07:06 +0000 (14:07 -0700)]
PeeringState: don't zero backfill target num_bytes on activation

834d3c19a774f1cc93903447d91d182776e12d18 preserves num_bytes
on backfill targets in order to estimate space required to complete
backill.  However, from activation until backfill reservation,
info.stats.stats.sum.num_bytes is persisted to disk as 0 messing
up future intervals.  Instead, preserve it in the info sent during
recovery and leave it alone in RequestBackfillPrio.

Additionally, it's possible for backfill to be preempted between
last_backfill=MAX being sent to the replica and Backfilled being
queued occuring.  In that case, the stats get on reservation
and the replica ends up with invalid stats.

Fixes: https://tracker.ceph.com/issues/39401
Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPeeringState: use ceph_assert
Samuel Just [Sun, 21 Apr 2019 00:54:25 +0000 (17:54 -0700)]
PeeringState: use ceph_assert

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoadmin/build-doc: use PeeringState* for gen_state_diagram.py
Samuel Just [Fri, 12 Apr 2019 00:59:10 +0000 (17:59 -0700)]
admin/build-doc: use PeeringState* for gen_state_diagram.py

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: add explanations for public interface methods
Samuel Just [Fri, 12 Apr 2019 00:01:57 +0000 (17:01 -0700)]
PeeringState: add explanations for public interface methods

Also rearranges the methods a little for clarity.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPG,PeeringState: Fix initialization order
sjust@redhat.com [Wed, 10 Apr 2019 22:56:26 +0000 (15:56 -0700)]
PG,PeeringState: Fix initialization order

PeeringState needs to be initialized last and destructed
first.

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPeeringState: mark state and helpers private
Samuel Just [Wed, 10 Apr 2019 04:57:56 +0000 (21:57 -0700)]
PeeringState: mark state and helpers private

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: clean up remaining info mutators
Samuel Just [Fri, 12 Apr 2019 18:08:53 +0000 (11:08 -0700)]
osd/: clean up remaining info mutators

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: condense missing mutations for recovery/repair/errors
Samuel Just [Wed, 10 Apr 2019 02:29:05 +0000 (19:29 -0700)]
osd/: condense missing mutations for recovery/repair/errors

At a high level, this patch attempts to unify the various
sites at which some combination of
- mark object missing in one or more pg_missing_t
- mark object needs_recovery in missing_loc
- manipulate the locations map based on external information
occur.  It seems to me that the pg_missing_t and missing_loc
should be in sync except for the mark_unfound_lost_revert
case and the case where we are about to do a backfill push.

This patch also cleans up repair_object.  It sort of worked by accident
for non-ec non-primary bad peers.  It didn't update missing_loc, so
needs_recovery() returns the wrong answer.  However, is_unfound() does
as well, so ReplicatedBackend is nevertheless happy as the object would
be present on the primary.  This patch updates the behavior to be
uniform as in the other force_obejct_missing cases.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agotest-erasure-eio: first eio may be fixed during recovery
Samuel Just [Sun, 21 Apr 2019 01:51:08 +0000 (18:51 -0700)]
test-erasure-eio: first eio may be fixed during recovery

The changes to the way EC/ReplicatedBackend communicate read
t showerrors had a side effect of making first eio on the object in
TEST_rados_get_subread_eio_shard_[01] repair itself depending
on the timing of the killed osd recovering.  The test should
be improved to actually test that behavior at some point.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move pg_log, missing_loc mutations to PeeringState
sjust@redhat.com [Mon, 8 Apr 2019 23:32:10 +0000 (16:32 -0700)]
osd/: move pg_log, missing_loc  mutations to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: unify PGBackend pull error pathways
Samuel Just [Fri, 12 Apr 2019 18:08:53 +0000 (11:08 -0700)]
osd/: unify PGBackend pull error pathways

This patch narrows the PGBackend -> PrimaryLogPG recovery
cancel/error interface to on_failed_pull and cancel_pull.

This patch requires careful review.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move peer_info mutators into PeeringState
sjust@redhat.com [Mon, 8 Apr 2019 22:17:18 +0000 (15:17 -0700)]
osd/: move peer_info mutators into PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: Move log version pointer updates to PeeringState
Samuel Just [Sat, 13 Apr 2019 00:12:45 +0000 (17:12 -0700)]
osd/: Move log version pointer updates to PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: refactor to avoid mutable peer_missing refs in PG
Samuel Just [Sat, 6 Apr 2019 01:51:14 +0000 (18:51 -0700)]
osd/: refactor to avoid mutable peer_missing refs in PG

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPG: remove might_have_unfound, peer_*_requested
Samuel Just [Sat, 6 Apr 2019 00:42:48 +0000 (17:42 -0700)]
PG: remove might_have_unfound, peer_*_requested

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: fix upset, actingset, acting_backfill_recovery references
Samuel Just [Sat, 6 Apr 2019 00:38:40 +0000 (17:38 -0700)]
osd/: fix upset, actingset, acting_backfill_recovery references

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: fix primary/up_primary references
Samuel Just [Sat, 6 Apr 2019 00:31:23 +0000 (17:31 -0700)]
osd/: fix primary/up_primary references

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move last_..._to_applied, backfill_targets, async_recovery_targets to PeeringState
Samuel Just [Sat, 6 Apr 2019 00:24:23 +0000 (17:24 -0700)]
osd/: move last_..._to_applied, backfill_targets, async_recovery_targets to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPG: fix last_peering_reset and past_intervals references
Samuel Just [Fri, 5 Apr 2019 23:53:32 +0000 (16:53 -0700)]
PG: fix last_peering_reset and past_intervals references

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState::PeeringMachine::Deleting: rollfoward before resetting backfill
Samuel Just [Thu, 11 Apr 2019 21:40:15 +0000 (14:40 -0700)]
PeeringState::PeeringMachine::Deleting: rollfoward before resetting backfill

This looked wrong when I was moving it over.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: add helpers to add remaining info dirtiers into PeeringState
sjust@redhat.com [Thu, 4 Apr 2019 22:38:11 +0000 (15:38 -0700)]
osd/: add helpers to add remaining info dirtiers into PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move append_log into PeeringState
sjust@redhat.com [Thu, 4 Apr 2019 22:33:53 +0000 (15:33 -0700)]
osd/: move append_log into PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move append_log_entries_update_missing and merge_new_log_entries to PeeringState
sjust@redhat.com [Thu, 4 Apr 2019 22:22:22 +0000 (15:22 -0700)]
osd/: move append_log_entries_update_missing and merge_new_log_entries to PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: clean up PG deleted and deleting references
Samuel Just [Fri, 12 Apr 2019 23:34:25 +0000 (16:34 -0700)]
osd/: clean up PG deleted and deleting references

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPG: remove direct acting and up references
sjust@redhat.com [Thu, 4 Apr 2019 21:16:50 +0000 (14:16 -0700)]
PG: remove direct acting and up references

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPG: begin cleaning up scrub stat and history mutations
Samuel Just [Fri, 12 Apr 2019 23:34:55 +0000 (16:34 -0700)]
PG: begin cleaning up scrub stat and history mutations

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPG: remove first batch of unused references
sjust@redhat.com [Thu, 4 Apr 2019 21:07:45 +0000 (14:07 -0700)]
PG: remove first batch of unused references

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: clarify interface for introducing disk state to PeeringState
Samuel Just [Thu, 4 Apr 2019 00:45:26 +0000 (17:45 -0700)]
osd/: clarify interface for introducing disk state to PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move ostream<< and dump logic into PeeringState
Samuel Just [Wed, 3 Apr 2019 23:58:15 +0000 (16:58 -0700)]
osd/: move ostream<< and dump logic into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: clean up PeeringState::write_if_dirty
Samuel Just [Wed, 3 Apr 2019 23:57:47 +0000 (16:57 -0700)]
osd/: clean up PeeringState::write_if_dirty

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: Move init into PeeringState
Samuel Just [Wed, 3 Apr 2019 23:56:47 +0000 (16:56 -0700)]
osd/: Move init into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move stat updates and publishing to PeeringState
sjust@redhat.com [Mon, 29 Apr 2019 20:53:09 +0000 (13:53 -0700)]
osd/: move stat updates and publishing to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move more state helpers to PeeringState
Samuel Just [Wed, 3 Apr 2019 23:50:14 +0000 (16:50 -0700)]
osd/: move more state helpers to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move split/merge helpers into PeeringState
Samuel Just [Wed, 3 Apr 2019 23:46:13 +0000 (16:46 -0700)]
osd/: move split/merge helpers into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: fix try_mark_clean/finish_recovery interface boundary
Samuel Just [Wed, 3 Apr 2019 23:42:58 +0000 (16:42 -0700)]
osd/: fix try_mark_clean/finish_recovery interface boundary

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: remove PG references and include
Samuel Just [Wed, 3 Apr 2019 00:57:01 +0000 (17:57 -0700)]
PeeringState: remove PG references and include

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move calc_min_last_complete_ondisk to PeeringState
Samuel Just [Tue, 2 Apr 2019 18:55:49 +0000 (11:55 -0700)]
osd/: move calc_min_last_complete_ondisk to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: pass OSDService::logger and log_enter/exit through PeeringListener
Samuel Just [Wed, 3 Apr 2019 00:45:45 +0000 (17:45 -0700)]
osd/: pass OSDService::logger and log_enter/exit through PeeringListener

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: pass merge state control through PeeringListener
Samuel Just [Wed, 3 Apr 2019 00:45:23 +0000 (17:45 -0700)]
osd/: pass merge state control through PeeringListener

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: pass dump_recovery_info through to pl for recovery state
Samuel Just [Tue, 2 Apr 2019 23:53:29 +0000 (16:53 -0700)]
PeeringState: pass dump_recovery_info through to pl for recovery state

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: rearrange and fix remaining pg->gen_prefix call
Samuel Just [Tue, 2 Apr 2019 23:43:31 +0000 (16:43 -0700)]
PeeringState: rearrange and fix remaining pg->gen_prefix call

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move fulfill_info etc
Samuel Just [Tue, 2 Apr 2019 23:10:20 +0000 (16:10 -0700)]
osd/: move fulfill_info etc

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: clarify PeeringState deletion interfaces
Samuel Just [Tue, 2 Apr 2019 22:58:39 +0000 (15:58 -0700)]
osd/: clarify PeeringState deletion interfaces

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move min_peer_*_features and helpers
Samuel Just [Tue, 2 Apr 2019 18:39:31 +0000 (11:39 -0700)]
osd/: move min_peer_*_features and helpers

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move proc_* and log handling methods
Samuel Just [Tue, 2 Apr 2019 18:30:32 +0000 (11:30 -0700)]
osd/: move proc_* and log handling methods

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move share_pg_info to PeeringState
Samuel Just [Fri, 12 Apr 2019 22:33:29 +0000 (15:33 -0700)]
osd/: move share_pg_info to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move waiting_for_flushed|peering handling into on_activate_complete
Samuel Just [Sat, 30 Mar 2019 04:45:18 +0000 (21:45 -0700)]
osd/: move waiting_for_flushed|peering handling into on_activate_complete

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move search_for_missing, discover_all_unfound, build_might_have_unfound
Samuel Just [Fri, 12 Apr 2019 22:35:26 +0000 (15:35 -0700)]
osd/: move search_for_missing, discover_all_unfound, build_might_have_unfound

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: restructure activate to avoid snap_trimq
Samuel Just [Sat, 30 Mar 2019 04:02:54 +0000 (21:02 -0700)]
PeeringState: restructure activate to avoid snap_trimq

In particular, don't use snap_trimq when manipulating
info.purged_snaps.  Pass the resulting to_trim set
into on_activate.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: start moving activate to PeeringState
Samuel Just [Fri, 12 Apr 2019 22:34:25 +0000 (15:34 -0700)]
osd/: start moving activate to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move try_mark_clean/finish_recovery to PG::on_clean
Samuel Just [Sat, 30 Mar 2019 00:23:45 +0000 (17:23 -0700)]
osd/: move try_mark_clean/finish_recovery to PG::on_clean

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move choose_acting and callees into PeeringState
sjust@redhat.com [Mon, 29 Apr 2019 20:55:20 +0000 (13:55 -0700)]
osd/: move choose_acting and callees into PeeringState

Also marks IsPGRecoverablePredicate users const to allow
simply reusing the instance on MissingLoc.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: remove OSDService::check_osdmap_full, fix caller
Samuel Just [Fri, 29 Mar 2019 22:56:44 +0000 (15:56 -0700)]
osd/: remove OSDService::check_osdmap_full, fix caller

PeeringState was the only remaining caller -- both the interface in
PGBackend and the pass-through in PrimaryLogPG were actually unused.
Further, the WaitLocalRecoveryReserved user does not appear to actually
require the fresh-off-of-the-wire osdmap available from OSDService.
As such, moved the logic into OSDMap itself and simply used the
PG local osdmap.

Note, the above is a change in behavior that probably could use a second
opinion.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move the backfill space reservation back into PG
Samuel Just [Fri, 29 Mar 2019 22:36:55 +0000 (15:36 -0700)]
osd/: move the backfill space reservation back into PG

PeeringState really only needs an interface for requesting
it.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move needs_recover/backfill, all_unfound_are_queried_or_lost
Samuel Just [Fri, 29 Mar 2019 21:55:36 +0000 (14:55 -0700)]
osd/: move needs_recover/backfill, all_unfound_are_queried_or_lost

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: clarify recovery queueing from PeeringState
Samuel Just [Fri, 29 Mar 2019 18:52:37 +0000 (11:52 -0700)]
osd/: clarify recovery queueing from PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move Active purged_snaps handling back to PG
Samuel Just [Fri, 29 Mar 2019 18:06:26 +0000 (11:06 -0700)]
osd/: move Active purged_snaps handling back to PG

Note: this patch only sets dirty_info/dirty_big_info when
info.purged_snaps is actually changed.  I *think* that's
right, but that part deserves particular attention during
review.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: mechanically rename a ton of pg-> to ps->
Samuel Just [Fri, 29 Mar 2019 00:28:40 +0000 (17:28 -0700)]
PeeringState: mechanically rename a ton of pg-> to ps->

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: introduce a macro for the ps, pl, and pg declarations
Samuel Just [Thu, 28 Mar 2019 23:45:54 +0000 (16:45 -0700)]
PeeringState: introduce a macro for the ps, pl, and pg declarations

This way I can mechanically rename all of the PeeringState member
variable references.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move build_prior and related state to PeeringState
Samuel Just [Thu, 28 Mar 2019 22:47:05 +0000 (15:47 -0700)]
osd/: move build_prior and related state to PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: clean up references in Primary, Start, Reset
sjust@redhat.com [Wed, 27 Mar 2019 22:18:24 +0000 (15:18 -0700)]
PeeringState: clean up references in Primary, Start, Reset

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move io reservation machinery into PeeringState
sjust@redhat.com [Mon, 29 Apr 2019 20:53:24 +0000 (13:53 -0700)]
osd/: move io reservation machinery into PeeringState

This patch recasts the reservation and backoff interfaces
on PeeringListener in terms of events to queue rather than
explicit callbacks (PG handles implementing via callbacks).

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: remove remaining scrubber references from PeeringState
Samuel Just [Thu, 28 Mar 2019 22:31:14 +0000 (15:31 -0700)]
osd/: remove remaining scrubber references from PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: rephrase [un]reg_next_scrub as on_info_history_change
sjust@redhat.com [Wed, 27 Mar 2019 23:13:23 +0000 (16:13 -0700)]
osd/: rephrase [un]reg_next_scrub as on_info_history_change

As PeeringState won't be as careful about usage of
on_info_history_change, add a scrub_registered flag
to protect against double-(un)registers.

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: merge update_store_with_options with on_pool_change
sjust@redhat.com [Wed, 27 Mar 2019 22:43:27 +0000 (15:43 -0700)]
osd/: merge update_store_with_options with on_pool_change

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: simply requeue_map_waiters in handle_activate, remove take_waiters
sjust@redhat.com [Wed, 27 Mar 2019 21:44:25 +0000 (14:44 -0700)]
osd/: simply requeue_map_waiters in handle_activate, remove take_waiters

This seems clearer.

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move check_past_interval_bounds into PeeringState
sjust@redhat.com [Wed, 27 Mar 2019 21:40:11 +0000 (14:40 -0700)]
osd/: move check_past_interval_bounds into PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move start_peering_interval and callees into PeeringState
sjust@redhat.com [Wed, 27 Mar 2019 21:24:01 +0000 (14:24 -0700)]
osd/: move start_peering_interval and callees into PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move should_restart_peering to PeeringState
sjust@redhat.com [Wed, 27 Mar 2019 18:31:11 +0000 (11:31 -0700)]
osd/: move should_restart_peering to PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoosd/: move check_full_transition to PeeringState
sjust@redhat.com [Wed, 27 Mar 2019 18:24:41 +0000 (11:24 -0700)]
osd/: move check_full_transition to PeeringState

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPeeringState: route recoverystate_perf calls through PeeringListener
Samuel Just [Wed, 27 Mar 2019 17:05:53 +0000 (10:05 -0700)]
PeeringState: route recoverystate_perf calls through PeeringListener

Signed-off-by: Samuel Just <rexludorum@gmail.com>
6 years agoosd/: move flush state into PeeringState
Samuel Just [Wed, 27 Mar 2019 01:24:21 +0000 (18:24 -0700)]
osd/: move flush state into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move check_recovery_sources and missing_loc into PeeringState
Samuel Just [Wed, 27 Mar 2019 00:38:36 +0000 (17:38 -0700)]
osd/: move check_recovery_sources and missing_loc into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: extract MissingLoc into its own file
Samuel Just [Fri, 12 Apr 2019 18:08:54 +0000 (11:08 -0700)]
osd/: extract MissingLoc into its own file

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move update_history and purge_strays into PeeringState
Samuel Just [Tue, 26 Mar 2019 23:03:20 +0000 (16:03 -0700)]
osd/: move update_history and purge_strays into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move proc_replica_info and some callees into PeeringState
Samuel Just [Fri, 12 Apr 2019 18:08:53 +0000 (11:08 -0700)]
osd/: move proc_replica_info and some callees into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move the is_* and acting/up/backfill helpers into PeeringState
Samuel Just [Fri, 12 Apr 2019 21:41:23 +0000 (14:41 -0700)]
osd/: move the is_* and acting/up/backfill helpers into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: Move osdmap handling into PeeringState
sjust@redhat.com [Fri, 22 Mar 2019 23:47:59 +0000 (16:47 -0700)]
osd/: Move osdmap handling into PeeringState

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: move most peering state to PeeringState
sjust@redhat.com [Fri, 22 Mar 2019 23:19:18 +0000 (16:19 -0700)]
osd/: move most peering state to PeeringState

This patch moves the 40 something peering state variables over into
PeeringState while leaving references to them in PG.  The following
patches will move over the users until all users are in PeeringState.
Then, the PG references will be removed.  A subsequent patch will also
move the recovery_state member to be the last initialize and first
destructed.

Signed-off-by: sjust@redhat.com <sjust@redhat.com>
6 years agoPeeringState: begin abstracting out PG, add dpp for logging
Samuel Just [Fri, 22 Mar 2019 01:21:36 +0000 (18:21 -0700)]
PeeringState: begin abstracting out PG, add dpp for logging

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPGStateUtils: remove PG*, move into PGStateHistory into PeeringState
Samuel Just [Thu, 21 Mar 2019 23:25:17 +0000 (16:25 -0700)]
PGStateUtils: remove PG*, move into PGStateHistory into PeeringState

I don't think there's any need to worry about the pg locking from
PGStateHistory.  NamedState::begin/exit and dump_pgstate_history are the
only users, so the only calls should be under the peering event handler,
the asok command, or the PG constructor and destructor.  The first two
already have the lock.  The last should be safe as well as long as
the state machine states are constructed and destructed after and
before the PGStateHistory instance. As such, this patch removes most
of that state leaving the epoch generation as an interface
implemented by PG.

The snap trimming state machine was already excluded, so that this
patch leaves it disabled.

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: pull NamedState and PGStateHistory out into PGStateUtils
Samuel Just [Thu, 21 Mar 2019 19:36:39 +0000 (12:36 -0700)]
osd/: pull NamedState and PGStateHistory out into PGStateUtils

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: fix pg->info->pgid.pgid references
Samuel Just [Thu, 21 Mar 2019 19:00:09 +0000 (12:00 -0700)]
PeeringState: fix pg->info->pgid.pgid references

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoPeeringState: adjust logging to avoid using pg
Samuel Just [Thu, 21 Mar 2019 18:23:29 +0000 (11:23 -0700)]
PeeringState: adjust logging to avoid using pg

Signed-off-by: Samuel Just <sjust@redhat.com>
6 years agoosd/: mechanically rip PeeringState and friends out into their own file
Samuel Just [Thu, 25 Apr 2019 17:39:22 +0000 (10:39 -0700)]
osd/: mechanically rip PeeringState and friends out into their own file

The next step is to rationalize the PeeringState<->PG relationship.

Signed-off-by: Samuel Just <sjust@redhat.com>