{"action":"created","issue":{"url":"https://api.github.com/repos/cloudnativelabs/kube-router/issues/159","repository_url":"https://api.github.com/repos/cloudnativelabs/kube-router","labels_url":"https://api.github.com/repos/cloudnativelabs/kube-router/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/cloudnativelabs/kube-router/issues/159/comments","events_url":"https://api.github.com/repos/cloudnativelabs/kube-router/issues/159/events","html_url":"https://github.com/cloudnativelabs/kube-router/issues/159","id":257404627,"number":159,"title":"Session affinity","user":{"login":"andrenth","id":30213,"avatar_url":"https://avatars3.githubusercontent.com/u/30213?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenth","html_url":"https://github.com/andrenth","followers_url":"https://api.github.com/users/andrenth/followers","following_url":"https://api.github.com/users/andrenth/following{/other_user}","gists_url":"https://api.github.com/users/andrenth/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenth/subscriptions","organizations_url":"https://api.github.com/users/andrenth/orgs","repos_url":"https://api.github.com/users/andrenth/repos","events_url":"https://api.github.com/users/andrenth/events{/privacy}","received_events_url":"https://api.github.com/users/andrenth/received_events","type":"User","site_admin":false},"labels":[{"id":585287811,"url":"https://api.github.com/repos/cloudnativelabs/kube-router/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":{"login":"bzub","id":2439036,"avatar_url":"https://avatars0.githubusercontent.com/u/2439036?v=4","gravatar_id":"","url":"https://api.github.com/users/bzub","html_url":"https://github.com/bzub","followers_url":"https://api.github.com/users/bzub/followers","following_url":"https://api.github.com/users/bzub/following{/other_user}","gists_url":"https://api.github.com/users/bzub/gists{/gist_id}","starred_url":"https://api.github.com/users/bzub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzub/subscriptions","organizations_url":"https://api.github.com/users/bzub/orgs","repos_url":"https://api.github.com/users/bzub/repos","events_url":"https://api.github.com/users/bzub/events{/privacy}","received_events_url":"https://api.github.com/users/bzub/received_events","type":"User","site_admin":false},"assignees":[{"login":"bzub","id":2439036,"avatar_url":"https://avatars0.githubusercontent.com/u/2439036?v=4","gravatar_id":"","url":"https://api.github.com/users/bzub","html_url":"https://github.com/bzub","followers_url":"https://api.github.com/users/bzub/followers","following_url":"https://api.github.com/users/bzub/following{/other_user}","gists_url":"https://api.github.com/users/bzub/gists{/gist_id}","starred_url":"https://api.github.com/users/bzub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzub/subscriptions","organizations_url":"https://api.github.com/users/bzub/orgs","repos_url":"https://api.github.com/users/bzub/repos","events_url":"https://api.github.com/users/bzub/events{/privacy}","received_events_url":"https://api.github.com/users/bzub/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-09-13T14:36:08Z","updated_at":"2017-09-14T16:05:01Z","closed_at":"2017-09-14T02:24:00Z","author_association":"NONE","body":"Hi\r\n\r\nI tried running the `whats-my-ip` example given in [Kube-router: Kubernetes network services proxy with IPVS/LVS](https://cloudnativelabs.github.io/post/2017-05-10-kube-network-service-proxy/), but I couldn't reproduce the results in the session affinity case. I kept getting responses from different nodes.\r\n\r\nI managed to get close by manually editing the LVS virtual service specification to use the source hash scheduler instead of round robin: `ipvsadm -E -t 10.110.235.172:8080 -s sh` and `ipvsadm -E -t $NODE_IP:31321 -s sh`. With this, I always get the same IP back when I connect to the same node, but different nodes will give me different IPs.\r\n\r\nThis is the service description:\r\n\r\n```\r\n$ kubectl get svc myip -o wide\r\nNAME      CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE       SELECTOR\r\nmyip      10.110.235.172   <nodes>       8080:31321/TCP   1d        run=myip\r\n\r\n$ kubectl describe svc myip\r\nName:\t\t\tmyip\r\nNamespace:\t\tdefault\r\nLabels:\t\t\trun=myip\r\nAnnotations:\t\t<none>\r\nSelector:\t\trun=myip\r\nType:\t\t\tNodePort\r\nIP:\t\t\t10.110.235.172\r\nPort:\t\t\t<unset>\t8080/TCP\r\nNodePort:\t\t<unset>\t31321/TCP\r\nEndpoints:\t\t10.244.1.17:8080,10.244.2.18:8080,10.244.3.6:8080 + 1 more...\r\nSession Affinity:\tClientIP\r\nEvents:\t\t\t<none>\r\n\r\n# ipvsadm -ln\r\nIP Virtual Server version 1.2.1 (size=4096)\r\nProt LocalAddress:Port Scheduler Flags\r\n  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn\r\nTCP  10.96.0.1:443 rr\r\n  -> 10.200.12.39:6443            Masq    1      0          0         \r\nTCP  10.96.0.10:53 rr\r\n  -> 10.244.0.3:53                Masq    1      0          0         \r\nTCP  10.110.235.172:8080 sh\r\n  -> 10.244.1.17:8080             Masq    1      0          0         \r\n  -> 10.244.2.18:8080             Masq    1      0          0         \r\n  -> 10.244.3.6:8080              Masq    1      0          0         \r\n  -> 10.244.4.6:8080              Masq    1      0          0         \r\nTCP  10.200.12.116:31321 sh\r\n  -> 10.244.1.17:8080             Masq    1      0          0         \r\n  -> 10.244.2.18:8080             Masq    1      0          0         \r\n  -> 10.244.3.6:8080              Masq    1      0          0         \r\n  -> 10.244.4.6:8080              Masq    1      0          0         \r\nUDP  10.96.0.10:53 rr\r\n  -> 10.244.0.3:53                Masq    1      0          0\r\n```\r\n\r\nHave you guys seen this behavior?"},"comment":{"url":"https://api.github.com/repos/cloudnativelabs/kube-router/issues/comments/329530058","html_url":"https://github.com/cloudnativelabs/kube-router/issues/159#issuecomment-329530058","issue_url":"https://api.github.com/repos/cloudnativelabs/kube-router/issues/159","id":329530058,"user":{"login":"andrenth","id":30213,"avatar_url":"https://avatars3.githubusercontent.com/u/30213?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenth","html_url":"https://github.com/andrenth","followers_url":"https://api.github.com/users/andrenth/followers","following_url":"https://api.github.com/users/andrenth/following{/other_user}","gists_url":"https://api.github.com/users/andrenth/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenth/subscriptions","organizations_url":"https://api.github.com/users/andrenth/orgs","repos_url":"https://api.github.com/users/andrenth/repos","events_url":"https://api.github.com/users/andrenth/events{/privacy}","received_events_url":"https://api.github.com/users/andrenth/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T16:05:01Z","updated_at":"2017-09-14T16:05:01Z","author_association":"NONE","body":"Hi\r\n\r\nShould a `kubectl replace -f ...` pointing to a `kubeadm-kuberouter-all-features.yaml` file with the image name replaced be enough to upgrade? I ran that but I'm still seeing the same behavior.\r\n\r\nThanks"}}
{"actor":{"display_login":"andrenth"}}