Skip to content

[release-3.10] Fix broken update handling of path-based routes#21901

Closed
openshift-cherrypick-robot wants to merge 1 commit intoopenshift:release-3.10from
openshift-cherrypick-robot:cherry-pick-21877-to-release-3.10
Closed

[release-3.10] Fix broken update handling of path-based routes#21901
openshift-cherrypick-robot wants to merge 1 commit intoopenshift:release-3.10from
openshift-cherrypick-robot:cherry-pick-21877-to-release-3.10

Conversation

@openshift-cherrypick-robot

This is an automated cherry-pick of #21877

/assign stevekuznetsov

When an existing route's path is updated to a new value not previously observed,
the new route state is correctly activated, but the previous route is not
replaced in the `hostRules` internal active list. Instead, the updated route
state (with a different path but duplicate UID) is appended to the active list.
A `hostRules` active list with more than one route instance sharing a UID and
host is an invalid internal state. The net effect is some unintended confusing
behavior which manifests when updating the route's path, including:

  * Updating from path A->B->A preventing future transitions to B

  * Updating from path A->B->A->B leaves an orphaned claim on the host in the
namespace, preventing the recreation of the route with either of the previously
observed paths until the router is restarted (causing the internal state to be
rebuilt)

Routes updates which are affected by this bug will be rejected with a status
like:

    message: route foo already exposes foo-ns.os.example.com and is older
    reason: HostAlreadyClaimed

Where `foo` refers to itself. This indicates the route update was rejected due
to a claim made by the same route being updated.

To fix the problem, ensure that when a path change is detected on the same route
the prior existing state is removed from the index, eliminating the possibility
of keeping an orphaned claim. Then add the new route as usual, which handles
acceptance/rejection normally.
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 29, 2019
@knobunc
Copy link
Contributor

knobunc commented Jan 29, 2019

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: knobunc, openshift-cherrypick-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 29, 2019
@ironcladlou
Copy link
Contributor

/retest

1 similar comment
@ironcladlou
Copy link
Contributor

/retest

@ironcladlou
Copy link
Contributor

ci/openshift-jenkins/extended_conformance_install error looks different but suspiciously related to #21877

@sdodson
Copy link
Member

sdodson commented Jan 29, 2019

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@ironcladlou
Copy link
Contributor

/retest

1 similar comment
@ironcladlou
Copy link
Contributor

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link

@openshift-cherrypick-robot: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/unit 6e41609 link /test unit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@ironcladlou
Copy link
Contributor

ironcladlou commented Jan 29, 2019

Oops, this didn't apply cleanly. Redone in #21903.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants