summaryrefslogtreecommitdiff
path: root/ironic/conf
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2022-10-31 11:19:08 +0100
committerDmitry Tantsur <dtantsur@protonmail.com>2022-11-09 12:26:05 +0000
commit4de58fa80763df74672a8b6d0b73483b1e8ed3e3 (patch)
treeb4c20a7d891f5497f8b27510ef4e9c49a492f65d /ironic/conf
parent9a06744458fbab6e44ec4bd8fa9816f65a770d29 (diff)
downloadironic-4de58fa80763df74672a8b6d0b73483b1e8ed3e3.tar.gz
Fix the invalid glance client test
It relied on mocking tenacity.retry, but it's executed on class initialization. Depending on the ordering, it may do nothing or it may replace ImageService.call with a mock. Instead, add a new tenacity helper that loads an option in runtime. As a nice side effect, [glance]num_retries is now mutable. Change-Id: I2e02231d294997e824db77c998ef8d352fa69075 (cherry picked from commit cab51a9fcc022f2e4bb634277dd20e90e2dc78f7)
Diffstat (limited to 'ironic/conf')
-rw-r--r--ironic/conf/glance.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ironic/conf/glance.py b/ironic/conf/glance.py
index a3286b1eb..317f213bc 100644
--- a/ironic/conf/glance.py
+++ b/ironic/conf/glance.py
@@ -114,6 +114,7 @@ opts = [
'will determine how many containers are created.')),
cfg.IntOpt('num_retries',
default=0,
+ mutable=True,
help=_('Number of retries when downloading an image from '
'glance.')),
]