swift/test/unit/container
Alistair Coles c9c42c07c9 swift-manage-shard-ranges: add repair and analyze commands
Adds a repair command that reads shard ranges from the container DB,
identifies overlapping shard ranges and recommends how overlaps can be
repaired by shrinking into a single chosen path.  Prompted user input
or a '-y' option will then cause the appropriately modified shard
ranges to be merged into the container DB.

The repair command does not fix gaps in shard range paths and can
therefore only succeed if there is at least one unbroken path of
shards through the entire namespace.

Also adds an analyze command that loads shard data from a file and
reports overlapping shard ranges, but takes no action.  The analyze
command is similar to the repair command but reads shard data from
file rather than a container db and makes no changes to the db.

e.g.:
  swift-manage-shard-ranges <db-file-name> repair
  swift-manage-shard-ranges <shard-data.json> analyze

to see more detail:
  swift-manage-shard-ranges -v <shard-data.json> analyze

For consistency with the new repair command, and to be more cautious,
this patch changes the user input required to apply the compact
command changes to the DB from 'y' to 'yes'.

Change-Id: I9ec411462e4aaf9f21aba6c5fd7698ff75a07de3
2021-03-25 11:00:15 +00:00
..
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
test_auditor.py Pass logger instances to AccountBroker/ContainerBroker 2019-05-03 01:15:20 +09:00
test_backend.py swift-manage-shard-ranges: add repair and analyze commands 2021-03-25 11:00:15 +00:00
test_reconciler.py Allow direct and internal clients to use the replication network 2020-08-04 21:22:04 +00:00
test_replicator.py sharding: Better-handle newlines in container names 2020-01-03 16:04:57 -08:00
test_server.py Enable shard ranges to be manually shrunk to root container 2021-02-05 11:44:50 +00:00
test_sharder.py swift-manage-shard-ranges: add repair and analyze commands 2021-03-25 11:00:15 +00:00
test_sync.py Stop retrying every deletes in container-sync 2020-01-20 22:06:44 -08:00
test_sync_store.py Cleanup test tempdirs in tearDown 2017-09-01 15:34:30 +01:00
test_updater.py pep8: Turn on E305 2020-04-03 21:22:38 +02:00