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

Commit

Permalink
CORTX-29710: Hare-HA - Correct the message format sent from Hare to ha
Browse files Browse the repository at this point in the history
Solution:
Fixed format by removing json.dump()
Also fixed 'degraded' event related issue

Signed-off-by: Swapnil Gaonkar <swapnil.gaonkar@seagate.com>
  • Loading branch information
SwapnilGaonkar7 committed Jun 9, 2022
1 parent 3d3ecc1 commit c239790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions hax/hax/ha/message_interface/message_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def initialize_bus(self, util: ConsulUtil):
raise Exception('initialize_bus skipped as configpath not found')

def send(self, event: HaEvent):
event_to_send = json.dumps(event)
self.producer.send([event_to_send])
self.producer.send([event])

def _register_message_type(self, message_type,
partitions: int = 1):
Expand Down
2 changes: 1 addition & 1 deletion hax/hax/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ def get_process_based_node_state(self, node_fid: Fid) -> str:
started_processes += 1
LOG.debug('total procs=%s, started procs=%s', total_processes,
started_processes)
fin_state = 'degarded'
fin_state = 'degraded'
if total_processes == started_processes:
fin_state = 'online'
elif started_processes == 0:
Expand Down

0 comments on commit c239790

Please sign in to comment.