swift/test/unit/container
Matthew Oliver fb186f6710 Add a config file option to swift-manage-shard-ranges
While working on the shrinking recon drops, we want to display numbers
that directly relate to how tool should behave. But currently all
options of the s-m-s-r tool is driven by cli options.

This creates a disconnect, defining what should be used in the sharder
and in the tool via options are bound for failure. It would be much
better to be able to define the required default options for your
environment in one place that both the sharder and tool could use.

This patch does some refactoring and adding max_shrinking and
max_expanding options to the sharding config. As well as adds a
--config option to the tool.

The --config option expects a config with at '[container-sharder]'
section. It only supports the shard options:
 - max_shrinking
 - max_expanding
 - shard_container_threshold
 - shard_shrink_point
 - shard_merge_point

The latter 2 are used to generate the s-m-s-r's:
 - shrink_threshold
 - expansion_limit
 - rows_per_shard

Use of cli arguments take precedence over that of the config.

Change-Id: I4d0147ce284a1a318b3cd88975e060956d186aec
2021-03-12 10:49:46 +11: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 Merge "Enable shard ranges to be manually shrunk to root container" 2021-02-08 03:01:39 +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 Add a config file option to swift-manage-shard-ranges 2021-03-12 10:49:46 +11: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