Changes health probe to cleanly close connection

Currently, the health-probe.py file opens connection
to amqp for rpc test, however, does not cleanly close
the client transport connection. This causes ampq like
rabbitmq to log warning messages and makes troubleshooting
difficult. This patch adds a clean transport.clenup once
the rpc test is over.

Change-Id: I55824d550344771368f97462836d5386cbf50fcd
This commit is contained in:
Sulochan Acharya 2025-03-12 13:14:22 +00:00
parent 8157ffc930
commit 09e2d55cc4
2 changed files with 8 additions and 0 deletions

View File

@ -104,6 +104,10 @@ def check_agent_status(transport):
" agent")
sys.exit(0)
finally:
if transport:
transport.cleanup()
def sriov_readiness_check():
"""Checks the sriov configuration on the sriov nic's"""

View File

@ -103,6 +103,10 @@ def check_service_status(transport):
" service")
sys.exit(0)
finally:
if transport:
transport.cleanup()
def tcp_socket_status(process, ports):
"""Check the tcp socket status on a process"""