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

Update from 18.0.0 to 23.0.0 broke upstream URLs with 503 #2130

Open
patolax opened this issue Jul 26, 2024 · 4 comments
Open

Update from 18.0.0 to 23.0.0 broke upstream URLs with 503 #2130

patolax opened this issue Jul 26, 2024 · 4 comments
Labels
needs feedback Issue is waiting on feedback before acceptance Routing Ocelot feature: Routing Service Discovery Ocelot feature: Service Discovery Service Fabric Service discovery by Service Fabric waiting Waiting for answer to question or feedback from issue raiser

Comments

@patolax
Copy link

patolax commented Jul 26, 2024

Expected Behavior / New Feature

The following routes work 18.0.0 version.

    {
      "UpstreamPathTemplate": "/api/{version}/adapter/resources/firmware",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/resources/firmware",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },
    {
      "UpstreamPathTemplate": "/api/{version}/adapter/resources/script",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/resources/script",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },

Actual Behavior / Motivation for New Feature

However, the 23.3.3 upgrade returns 503 now.

If I make changes to adapter segment of the UpstreamPathTemplate paths to say, first route adapterX and seconde route to adapterY. Things start to work

Steps to Reproduce the Problem

Add this config on 23.3.3

    {
      "UpstreamPathTemplate": "/api/{version}/adapter/resources/firmware",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/resources/firmware",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },
    {
      "UpstreamPathTemplate": "/api/{version}/adapter/resources/script",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/resources/script",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },

Specifications

  • Version: 23.3.3
  • Platform: Windows
  • Subsystem: Service Fabric
@raman-m
Copy link
Member

raman-m commented Jul 26, 2024

Hello Tha!

The following routes work 18.0.0 version.
However, the 23.3.3 upgrade returns 503 now.

Could you please attach the content of your logs? I need to review the text of the error message.

To identify the root cause, could you please downgrade from version 23.3.3 to 19.0.0 changing for each major version? This step will assist in pinpointing the precise version that contains the bug and potentially the specific feature that is malfunctioning.


    {
      "UpstreamPathTemplate": "/api/{version}/adapter/resources/firmware",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/resources/firmware",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },
    {
      "UpstreamPathTemplate": "/api/{version}/adapter/resources/script",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/resources/script",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },

and

Subsystem: Service Fabric

The configuration appears correct and should function, but there might be issues, particularly with Service Fabric. Have you considered using a single Catch All route for routing purposes? It looks like both routes could be combined as follows:

    {
      "UpstreamPathTemplate": "/api/{version}/adapter/{everything}",
      "UpstreamHttpMethod": [ "Get" ],
      "DownstreamPathTemplate": "/api/{version}/adapter/{everything}",
      "DownstreamScheme": "http",
      "ServiceName": "Cloud.Services/adapterService"
    },

Please try this configuration in version 23.3.3 and inform us of the outcome.

@raman-m raman-m added needs feedback Issue is waiting on feedback before acceptance waiting Waiting for answer to question or feedback from issue raiser Service Discovery Ocelot feature: Service Discovery Routing Ocelot feature: Routing Service Fabric Service discovery by Service Fabric labels Jul 26, 2024
@raman-m
Copy link
Member

raman-m commented Jul 26, 2024

Top Task

Firstly, it's crucial to determine whether this bug is part of version 23.3.3.
The most critical test involves downgrading to version 23.2.2
If version 23.2.2 is not affected by this bug, then it will be included in the v23.3 Hotfixes milestone.

@patolax
Copy link
Author

patolax commented Jul 29, 2024

See below for test results of different versions.

18.0.0 OK
19.0.4 OK
20.0.0 OK
21.0.0 OK
22.0.0 OK
23.0.0 NOT OK (503)
23.3.3 NOT OK (503)

Only two paths fail, others work fine.

I will rollback to 22.0.0.

@raman-m
Copy link
Member

raman-m commented Jul 30, 2024

Thank you for the testing! It's beneficial that this issue is not part of the v23.3 Hotfixes milestone, which aids in faster delivery. It appears the root cause emerged in version 23.0.0. The changes between 22.0.1...23.0.0 need to be reviewed to pinpoint which specific feature affects the Service Fabric path matching. Likely, it is the commit f4803c2

@raman-m raman-m changed the title Update from 18.0.0 to 23.3.3 broke uptream urls with 503 Update from 18.0.0 to 23.0.0 broke upstream URLs with 503 Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs feedback Issue is waiting on feedback before acceptance Routing Ocelot feature: Routing Service Discovery Ocelot feature: Service Discovery Service Fabric Service discovery by Service Fabric waiting Waiting for answer to question or feedback from issue raiser
Projects
None yet
Development

No branches or pull requests

2 participants