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

Cherry-pick router id auto-update feature to release v3.6 #223

Merged
merged 1 commit into from Mar 7, 2019

Conversation

Projects
None yet
3 participants
@roshanirathi
Copy link

roshanirathi commented Mar 7, 2019

Auto update ipv6 router id based on nodename

The CALICO_ROUTER_ID environment variable now supports a special value "hash", which derives the router ID from the nodename.  This is useful for IPv6-only systems.
Merge pull request #215 from roshanirathi/ipv6-router-id-autoupdate
Auto update ipv6 router id based on nodename
@fasaxc

fasaxc approved these changes Mar 7, 2019

@fasaxc fasaxc added this to the Calico v3.6.0 milestone Mar 7, 2019

@fasaxc fasaxc merged commit b0bf8c8 into projectcalico:release-v3.6 Mar 7, 2019

2 checks passed

license/cla Contributor License Agreement is signed.
Details
semaphoreci The build passed on Semaphore.
Details
@maheshd2

This comment has been minimized.

Copy link

maheshd2 commented Mar 18, 2019

@fasaxc @roshanirathi
I was testing calico on pure ipv6 env, Observed that CALICO_ROUTER_ID is not getting populated in v3.6 as mentioned in release notes.

# kubectl get po -n kube-system -o=custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[*].image | egrep 'NAME|calico'
NAME                                       IMAGE
calico-kube-controllers-57b5f8556f-2zvxv   calico/kube-controllers:v3.6.0
calico-node-5l8fl                          calico/node:v3.6.0
calico-node-ptmgb                          calico/node:v3.6.0
calico-node-v8p4x                          calico/node:v3.6.0

I added below config variable in calico-node configuration as mentioned.

        - name: CALICO_ROUTER_ID
          value: hash

When i checked the bird6.cfg.template, It is found that the template does not have the latest changes done for calculating ROUTER_ID from hash of nodename.

/etc/calico/confd/templates # cat bird6.cfg.template
# Generated by confd
include "bird6_aggr.cfg";
include "bird6_ipam.cfg";

{{- $node_ip_key := printf "/host/%s/ip_addr_v4" (getenv "NODENAME")}}{{$node_ip := getv $node_ip_key}}
{{- $node_ip6_key := printf "/host/%s/ip_addr_v6" (getenv "NODENAME")}}{{$node_ip6 := getv $node_ip6_key}}
{{- $router_id := getenv "CALICO_ROUTER_ID" ""}}

router id {{if ne "" ($router_id)}}{{$router_id}}{{else}}{{$node_ip}}{{end}};  # Use IPv4 address since router id is 4 octets, even in MP-BGP

{{- define "LOGGING"}}
{{- $node_logging_key := printf "/host/%s/loglevel" (getenv "NODENAME")}}
@fasaxc

This comment has been minimized.

Copy link
Member

fasaxc commented Mar 18, 2019

@maheshd2 Thanks for pointing that out; looks like a missing pin update in our glide.yaml. v3.6.0 shipped with an older version of confd than it should have I've filed an issue to track: projectcalico/node#194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.