Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

EOS-27350: Utils_setup reset and cleanup phases are failing #703

Merged
merged 5 commits into from
Jan 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions py-utils/src/setup/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,14 @@ def reset(config_path: str):
from cortx.utils.message_bus.error import MessageBusError
_purge_retry = 20
try:
from cortx.utils.message_bus import MessageBusAdmin
from cortx.utils.message_bus import MessageBusAdmin, MessageBus
from cortx.utils.message_bus import MessageProducer
Conf.load('config', config_path, skip_reload=True)
message_bus_backend = Conf.get('config', \
'cortx>utils>message_bus_backend')
message_server_endpoints = Conf.get('config', \
f'cortx>external>{message_bus_backend}>endpoints')
MessageBus.init(message_server_endpoints)
mb = MessageBusAdmin(admin_id='reset')
message_types_list = mb.list_message_types()
if message_types_list:
Expand Down Expand Up @@ -297,7 +303,13 @@ def cleanup(pre_factory: bool, config_path: str):
# delete message_types
from cortx.utils.message_bus.error import MessageBusError
try:
from cortx.utils.message_bus import MessageBusAdmin
from cortx.utils.message_bus import MessageBus, MessageBusAdmin
Conf.load('config', config_path, skip_reload=True)
message_bus_backend = Conf.get('config', \
'cortx>utils>message_bus_backend')
message_server_endpoints = Conf.get('config', \
f'cortx>external>{message_bus_backend}>endpoints')
MessageBus.init(message_server_endpoints)
mb = MessageBusAdmin(admin_id='cleanup')
message_types_list = mb.list_message_types()
if message_types_list:
Expand Down