Currently, the private-address for the local unit is queried using
unit_get, which can cause it to return an address from a different
binding. This patch changes it to always query from the relation.
Depends-on: I9a9efdb5c7e5d3db6dbad11413782b6e07a335c4
Closes-bug: #2020669
Change-Id: I128420c572d5491b9af4cf34614f4534c787d02c
(cherry picked from commit 71100249ee236302ff09d90d49ec66c2fb846829)
(cherry picked from commit 7ff0d9b1c0d2114c580fb9bac370d4bb9f2fc514)
Catch FileExistsError when creating /etc/corosync dir.
Hooks are expected to be idempotent, if the install hook for whatever
reason needs to be re-run and the /etc/corosync directory already exists,
because for example it was created in a previous run, the exception
FileExistsError will be raised, this change captures the exception and
moves on.
Change-Id: If43a5c95bb59c9cca7f1a975214a9f013ad6f4d6
Closes-Bug: #1971762
(cherry picked from commit 715d31e09f939844bd27f2d4ed8c9207598a5938)
The branch stable/focal needs to support Ubuntu Bionic (python 3.6) and
Focal (python 3.8), using openstack-python3-victoria-jobs allows the
execution of both of those targets
This patch includes tempest pinning for python 3.8
Pacemaker has changed the output format of crm_mon and this broke
the regex to catch nodes that are on standby mode. This change
updates the regex for not alerting on paused units.
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.
Closes-bug: #1961448
Change-Id: I5ed140a17e184fcf6954d0f66e25f74564bd281c
(cherry picked from commit d54de3d3464352ca07e4b9d9f6a5c8350464b29b)
Starting in focal, the ubuntu version of corosync package synced in from
debian includes node1 as the default name for the local node with a nodeid
of 1. This causes the cluster to have knowledge of this extra node1 node,
which affects quorum, etc. Installing the charm's corosync.conf file
before package installation prevents this conditioning from happening.
Additionally this change removes some Xenial bits in the charm and always
includes a nodelist in corosync.conf as it is compulsory in focal and
newer. It is optional in the bionic packages, so we'll always just
render the nodelist.
Change-Id: I06b9c23eb57274f0c99a3a05979c0cabf87c8118
Closes-Bug: #1874719
(cherry picked from commit d1191dbcabdfd8684a86825f06c6ede266ba93ba)