title: Update oslo_messaging_RPCClient

oslo_messaging.RPCClient is currently deprecated.
Configure health probe to use get_rpc_client if get_rpc_client is
available

story: 2010766
task: 48076
Change-Id: I0795e6e099b935ead8d6d3d22722999b852749d0
This commit is contained in:
moontaek-rho 2023-05-24 00:45:45 +09:00
parent 639a4d0874
commit 969e3f7871
3 changed files with 10 additions and 4 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Nova
name: nova
version: 0.3.11
version: 0.3.12
home: https://docs.openstack.org/nova/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png
sources:

View File

@ -65,9 +65,14 @@ def check_service_status(transport):
server=_get_hostname(service_queue_name, use_fqdn),
namespace='baseapi',
version="1.1")
client = oslo_messaging.RPCClient(transport, target,
timeout=rpc_timeout,
retry=rpc_retries)
if hasattr(oslo_messaging, 'get_rpc_client'):
client = oslo_messaging.get_rpc_client(transport, target,
timeout=rpc_timeout,
retry=rpc_retries)
else:
client = oslo_messaging.RPCClient(transport, target,
timeout=rpc_timeout,
retry=rpc_retries)
client.call(context.RequestContext(),
'ping',
arg=None)

View File

@ -80,4 +80,5 @@ nova:
- 0.3.9 Fix typo in spice proxy deployment
- 0.3.10 Define service_type in keystone_authtoken to support application credentials with access rules
- 0.3.11 Update get_notification_transport
- 0.3.12 Update oslo_messaging_RPCClient
...