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

Contour occasionally gets stuck in a non-ready state and fails to start the XDS server #6613

Closed
tsaarni opened this issue Aug 16, 2024 · 1 comment · Fixed by #6614
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@tsaarni
Copy link
Member

tsaarni commented Aug 16, 2024

Contour occasionally gets stuck in a non-ready state and fails to start the XDS server. This issue is uncommon and occurs only under the following conditions:

  • --watch-namespaces flag is set to monitor a single namespace.
  • That namespace has only "unrelated" secrets that Contour does not process.
  • The stuck Contour instance is the follower (not leader).

To reproduce this issue, follow these steps:

  1. Deploy contour:
$ kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
  1. Create a nearly empty namespace with one generic secret:
$ kubectl create ns almost-empty
$ kubectl -n almost-empty create secret generic my-secret --from-literal=secret=value
  1. Configure Contour to watch only the almost-empty namespace:
$ kubectl patch deployment contour -n projectcontour --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--watch-namespaces=almost-empty"}]'
  1. Restart both Contour instances by scaling down and back up:
$ kubectl -n projectcontour scale deployment --replicas=0 contour
$ kubectl -n projectcontour scale deployment --replicas=2 contour
  1. Verify that one Contour instance remains stuck in a non-ready state:
$ kubectl -n projectcontour get pod -l app=contour
NAME                      READY   STATUS    RESTARTS   AGE
contour-db59b775d-9k4wl   1/1     Running   0          4m17s
contour-db59b775d-tnqxm   0/1     Running   0          4m17s

The problem is a race condition, and its likelihood decreases if more resources (or no resources) are created in the watched namespace.

@tsaarni tsaarni added kind/bug Categorizes issue or PR as related to a bug. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Aug 16, 2024
@tsaarni tsaarni self-assigned this Aug 16, 2024
Copy link

The Contour project currently lacks enough contributors to adequately respond to all Issues.

This bot triages Issues according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the Issue is closed

You can:

  • Mark this Issue as fresh by commenting
  • Close this Issue
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 20, 2024
@tsaarni tsaarni removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Oct 20, 2024
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant