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

v3 breaks TCP route HostSNI having multiple entries #10674

Closed
2 tasks done
resmo opened this issue May 1, 2024 · 4 comments
Closed
2 tasks done

v3 breaks TCP route HostSNI having multiple entries #10674

resmo opened this issue May 1, 2024 · 4 comments
Labels
area/rules area/tcp kind/bug/confirmed a confirmed bug (reproducible).
Milestone

Comments

@resmo
Copy link

resmo commented May 1, 2024

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

We configured TCP route based on HostSNI and in the past (in v2) for which we were able to pass several entries into HostSNI():

"Tags": [
"traefik.enable=true",
"traefik.tcp.routers.example-prod-website-https.entrypoints=websecure",
"traefik.tcp.routers.example-prod-website-https.rule=HostSNI(`example.com`,`www.example.com`)",
"traefik.tcp.routers.example-prod-website-https.service=example-prod-website-https",
"traefik.tcp.routers.example-prod-website-https.tls.passthrough=true"
],

This seems no longer possible, even with --core.defaultRuleSyntax=v2, but we haven't read anything about it the migration docs.

What did you see instead?

error while adding rule Host(`example.com`,`www.example.com`): error while adding rule Host: unexpected number of parameters; got 2, expected one of [1]

What version of Traefik are you using?

docker image traefik:v3.0.0

What is your environment & configuration?

core:
  defaultRuleSyntax: v2

providers:
  consulCatalog:
    refreshInterval: 5s
    prefix: traefik
    exposedByDefault: false
    endpoint:
      address: 127.0.0.1:8500
      scheme: http

entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"
  traefik:
    address: ":8080"

If applicable, please paste the log output in DEBUG level

No response

@ldez
Copy link
Member

ldez commented May 1, 2024

Hello,

I recommend reading the migration guide: https://doc.traefik.io/traefik/migration/v2-to-v3/#router-rule-matchers

You should either enable v2 compatibility or split your rule HostSNI(`example.com`) || HostSNI(`www.example.com`)

@resmo
Copy link
Author

resmo commented May 1, 2024

thanks @ldez but even with

--core.defaultRuleSyntax=v2

or

core:
  defaultRuleSyntax: v2

We still get the same behaviour and error messages. I updated the main description accordingly.

@lbenguigui lbenguigui self-assigned this May 2, 2024
@lbenguigui lbenguigui added kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. and removed status/0-needs-triage labels May 2, 2024
@lbenguigui
Copy link
Contributor

lbenguigui commented May 2, 2024

Hello @resmo ,

Thanks for reporting this issue, I opened a PR to fix it (#10680).

@lbenguigui lbenguigui added kind/bug/confirmed a confirmed bug (reproducible). area/rules area/tcp and removed kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. labels May 2, 2024
@lbenguigui lbenguigui removed their assignment May 2, 2024
@traefiker traefiker added this to the 3.0 milestone May 14, 2024
@traefiker
Copy link
Contributor

Closed by #10680.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rules area/tcp kind/bug/confirmed a confirmed bug (reproducible).
Projects
None yet
Development

No branches or pull requests

4 participants