Comment 21 for bug 1926460

Revision history for this message
David Ames (thedac) wrote (last edit ): Re: Fails to bootstrap with pure L3 - Connection attempt from IP address ::ffff:<IPv4> refused

TRIAGE:

The bug is lack of support for separate subnets for cluster nodes.

Each of the nodes in the example is on a separate subnet:

$ ipcalc 172.31.40.28/20
Address: 172.31.40.28 10101100.00011111.0010 1000.00011100
Netmask: 255.255.240.0 = 20 11111111.11111111.1111 0000.00000000
Wildcard: 0.0.15.255 00000000.00000000.0000 1111.11111111
=>
Network: 172.31.32.0/20 10101100.00011111.0010 0000.00000000
HostMin: 172.31.32.1 10101100.00011111.0010 0000.00000001
HostMax: 172.31.47.254 10101100.00011111.0010 1111.11111110
Broadcast: 172.31.47.255 10101100.00011111.0010 1111.11111111
Hosts/Net: 4094 Class B, Private Internet

$ ipcalc 172.31.29.80/20
Address: 172.31.29.80 10101100.00011111.0001 1101.01010000
Netmask: 255.255.240.0 = 20 11111111.11111111.1111 0000.00000000
Wildcard: 0.0.15.255 00000000.00000000.0000 1111.11111111
=>
Network: 172.31.16.0/20 10101100.00011111.0001 0000.00000000
HostMin: 172.31.16.1 10101100.00011111.0001 0000.00000001
HostMax: 172.31.31.254 10101100.00011111.0001 1111.11111110
Broadcast: 172.31.31.255 10101100.00011111.0001 1111.11111111
Hosts/Net: 4094 Class B, Private Internet

$ ipcalc 172.31.0.158/20
Address: 172.31.0.158 10101100.00011111.0000 0000.10011110
Netmask: 255.255.240.0 = 20 11111111.11111111.1111 0000.00000000
Wildcard: 0.0.15.255 00000000.00000000.0000 1111.11111111
=>
Network: 172.31.0.0/20 10101100.00011111.0000 0000.00000000
HostMin: 172.31.0.1 10101100.00011111.0000 0000.00000001
HostMax: 172.31.15.254 10101100.00011111.0000 1111.11111110
Broadcast: 172.31.15.255 10101100.00011111.0000 1111.11111111
Hosts/Net: 4094 Class B, Private Internet

The get_cluster_subnets [0] method uses resolve_network_ip [1] which uses _get_for_address which is looking for a *local* interface address such that the remote IP is a member of the local IPs subnet. Thus it returns None.

We will need another mechanism to implement the discovery of CIDR networks for each cluster member. We likely need to set ingresss-address or egress-subnets or some other relation key with this information.

[0] https://github.com/openstack/charm-mysql-innodb-cluster/blob/master/src/lib/charm/openstack/mysql_innodb_cluster.py#L581
[1] https://github.com/juju/charm-helpers/blob/master/charmhelpers/contrib/network/ip.py#L227
[2] https://github.com/juju/charm-helpers/blob/master/charmhelpers/contrib/network/ip.py#L180-L202