Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to adjust retry parameters in test_check_pod_status_after_two_nodes_shutdown_recovery #11298

Open
AviadP opened this issue Feb 4, 2025 · 0 comments
Assignees
Labels
bug Something isn't working Squad/Brown

Comments

@AviadP
Copy link
Contributor

AviadP commented Feb 4, 2025

tries = 30, delay = 15, backoff = 2, max_timeout = 14400, max_delay = 600

def validate_retry_params(tries, delay, backoff, max_timeout, max_delay):
"""
Validate retry parameters to ensure the total retry time does not exceed max_timeout.

Args:
    tries: Number of retry attempts.
    delay: Initial delay between retries in seconds.
    backoff: Multiplicative factor for backoff.
    max_timeout: Maximum total time for retries in seconds.
    max_delay: Maximum delay between retries in seconds.

Raises:
    ValueError: If the retry configuration exceeds the maximum timeout.
"""
total_time = 0
current_delay = delay

for attempt in range(tries):
    total_time += current_delay
    if total_time > max_timeout:

      raise ValueError(
            f"The retry configuration exceeds the maximum allowed timeout ({max_timeout} seconds) "
            f"with the given parameters: tries={tries}, delay={delay}, backoff={backoff}, max_delay={max_delay}."
            f"You reached to: {max_timeout} seconds! Please fix it or adjust parameters of retry."
        )

E ValueError: The retry configuration exceeds the maximum allowed timeout (14400 seconds) with the given parameters: tries=30, delay=15, backoff=2, max_delay=600.You reached to: 14400 seconds! Please fix it or adjust parameters of retry.

ocs_ci/utility/retry.py:28: ValueError

@AviadP AviadP added bug Something isn't working Squad/Brown labels Feb 4, 2025
@AviadP AviadP self-assigned this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Squad/Brown
Projects
None yet
Development

No branches or pull requests

1 participant