Skip to content

OCPBUGS-75009: skip dynamically adding map entries#726

Open
jcmoraisjr wants to merge 1 commit intoopenshift:masterfrom
jcmoraisjr:OCPBUGS-75009-skip-add-map
Open

OCPBUGS-75009: skip dynamically adding map entries#726
jcmoraisjr wants to merge 1 commit intoopenshift:masterfrom
jcmoraisjr:OCPBUGS-75009-skip-add-map

Conversation

@jcmoraisjr
Copy link
Contributor

DCM updates frontend by adding new map entries. The new entries are however being added in the end of the map list, which can lead to requests being handled incorrectly in case of two distinct routes overlap their URLs.

A proper fix is refactoring the maps entity, making it to sort map entries and replace all the map content. For now, we are skipping the DCM workflow if an add map operation is detected, moving to fork+reload instead.

Jira: https://issues.redhat.com/browse/OCPBUGS-75009

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Feb 3, 2026
@openshift-ci-robot
Copy link
Contributor

@jcmoraisjr: This pull request references Jira Issue OCPBUGS-75009, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

DCM updates frontend by adding new map entries. The new entries are however being added in the end of the map list, which can lead to requests being handled incorrectly in case of two distinct routes overlap their URLs.

A proper fix is refactoring the maps entity, making it to sort map entries and replace all the map content. For now, we are skipping the DCM workflow if an add map operation is detected, moving to fork+reload instead.

Jira: https://issues.redhat.com/browse/OCPBUGS-75009

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign candita for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@lihongan
Copy link
Contributor

lihongan commented Feb 4, 2026

/retest

@ShudiLi
Copy link
Member

ShudiLi commented Feb 4, 2026

Tested it with 4.22.0-0-2026-02-04-071816-test-ci-ln-h9p6wnk-latest

1. Created the cluster by bot
launch 4.22,openshift/router#726,openshift/api#2621 gcp

2.
% oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-02-04-071816-test-ci-ln-h9p6wnk-latest   True        False         76m     Cluster version is 4.22.0-0-2026-02-04-071816-test-ci-ln-h9p6wnk-latest

3. Enable DCM
% oc get featuregates cluster -oyaml | yq ".status.featureGates[0].enabled" | grep IngressControllerDynamicConfigurationManager
- name: IngressControllerDynamicConfigurationManager
% oc -n openshift-ingress get deployment router-default -oyaml | grep -i -A1 -E "ROUTER_MAX_DYNAMIC_SERVERS|ROUTER_BLUEPRINT_ROUTE_POOL_SIZE"
        - name: ROUTER_BLUEPRINT_ROUTE_POOL_SIZE
          value: "0"
--
        - name: ROUTER_MAX_DYNAMIC_SERVERS
          value: "1"
% 

4.  Patched the default ingresscontroller with  InterNamespaceAllowed namespaceOwnership 

5. Created two namespaces, created pod, service and route with same hostnames but with different paths under each namespace 
% oc -n test get route
NAME          HOST/PORT                                                       PATH    SERVICES      PORT          TERMINATION   WILDCARD
unsec-apach   unsec-service.apps.ci-ln-h9p6wnk-72292.gcp-2.ci.openshift.org   /path   unsec-apach   unsec-apach                 None
% oc -n test2 get route
NAME           HOST/PORT                                                       PATH        SERVICES       PORT           TERMINATION   WILDCARD
unsec-apach2   unsec-service.apps.ci-ln-h9p6wnk-72292.gcp-2.ci.openshift.org   /path/bar   unsec-apach2   unsec-apach2                 None

6. Curl the two routes
% curl http://unsec-service.apps.ci-ln-h9p6wnk-72292.gcp-2.ci.openshift.org/path/index.html
path test
% curl http://unsec-service.apps.ci-ln-h9p6wnk-72292.gcp-2.ci.openshift.org/path/bar/index.html
path/bar test
%

DCM updates frontend by adding new map entries. The new entries are
however being added in the end of the map list, which can lead to
requests being handled incorrectly in case of two distinct routes
overlap their URLs.

A proper fix is refactoring the maps entity, making it to sort map
entries and replace all the map content. For now, we are skipping the
DCM workflow if an add map operation is detected, moving to fork+reload
instead.
@jcmoraisjr jcmoraisjr force-pushed the OCPBUGS-75009-skip-add-map branch from a741e8a to 94d80ee Compare February 4, 2026 13:30
@alebedev87
Copy link
Contributor

/assign @bentito

@jcmoraisjr
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 4, 2026

@jcmoraisjr: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants