Skip to content

Commit f20346b

Browse files
committed
Honor [neutron]http_retries in the manual client
Change Ifb3afb13aff7e103c2e80ade817d0e63b624604a added a nova side config option for specifying neutron client retries that maps to the ksa connect_retries config option to provide parity with the cinder and glance clients that have nova side config options. That change missed passing CONF.neutron.http_retries to the manual client used for calling the port binding API. This sets the connect_retries attribute on the manual ksa client so http_retries will be honored. Closes-Bug: #1929886 Related-Bug: #1866937 Change-Id: I8296e4be9f0706fab043451b856efadbb7bd41f6 (cherry picked from commit 56eb253) (cherry picked from commit 46aa3f4)
1 parent e954a56 commit f20346b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

nova/network/neutron.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ def _get_ksa_client(context, admin=False):
271271
client = utils.get_ksa_adapter(
272272
'network', ksa_auth=auth_plugin, ksa_session=session)
273273
client.additional_headers = {'accept': 'application/json'}
274+
client.connect_retries = CONF.neutron.http_retries
274275
return client
275276

276277

nova/tests/unit/network/test_neutron.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ def test_neutron_http_retries(self):
253253
auth_token='token')
254254
cl = neutronapi.get_client(my_context)
255255
self.assertEqual(retries, cl.httpclient.connect_retries)
256+
kcl = neutronapi._get_ksa_client(my_context)
257+
self.assertEqual(retries, kcl.connect_retries)
256258

257259

258260
class TestAPIBase(test.TestCase):

0 commit comments

Comments
 (0)