Using different bindings for cluster communication and VIP breaks the cluster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack HA Cluster Charm |
Fix Committed
|
High
|
Tiago Pasqualini da Silva | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If we configure an application to use a space for its default binding and another one for the HA binding, corosync.conf gets mixed IP addresses. Here's how to reproduce:
1) my spaces (we'll use defaultspace for the applications and livemigration for HA):
$ juju spaces
Name Space ID Subnets
alpha 0
livemigration 1 192.168.101.0/24
osfloating 2 192.168.102.0/24
defaultspace 3 192.168.122.0/24
2) deploy any application binding it to the defaultspace and binding its HA relation to livemigration (we're using ceph-radosgw as an example, but this happens with any application):
series="focal"
ceph_channel=
hacluster_
ceph_vip=
juju model-config default-
juju deploy ceph-radosgw --series ${series} --channel ${ceph_channel} -n 3 --config vip=${ceph_vip} --to lxd:0,lxd:1,lxd:2 --bind=
juju deploy --config cluster_count=3 hacluster ceph-radosgw-
juju add-relation ceph-radosgw-
3) check corosync.conf on any node, you'll see that the remote nodes get the correct IP, but the local node gets configured with the wrong IP.
This happens because, for the local node, it gets its 'private-address' attribute from Juju, without specifying a binding: https:/
If we run the command manually, we can see that the binding is wrong:
$ juju run -u ceph-radosgw-
192.168.122.95
A quick way of fixing this would be to get its private address from the relation:
$ juju run -u ceph-radosgw-
egress-subnets: 192.168.101.168/32
hostname: juju-32927a-2-lxd-0
ingress-address: 192.168.101.168
member_ready: "True"
private-address: 192.168.101.168
ready: "True"
Which returns the correct address.
tags: | added: sts |
Changed in charm-hacluster: | |
assignee: | nobody → Tiago Pasqualini da Silva (tiago.pasqualini) |
importance: | Undecided → Medium |
importance: | Medium → High |
Fix proposed to branch: master /review. opendev. org/c/openstack /charm- hacluster/ +/884197
Review: https:/