Add sorting_method to swift proxy config as needed
When read_affinity is used and sorting_method is not used warnings are generated in the swift proxy log indicating that the read_affinity is not being respected. When read_affinity is specified this change sets the sorting_method to affinity automatically, and otherwise uses a configured value which defaults to shuffle. Note that write_affinity does not respect sorting_method and follows a different code path and does not issue warnings in logs when used without sorting_method. Closes-bug: 1480581 Co-Authored-By: Andy McCrae <andy.mccrae@gmail.com> Change-Id: I3cab89c95f288b4a59f4dd3c7360daca7a4f47bf
This commit is contained in:
parent
8350d9ed5a
commit
e673b64caa
|
@ -93,6 +93,7 @@ swift_allow_versions: True
|
|||
swift_allow_all_users: False
|
||||
# If you want to regenerate the swift keys, on a run, for rsync purposes set this var to True otherwise keys will be generated on the first run and not regenerated each run.
|
||||
swift_recreate_keys: False
|
||||
swift_sorting_method: shuffle
|
||||
|
||||
## Swift ceilometer variables
|
||||
swift_reselleradmin_role: ResellerAdmin
|
||||
|
|
|
@ -23,6 +23,7 @@ account_autocreate = true
|
|||
{% if swift_proxy_vars is defined %}
|
||||
{% if swift_proxy_vars.read_affinity is defined %}
|
||||
read_affinity = {{ swift_proxy_vars.read_affinity }}
|
||||
{% set swift_sorting_method = 'affinity' %}
|
||||
{% endif %}
|
||||
{% if swift_proxy_vars.write_affinity is defined %}
|
||||
write_affinity = {{ swift_proxy_vars.write_affinity }}
|
||||
|
@ -31,6 +32,7 @@ write_affinity_node_count = {{ swift_proxy_vars.write_affinity_node_count }}
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
sorting_method = {{ swift_sorting_method }}
|
||||
|
||||
{% if 'tempauth' in swift_middleware_list %}
|
||||
[filter:tempauth]
|
||||
|
|
Loading…
Reference in New Issue