swift/swift
Kota Tsuyuzaki 1eb96397e7 Fix EC ring validation at ring reload
Swift EC has a strong constraint about the ring must have a number of
replicas which fits ec_k + ec_m. That is validated when servers waking
up. However, Swift has more chance to load such an invalid ring when
a request comming, calling some node iteration like get_nodes,
get_part_nodes or so, and no ring validation is there.

This patch moves ring validation from policy validate_ring into the ring
instance as validation_hook that will run at ring reload. Since this patch,
ring instance will allow to use the old ring if the reload is not fourced.

Note that the exception if invalid ring found was changed from
RingValidationError to RingLoadError because RingValidationError is a
child of RingBuilderError but the ring reload is obviously outside of
"builder".

Closes-Bug: #1534572

Change-Id: I6428fbfb04e0c79679b917d5e57bd2a34f2a0875
2016-07-24 21:49:57 -07:00
..
account Fixed typo in reaper.py 2016-07-18 19:49:44 +00:00
cli Reduce code duplication 2016-07-15 12:40:53 +02:00
common Fix EC ring validation at ring reload 2016-07-24 21:49:57 -07:00
container Fixed Typo in updater.py 2016-07-19 21:37:54 +00:00
locale Imported Translations from Zanata 2016-07-19 08:27:04 +00:00
obj Remove red herring from logs 2016-07-18 14:01:57 -07:00
proxy Merge "Add log format to i18n" 2016-07-22 12:40:02 +00:00
__init__.py Make pbr a build-time only dependency 2013-10-29 12:29:49 -07:00