swift/swift
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
..
account replace md5 with swift utils version 2020-12-15 09:52:55 -05:00
cli Add a config file option to swift-manage-shard-ranges 2021-03-12 10:49:46 +11:00
common Add a config file option to swift-manage-shard-ranges 2021-03-12 10:49:46 +11:00
container Add a config file option to swift-manage-shard-ranges 2021-03-12 10:49:46 +11:00
locale Imported Translations from Zanata 2020-10-11 08:24:38 +00:00
obj Fix race in diskfile.relink_paths 2021-03-03 14:29:12 +00:00
proxy Fix logging in proxy container GET path 2021-01-22 13:10:16 +00:00
__init__.py py2: Suppress more CryptographyDeprecationWarnings 2020-11-13 22:04:03 -08:00