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

session affinity not working #1922

Closed
ramakrishna90 opened this issue Jan 18, 2018 · 3 comments
Closed

session affinity not working #1922

ramakrishna90 opened this issue Jan 18, 2018 · 3 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@ramakrishna90
Copy link

ramakrishna90 commented Jan 18, 2018

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):


Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

NGINX Ingress controller version:0.9.0

Kubernetes version (use kubectl version):1.7

Environment:

  • Cloud provider or hardware configuration:Bare Metal with 3 node clusters
  • OS (e.g. from /etc/os-release):Ubuntu
  • Kernel (e.g. uname -a):
  • Install tools: Kubernetes setup using kubespray
  • Others:

What happened:
I deployed the ingress controller as described here.
We are using 2 tomcat instances as our backend pods for serving requests. I created an ingress specifying the service connecting the tomcat pods. Then I used the following annotations in the ingress for session affinity:
annotations: nginx.ingress.kubernetes.io/affinity: cookie nginx.ingress.kubernetes.io/session-cookie-hash: md5 nginx.ingress.kubernetes.io/session-cookie-name: backendroute
But session affinity is not working when I connect through the ingress.
And I could not find the backendroute cookie in my response in client (chrome)
What you expected to happen:
"backendroute" cookie must be available in the reponse and session-affinity should work

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:
When I checked the ingress controller logs, the requests from the same client are being forwarded to both the tomcat pods in round robin fashion.

@ramakrishna90
Copy link
Author

ramakrishna90 commented Jan 30, 2018

The nginx configuration generated doesn't look right. It does create sticky upstream configuration but does not use it in the server configuration

@sylmarch
Copy link

Duplicate with #1980
I submit a complete configuration that helps to reproduce this issue (it still does not work with last release, i.e. v0.10.2).

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 1, 2018
@aledbf aledbf closed this as completed May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants