ironic/ironic/conf
Dmitry Tantsur 5471157e4f Fixes a race condition in the hash ring code
The current hash ring code suffers from several problems:

1. The cache is reset on any get_topic_for call, which means that the
   cache is not used between API calls. Previously it was done to work
   around the situation when a new conductor is not visible until the API
   process restarts. Currently we refresh the hash rings periodically.

   This patch removes resetting the cache. To avoid waiting 2 minutes to
   be able to use a new driver:
   1) the hash ring cache is always rebuilt when a ring is not found,
   2) the hash_ring_reset_interval option was changed to 15 seconds.

2. The reset of the cache races with the hot path in the get_ring call.
   It is possible that the reset happens after the class-level cache
   variable is checked but before it is used, yielding None.

   This patch stores the value of the class-level variable to a local
   variable before checking, thus ensuring None is never returned.

Finally, some logging was added to the modified code to make this kind
of problems more debugable in the future.

Change-Id: I6e18c6ec23a053b59c76fcadd52b13d84d81b4fb
Story: #2003966
Task: #26896
Partial-Bug: #1792872
2018-10-05 07:36:30 -04:00
..
__init__.py Remove deprecated [keystone] config section 2018-06-11 13:30:50 +00:00
agent.py Direct deploy serve HTTP images from conductor 2018-09-07 17:06:35 +08:00
ansible.py fix typos in documentation 2018-03-23 08:30:57 +08:00
api.py Use HostAddressOpt for opts that accept IP and hostnames 2018-08-17 13:35:25 +00:00
audit.py Fix default value of "ignore_req_list" config option 2016-12-09 16:14:21 +02:00
auth.py Finalize migration to keystoneauth adapters 2017-12-19 12:17:35 +02:00
cinder.py Use adapters for cinderclient 2017-11-21 09:32:21 +02:00
cisco.py Centralize Config Options - patch merge, cleanup 2016-08-25 11:08:00 -07:00
conductor.py Merge "Disable periodic tasks if interval set to 0" 2018-10-02 23:46:09 +00:00
console.py Make IP address of socat console configurable 2017-07-07 13:14:03 +08:00
database.py Remove overwriting the default value of db_max_retries. 2017-03-10 10:41:27 -08:00
default.py Fixes a race condition in the hash ring code 2018-10-05 07:36:30 -04:00
deploy.py Direct deploy serve HTTP images from conductor 2018-09-07 17:06:35 +08:00
dhcp.py Centralize config options - [dhcp] 2016-06-16 17:11:14 -07:00
drac.py Disable periodic tasks if interval set to 0 2018-08-14 01:19:02 +00:00
glance.py Remove endpoint_type from configuration 2018-05-22 19:53:55 +03:00
healthcheck.py Add optional healthcheck middleware 2018-02-12 14:48:05 -05:00
ilo.py Adds support for soft power operations to 'ilo' power interface 2018-10-01 01:30:01 -04:00
inspector.py Deprecate [inspector]enabled option 2018-06-27 16:21:55 +02:00
ipmi.py Remove deprecated option [ipmi]retry_timeout 2018-07-21 14:36:36 +08:00
irmc.py Add CUSTOM_CPU_FPGA Traits value to ironic inspection 2018-07-11 19:09:03 +07:00
iscsi.py Centralize config options - [iscsi] 2016-08-12 06:56:25 -07:00
metrics.py Pass agent metrics config via conductor 2016-08-02 17:56:43 +00:00
metrics_statsd.py Pass agent metrics config via conductor 2016-08-02 17:56:43 +00:00
neutron.py Add descriptions for config option choices 2018-03-14 20:27:50 -04:00
oneview.py Remove python-oneviewclient from oneview hardware type. 2018-01-25 01:30:27 +00:00
opts.py Remove deprecated [keystone] config section 2018-06-11 13:30:50 +00:00
pxe.py Remove the duplicated word 2018-08-17 15:14:37 +08:00
redfish.py Add redfish driver 2017-04-21 11:06:24 +01:00
service_catalog.py Introduce keystoneauth adapters for clients 2017-08-22 06:07:19 +00:00
snmp.py Make SNMP UDP transport settings configurable 2017-08-18 14:42:21 +00:00
swift.py Fix swiftclient creation 2017-12-06 14:14:29 +00:00
xclarity.py Mark xclarity password as secret 2018-05-15 09:47:21 +03:00