nodepool/nodepool/driver/fake
Joshua Watt 2c632af426 Do not reset quota cache timestamp when invalid
The quota cache may not be a valid dictionary when
invalidateQuotaCache() is called (e.g. when 'ignore-provider-quota' is
used in OpenStack). In that case, don't attempt to treat the None as a
dictionary as this raises a TypeError exception.

This bug was preventing Quota errors from OpenStack from causing
nodepool to retry the node request when ignore-provider-quota is True,
because the OpenStack handler calles invalidateQuotaCache() before
raising the QuotaException. Since invalidateQuotaCache() was raising
TypeError, it prevented the QuotaException from being raised and the
node allocation was outright failed.

A test has been added to verify that nodepool and OpenStack will now
retry node allocations as intended.

This fixes that bug, but does change the behavior of OpenStack when
ignore-provider-quota is True and it returns a Quota error.

Change-Id: I1916c56c4f07c6a5d53ce82f4c1bb32bddbd7d63
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2022-05-10 15:04:25 -05:00
..
__init__.py Remove unused use_taskmanager flag 2019-04-02 12:11:07 +00:00
config.py Refactor provider config to driver module 2017-11-29 05:22:12 +00:00
handler.py Add launcher ID to log messages 2017-10-04 07:22:39 -04:00
provider.py Do not reset quota cache timestamp when invalid 2022-05-10 15:04:25 -05:00