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

Commit

Permalink
motr-freespace-monitor: Add a delay between retry if capacity_info is
Browse files Browse the repository at this point in the history
not retrieved from hare

Problem : Hare may take sometime to retrieve capcacity info during
startup, if the capacity_info is not recieved, free space monitor would
timeout with error.
Solution: Add delay between retry, After 10 retries, if it still fails
than return failure.

Signed-off-by: Yeshpal Jain <yeshpal.jain@seagate.com>
  • Loading branch information
yeshpal-jain-seagate committed Jul 20, 2021
1 parent bcb31b1 commit 246085e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def execute_command(command):
console_output = json.loads(process.stdout.decode('utf-8'))
capacity_info = console_output.get('filesystem',{}).get('stats',{})
if not capacity_info:
time.sleep(iem_alert_check_interval)
continue
return capacity_info

Expand Down

0 comments on commit 246085e

Please sign in to comment.