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

OCPBUGS-16707: UniqueHost: Fix incorrect identification of conflicting route #508

Commits on Aug 31, 2023

  1. UniqueHost: Fix incorrect identification of conflicting route

    When a route is rejected due to the host already being claimed, it was
    always selecting the first route but the first route is not guaranteed
    to being the conflicting route.
    
    All routes for the host are retrieved using the 'RoutesForHost'
    function and that function returns a slice of routes derived from a
    map in the 'hostIndex' structure. Since maps do not guarantee order,
    the first route was not necessarily the oldest.
    
    The fix is to first sort the conflicting routes based on their
    submission time, and then pick the newest.
    
    Fixes: https://issues.redhat.com/browse/OCPBUGS-16707
    frobware committed Aug 31, 2023
    Copy the full SHA
    ca357ed View commit details
    Browse the repository at this point in the history