Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

dfget got Supernode’s Service Cluster IP as peer ip in k8s cluster #1399

Open
Komey opened this issue Jun 24, 2020 · 1 comment · May be fixed by #1402
Open

dfget got Supernode’s Service Cluster IP as peer ip in k8s cluster #1399

Komey opened this issue Jun 24, 2020 · 1 comment · May be fixed by #1402

Comments

@Komey
Copy link
Contributor

Komey commented Jun 24, 2020

Ⅰ. Issue Description

https://github.com/dragonflyoss/Dragonfly/blob/master/pkg/httputils/http_util.go#L393

kube-proxy mode=ipvs
supernode with service.spec.type=ClusterIP(eg. 10.254.49.255)

when dfget or dfclient startup, it will get ClusterIP(eg. 10.254.49.255) as cfg.LocalIP which will register to supernode as peer ip

Ⅱ. Describe what happened

as above
supernode 用service.spec.type=ClusterIP下 kube-proxy mode=ipvs。 https://github.com/dragonflyoss/Dragonfly/blob/master/pkg/httputils/http_util.go#L393
这行返回的localIP 会等于 supernode service 的cluster ip(eg. 10.254.49.255)
dfget or dfclient 启动时会把这个ip作为peer 的ip注册到supernode

临时解决方案 Headless Services

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. kube-proxy mode=ipvs
  2. supernode with service.spec.type=ClusterIP(eg. 10.254.49.255)

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • dragonfly version: 1.0.2
  • OS (e.g. from /etc/os-release): Centos 7.5
  • Kernel (e.g. uname -a): 4.9.2-3.0.0.std7b.el7.5.x86_64
  • Install tools: k8s daemonset(dfclient) + statefulSet(supernode) with hostnetwork=true
  • Others:
@jim3ma
Copy link
Member

jim3ma commented Jun 29, 2020

ping @lowzj

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants