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

Ingress-nginx return 503 error if service name is longer than 58 chars #9276

Closed
askoriy opened this issue Nov 8, 2022 · 4 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@askoriy
Copy link

askoriy commented Nov 8, 2022

What happened:

After upgrading to v1.4.0 (which shipped with helm-chart v4.3.0) ingress pointed to the service with a name of more than 58 chars length continuously returns 503 status,
and logs have

W1108 23:09:29.795163       7 endpointslices.go:81] Error obtaining Endpoints for Service "default/test-app9012345678901234567890123456789012345678901234567890123": no object matching key "default/test-app9012345678901234567890123456789012345678901234567890123" in local store
W1108 23:09:29.795259       7 controller.go:1112] Service "default/test-app9012345678901234567890123456789012345678901234567890123" does not have any active Endpoint.

Previous version v1.3.1 (helm-chart v4.2.5) worked fine.

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):

NGINX Ingress controller
  Release:       v1.4.0
  Build:         50be2bf95fd1ef480420e2aa1d6c5c7c138c95ea
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.19.10

Kubernetes version (use kubectl version):
v1.24.2 (reprodusable in rancher/k3s:v1.24.2-k3s2)

How to reproduce this issue:

  1. Install ingress-nginx 1.4.0 by helm chart with default values

  2. Deploy sample app with service name longer 58 chars and ingress

by this manifest
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test-app
  template:
    metadata:
      labels:
        app: test-app
    spec:
      containers:
      - name: nginx
        image: nginx:latest
        ports:
        - containerPort: 80
          name: http
          protocol: TCP

---
apiVersion: v1
kind: Service
metadata:
  #     0        1         2         3         4         5         6
  name: test-app9012345678901234567890123456789012345678901234567890123
spec:
  type: ClusterIP
  ports:
  - name: service
    port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: test-app

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  name: test-app
spec:
  rules:
  - host: test-app.mydomain
    http:
      paths:
      - backend:
          service:
            name: test-app9012345678901234567890123456789012345678901234567890123
            port:
              number: 80
        path: /
        pathType: ImplementationSpecific
  1. Run curl test-app.mydomain to see the problem

  2. (optional) Downgrade ingress-nginx to v1.3.1 to check that problem not exists in previous release

@askoriy askoriy added the kind/bug Categorizes issue or PR as related to a bug. label Nov 8, 2022
@k8s-ci-robot
Copy link
Contributor

@askoriy: This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Nov 8, 2022
@longwuyuan
Copy link
Contributor

Please check if duplicte of #9240
Release with fix #9245 will happen in next few days

@longwuyuan
Copy link
Contributor

Duplicaate of #9240
/close

@k8s-ci-robot
Copy link
Contributor

@longwuyuan: Closing this issue.

In response to this:

Duplicaate of #9240
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants