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

Bug 1780794: unique_host: HandleRoute: No error if host claimed #69

Commits on Dec 6, 2019

  1. unique_host: HandleRoute: No error if host claimed

    Change the unique_host plugin's HandleRoute method not to return an error
    because the host name is claimed.
    
    Returning an error causes the controller to log an unhelpful error message:
    
        router_controller.go:244] another route has claimed this host
    
    The plugin already logs the conflict, along with the host name and the
    claimants' names and namespaces, at a higher log level and updates the
    Route's status to indicate that it has been rejected because of a
    preëmpting claim.  Moreover, a conflicting claim does not logically
    represent an error condition for the plugin or controller, and in the
    absence of such, it makes more sense return a nil error value after logging
    the condition.
    
    This commit fixes bug 1780794.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1780794
    
    * pkg/router/controller/unique_host.go: Do not return a gratuitous error
    value for a preëmpting claim.
    * pkg/router/template/plugin_test.go (TestHandleRoute): Expect a nil error
    value from the unique_host plugin when handling a valid Route for which a
    preëmpting claim exists.
    Miciah committed Dec 6, 2019
    Configuration menu
    Copy the full SHA
    7f1c1b7 View commit details
    Browse the repository at this point in the history