network-get starts returning flannel address instead of host nic address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
High
|
Joseph Phillips |
Bug Description
juju version: 2.8.3-bionic-amd64
provider: vSphere
Charmed Kubernetes deployment doesn't settle and is not usable with "waiting: Waiting to retry addon deployment" in kubernetes-master. The root cause is Juju believes that /32 addresses from an vxlan interface of flannel in kubernetes-master units are the ones other services should use instead of the "main" /26 addresses the units have. By the nature of /32 in IPv4, nobody can reach to it.
How to reproduce:
1. Bootstrap with local/LXD profier
2. Define a separate bridge as follows:
$ lxc network create lxdbr-rfc6598 \
ipv4.
ipv4.
ipv4.nat=true \
ipv6.
3. Define a profile with it:
$ lxc profile create juju-rfc6598
$ lxc profile edit juju-rfc6598 <<EOF
devices:
eth0:
name: eth0
nictype: bridged
parent: lxdbr-rfc6598
type: nic
EOF
4. Create a model matching with the name of the profile:
$ juju add-model rfc6598
5. Make sure the logging level is DEBUG or more, and deploy:
$ juju model-config logging-config
<root>=DEBUG
$ juju deploy ./reproducer.yaml
reproducer.yaml:
https:/
6. Once the model settles, wait for 10 or 20 minutes until "observed network config updated" event is triggered.
> DEBUG juju.worker.
[Actual]
The unit will have two IP addresses, one is /26 and the other is /32 on flannel.1. Juju's network-get will select /32 as the ingress-address.
$ juju show-machine 0
...
network-
eth0:
- 100.64.0.48
gateway: 100.64.0.1
is-up: true
flannel.1:
- 10.1.27.0
is-up: true
$ juju run --unit kubernetes-master/0 -- ip -br a
lo UNKNOWN 127.0.0.1/8 ::1/128
flannel.1 UNKNOWN 10.1.27.0/32 fe80::7cf7:
eth0@if31 UP 100.64.0.48/26 fe80::216:
$ juju run --unit kubernetes-master/0 -- network-get kube-api-endpoint --ingress-address
10.1.27.0
$ juju run --unit kubernetes-master/0 -- network-get kube-api-endpoint
bind-addresses:
- macaddress: 7e:f7:e2:9a:11:b6
interfacename: flannel.1
addresses:
- hostname: ""
address: 10.1.27.0
cidr: 10.1.27.0/32 <<<<<<<<<<
egress-subnets:
- 10.1.27.0/32
ingress-addresses:
- 10.1.27.0
[Expected]
Juju will pick up /26 one instead of /32 which is not reachable from other units at all.
description: | updated |
description: | updated |
Changed in juju: | |
assignee: | nobody → Joseph Phillips (manadart) |
status: | New → In Progress |
Changed in juju: | |
milestone: | 3.0.0 → 3.0.1 |
Changed in juju: | |
milestone: | 3.0.1 → 3.0.2 |
Changed in juju: | |
milestone: | 3.0.2 → 3.0.3 |
Changed in juju: | |
milestone: | 3.0.3 → 3.0.4 |
juju-crashdump: /drive. google. com/file/ d/1_HzM3oQP0X0E GRq8RoM12Ol0ak1 bOQt7/view? usp=sharing
https:/