Updates:
        Status: Fixed
        Labels: -Milestone-Release2.13 Milestone-Release2.17

Comment #1 on issue 1078 by [email protected]: Add timeouts to retries for SSH operations
https://code.google.com/p/ganeti/issues/detail?id=1078

Fixed with:

commit ef1443103f7475038aae2789cea9de02d6e7cd8b
Author: Helga Velroyen <[email protected]>
Date:   Mon Jan 11 15:32:47 2016 +0100

    Introduce backoff to RetryByNumberOfTimes

    This patch adds a backing-off mechanism to the function
    RetryByNumberOfTimes. This is useful for example when SSH
    connections fail in a flaky network. The original version of
    RetryByNumberOfTimes immediately retried failed SSH calls,
    but that might not be enough to recover from a network
    problem.

    The patch adds an additional parameter 'backoff' which
    specifies the base number of seconds of the backoff. That
    means after the first failed try, a delay is added as long
    as the backoff parameter specifies. With each additional
    failed try, the delay is doubled until the maximum
    number of retries is hit.

    Note that the backoff parameter is not a keyword argument,
    which might have been more convenient. That's because
    otherwise RetryByNumberOfTimes would no longer be able
    to propagate *args and **kwargs to the function to be
    called with retries.

    Also note that there is a function "Retry" in the same
    package, which already provides somewhat complicated
    timeout capabilities. However, we did not merge these
    two functions, because Retry also does not propagate
    *args and **kwargs properly which is something we
    depend on in backend.py.

    This patch also updates the unit tests and mocks the
    sleep function in the backend.py's unit tests to not
    slow down the tests.

    This fixes issue 1078.

    Signed-off-by: Helga Velroyen <[email protected]>
    Reviewed-by: Klaus Aehlig <[email protected]>

commit 8bc5b4e5ed07044cd935d70efd582f28fa1a6bc5
Author: Helga Velroyen <[email protected]>
Date:   Mon Jan 11 14:19:45 2016 +0100

    Unit tests for RetryByNumberOfTimes

    As this patch series will alter the behavior of
    the function RetryByNumberOfTimes, we first add a
    few unit tests to ensure we don't break anything.

    Signed-off-by: Helga Velroyen <[email protected]>
    Reviewed-by: Klaus Aehlig <[email protected]>

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Reply via email to