Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

[keepalived-vip] unicast_peer should only include VRRP peers #808

Closed
ryanschwartz opened this issue Apr 19, 2016 · 2 comments · Fixed by #842
Closed

[keepalived-vip] unicast_peer should only include VRRP peers #808

ryanschwartz opened this issue Apr 19, 2016 · 2 comments · Fixed by #842

Comments

@ryanschwartz
Copy link

ryanschwartz commented Apr 19, 2016

With multi-node clusters, setting a label for restriction by nodeSelector in the daemonset spec and specifying --use-unicast=true, all service nodes are listed as unicast peers, rather than the subset of nodes that are specified by the nodeSelector.

 ✓ ( 11:27:05 ) ⦿ ryan@juniper
 ▶︎ ~/repos/vst/contrib/keepalived-vip ▶︎  master ● ▶︎ kubectl get no --show-labels
NAME            STATUS                     AGE       LABELS
10.10.34.71     Ready                      3d        kubernetes.io/hostname=10.10.34.71,type=vip
10.10.34.72     Ready                      3d        kubernetes.io/hostname=10.10.34.72,type=vip
10.10.34.73     Ready                      3d        kubernetes.io/hostname=10.10.34.73,type=vip
10.10.34.74     Ready                      3d        kubernetes.io/hostname=10.10.34.74
10.10.34.75     Ready                      3d        kubernetes.io/hostname=10.10.34.75
10.10.34.76     Ready                      3d        kubernetes.io/hostname=10.10.34.76
172.21.10.162   Ready,SchedulingDisabled   3d        kubernetes.io/hostname=172.21.10.162
 ✓ ( 11:27:12 ) ⦿ ryan@juniper
 ▶︎ ~/repos/vst/contrib/keepalived-vip ▶︎  master ● ▶︎ grep -A2 nodeSelector vip-daemonset.yaml
      nodeSelector:
        type: vip
 ✓ ( 11:27:29 ) ⦿ ryan@juniper
 ▶︎ ~/repos/vst/contrib/keepalived-vip ▶︎  master ● ▶︎ kubectl get pods
NAME                        READY     STATUS    RESTARTS   AGE       NODE
hostnames-1ni2l             1/1       Running   0          1h        10.10.34.74
hostnames-6rrss             1/1       Running   0          1h        10.10.34.73
hostnames-fmt0n             1/1       Running   0          1h        10.10.34.76
hostnames-lyb6w             1/1       Running   0          1h        10.10.34.71
hostnames-qo1xu             1/1       Running   0          1h        10.10.34.72
hostnames-zn7cn             1/1       Running   0          1h        10.10.34.75
kube-keepalived-vip-1hpkc   1/1       Running   0          53m       10.10.34.72
kube-keepalived-vip-75q8d   1/1       Running   0          53m       10.10.34.71
kube-keepalived-vip-t1egp   1/1       Running   0          53m       10.10.34.73
 ✓ ( 11:27:48 ) ⦿ ryan@juniper
 ▶︎ ~/repos/vst/contrib/keepalived-vip ▶︎  master ● ▶︎ kubectl exec kube-keepalived-vip-1hpkc cat /etc/keepalived/keepalived.conf


global_defs {
  vrrp_version 3
  vrrp_iptables KUBE-KEEPALIVED-VIP
}

vrrp_instance vips {
  state BACKUP
  interface bond0
  virtual_router_id 50
  priority 101
  nopreempt
  advert_int 1

  track_interface {
    bond0
  }


  unicast_src_ip 10.10.34.72
  unicast_peer {
    10.10.34.71
    10.10.34.73
    10.10.34.74
    10.10.34.75
    10.10.34.76
    172.21.10.162
  }
<SNIP>
}
@aledbf
Copy link
Contributor

aledbf commented Apr 19, 2016

@ryanschwartz currently the helper in charge of building the node list is not using nodeSelector. To enable this I will add a new flag to specify this --node-selector

@aledbf
Copy link
Contributor

aledbf commented Apr 25, 2016

@ryanschwartz this is solved in #842. No additional flags required.

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