Whenever a peer returns None as its IP, it results in
misconfiguration in corosync.conf, which results in
a series of cascading hook errors that are difficult to
sort out.
More specifically, this usually happens when network-get
does not work for the current binding. The main problem
is that when changing bindings, a hook fires before the
network-get data is updated. This hook fails and prevents
the network-get from being re-read.
This patch changes the code behavior to ignore None IP
entries, therefore gracefully exiting and deferring further
configuration due to insufficient number of peers when that
happens, so that a later hook can successfully read the IP
from the relation and set the IPs correctly in corosync.
Reviewed: https:/ /review. opendev. org/c/openstack /charm- hacluster/ +/836887 /opendev. org/openstack/ charm-hacluster /commit/ d54de3d3464352c a07e4b9d9f6a5c8 350464b29b
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d54de3d3464352c a07e4b9d9f6a5c8 350464b29b
Author: Rodrigo Barbieri <email address hidden>
Date: Wed Apr 6 18:42:13 2022 -0300
Prevent errors when private- address= None
Whenever a peer returns None as its IP, it results in ation in corosync.conf, which results in
misconfigur
a series of cascading hook errors that are difficult to
sort out.
More specifically, this usually happens when network-get
does not work for the current binding. The main problem
is that when changing bindings, a hook fires before the
network-get data is updated. This hook fails and prevents
the network-get from being re-read.
This patch changes the code behavior to ignore None IP
entries, therefore gracefully exiting and deferring further
configuration due to insufficient number of peers when that
happens, so that a later hook can successfully read the IP
from the relation and set the IPs correctly in corosync.
Closes-bug: #1961448 cf6954d0f66e25f 74564bd281c
Change-Id: I5ed140a17e184f