storj/cmd/satellite
paul cannon 1b8bd6c082 satellite/repair: unify repair logic
The repair checker and repair worker both need to determine which pieces
are healthy, which are retrievable, and which should be replaced, but
they have been doing it in different ways in different code, which has
been the cause of bugs. The same term could have very similar but subtly
different meanings between the two, causing much confusion.

With this change, the piece- and node-classification logic is
consolidated into one place within the satellite/repair package, so that
both subsystems can use it. This ought to make decision-making code more
concise and more readable.

The consolidated classification logic has been expanded to create more
sets, so that the decision-making code does not need to do as much
precalculation. It should now be clearer in comments and code that a
piece can belong to multiple sets arbitrarily (except where the
definition of the sets makes this logically impossible), and what the
precise meaning of each set is. These sets include Missing, Suspended,
Clumped, OutOfPlacement, InExcludedCountry, ForcingRepair,
UnhealthyRetrievable, Unhealthy, Retrievable, and Healthy.

Some other side effects of this change:

* CreatePutRepairOrderLimits no longer needs to special-case excluded
  countries; it can just create as many order limits as requested (by
  way of len(newNodes)).
* The repair checker will now queue a segment for repair when there are
  any pieces out of placement. The code calls this "forcing a repair".
* The checker.ReliabilityCache is now accessed by way of a GetNodes()
  function similar to the one on the overlay. The classification methods
  like MissingPieces(), OutOfPlacementPieces(), and
  PiecesNodesLastNetsInOrder() are removed in favor of the
  classification logic in satellite/repair/classification.go. This
  means the reliability cache no longer needs access to the placement
  rules or excluded countries list.

Change-Id: I105109fb94ee126952f07d747c6e11131164fadb
2023-09-25 09:42:08 -05:00
..
reports cmd/satellite: add project ID, bucket name to partner attribution CSV 2022-06-01 20:27:12 +00:00
admin.go satellite: fix metabase configuration wiring 2022-11-02 15:17:34 +00:00
api.go satellite/satellitedb: cleanup testing access 2023-02-06 14:36:11 +02:00
auditor.go satellite: cleanup orders dependencies 2023-03-09 13:34:21 +00:00
billing_test.go cmd/satellite: change invoicing flags to iso8601 2022-10-07 07:58:23 -07:00
billing.go satellite/payments: Remove expired package credits 2023-05-22 11:58:37 +00:00
compensation.go compensation: always generate invoices for every node 2021-03-29 14:15:45 +00:00
Dockerfile cmd/satellite: build Vuetify project in Dockerfile 2023-09-13 12:43:58 +00:00
entrypoint satellite/entrypoint: Ignore unset variable errors while checking for VALID_EXECUTABLE 2023-07-05 20:18:38 +00:00
fetchpieces.go satellite: cleanup orders dependencies 2023-03-09 13:34:21 +00:00
gc-bf.go satellite: use ranged loop with GC-GF peer 2023-02-13 18:32:21 +00:00
gc.go satellite: fix metabase configuration wiring 2022-11-02 15:17:34 +00:00
gracefulexit.go satellite/satellitedb: Use CRDB AS OF SYSTEM & batch for GE 2021-05-07 13:09:19 -04:00
main.go satellite/payments/stripe/service: add manual payment with token command 2023-07-17 19:24:36 +00:00
output.go satellite: compensation package and commands 2020-03-30 14:08:14 -06:00
rangedloop.go {cmd/storj-sim, satellite/rangedloop}: added rangedloop to storj-sim, removed identity 2023-01-05 11:29:00 +00:00
README.md hc to satellite rename (#282) 2018-08-29 14:32:41 -04:00
repair_segment_test.go cmd/satellite: repair-segment; add option to process csv file directly 2022-11-18 17:40:17 +00:00
repair_segment.go satellite/repair: unify repair logic 2023-09-25 09:42:08 -05:00
repairer.go satellite: cleanup orders dependencies 2023-03-09 13:34:21 +00:00
testdata_test.go satellite: optional migration for integration tests 2022-10-04 11:35:03 +02:00
testdata.go {satellite/console,web/satellite}: get project salt from satellite 2022-10-12 19:06:27 +00:00
ui.go satellite/console: optional separate web app server 2023-07-11 12:17:35 -04:00
usage.go Allow for DB application names per process. (#3983) 2020-12-04 11:24:39 +01:00

Satellite

Documentation for developing and building the satellite service

Usage:

First make an identity:

go install storj.io/storj/cmd/satellite
satellite setup

You can edit ~/.storj/satellite/config.yaml to your liking. Then run it!

satellite run