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

Automated cherry pick of #82152: Fix retry logic in DisruptionController #85460

Commits on Nov 19, 2019

  1. Fix retry logic in DisruptionController

    This changes the retry logic in DisruptionController so that it
    reconciles update conflicts. In the old behavior, any pdb status update
    failure was retried with the same status, regardless of error.
    
    Now there is no retry logic with the status update. The error is passed
    up the stack where the PDB can be requeued for processing.
    
    If the PDB status update error is a conflict error, there are some new
    special cases:
    - failSafe is not triggered, since this is considered a retryable error
    - the PDB is requeued immediately (ignoring the rate limiter) because we
      assume that conflict can be resolved by getting the latest version
    Jonathan Basseri committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    73b9592 View commit details
    Browse the repository at this point in the history
  2. Add unit test for DisruptionController retry logic

    This tests the PDB status update path in DisruptionController and
    asserts that conflicting writes (with eviciton handler) are handled
    gracefully.
    
    This adds the client-go fake.Clientset into our tests, because that is
    the layer required for injecting update failures.
    
    This also adds a TestMain so that DisruptionController logs can be
    enabled during test. e.g.,
    
        go test ./pkg/controller/disruption -v -args -v=4
    Jonathan Basseri committed Nov 19, 2019
    Configuration menu
    Copy the full SHA
    b8e9318 View commit details
    Browse the repository at this point in the history