* Update charm-hacluster from branch 'master'
to 871f551e2188ab0db9e965dfc502c37606cf6bd5
- Merge "Get private-address for local unit from relation"
- Get private-address for local unit from relation
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.
Closes-bug: #2020669
Change-Id: I128420c572d5491b9af4cf34614f4534c787d02c
* Update charm-hacluster from branch 'master'
to 058d26b16a759823a3c8c14a53107bac764980b0
- Add docs key and point at Discourse
Add the 'docs' key and point it at a Discourse topic
previously populated with the charm's README contents.
When the new charm revision is released to the Charmhub,
this Discourse-based content will be displayed there. In
the absense of the this new key, the Charmhub's default
behaviour is to display the value of the charm's
'description' key.
Change-Id: Icf59d65f7938a9a72a0dca87dfbcf13118fabea1
* Update charm-hacluster from branch 'master'
to aa557b85b7b391d9651b34d638542f3e1e302d96
- Add application version on HA Cluster charm
Closes-Bug: #2031438
Change-Id: I4dab721ebe42d4c43c09a98204ce8113892aa817
* Update charm-hacluster from branch 'master'
to 783a80c11920245da313344fae25d53eb605dd3d
- Use charmcraft 2.x to build
Change-Id: Idbc4684feb56990bf9afe48645c7441c54c426a4
* Update charm-hacluster from branch 'master'
to a127f12516033cfb1eef10341853aa2cef02f7e5
- Fix typo in actions.yaml
There was a typo in actions.yaml for the resume action that was breaking
builds. This change fixes that typo. The charm will build.
Closes-Bug: 2030677
Change-Id: I08dcbec009b392ea0346c2f44a4dd27b2ab90c9c
* Update charm-hacluster from branch 'master'
to b6b29ce894fd41b2e8428738665fbe178d646528
- Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1062
Change-Id: Ie2fdfae9a2304fd6cb55edd4c1b93f1fdbe4014d
* Update charm-hacluster from branch 'master'
to 8446b38347c666ecb2bddaadfd104ee0d4b5c92a
- Use get_property instead of get-property
hacluster uses the command "crm configure get-property <CMD>" to obtain
a property of the cluster, although "get-property" has been deprecated
in favor of "get_property", since crmsh-4.2.1 a warning is printed to
stdout[0] breaking the parsing.
# crm configure get-property maintenance-mode 2>/dev/null
WARNING: This command 'get-property' is deprecated, please use 'get_property'
INFO: "get-property" is accepted as "get_property"
true
[0] 86282af8e5
Change-Id: Id0ee9ab1873d14dcd1c960001cdeb8318f599ef5
Closes-Bug: #2008704
* Update charm-hacluster from branch 'master'
to f856ee25ff2d35457c9e4dead4aa4f2fd5b6395f
- charm-helpers sync
Sync to pick up changes that include 'kinetic' to the list of known
ubuntu series codenames.
Change-Id: Ie2b1bf9bac3df0631774bb1e9bd62efa2e74bba1
* Update charm-hacluster from branch 'master'
to 957a292fb8a7c4d4db2dfdebe17e2445d1c4ce66
- Upin the versions of tox
Unpin the versions of tox, setuptools, etc. This removes the issue
with tox 4.x breaking the virtualenv dependencies.
Change-Id: I0fee66af4d908b2800154482daa4aa76dee59d4f
Related-Bug: #2002788
* Update charm-hacluster from branch 'master'
to a03b0b2a87e8667da2f43c4e5f827d9ff8843307
- Only return hacluster nodes from list_nodes()
list_nodes() recently had some changes to run 'crm node show'
in jammy+ instead of 'crm node status'. The difference is that
'crm node show' returns the pacemaker-remote nodes in addition
to the hacluster nodes. This change limits the nodes returned
by list_nodes() to the hacluster nodes (ie. the nodes that
have a node ID).
Closes-Bug: #1995295
Change-Id: Ia405d4270f56c949f79167f8b75c1304b598b918
* Update charm-hacluster from branch 'master'
to 45310a2270be58ec65f2bc4326fa27eb4c903e3a
- Merge "Update 'crm node show' parsing to trim ': member'"
- Update 'crm node show' parsing to trim ': member'
The command 'crm node show' is used on jammy to retrieve the list of
nodes defined in a cluster. The output for nodes includes ': member'
which breaks ensuing commands that are using list_nodes() output.
For example:
juju-3f6cb6-zaza-4135aa8b2509-8.project.serverstack: member
This change trims everything including and after the ':' from the
output.
Closes-Bug: #1994160
Change-Id: I54a4f854f3e293503ec97d99a49b6dc51ee50c87
* Update charm-hacluster from branch 'master'
to 375060fcf278a177b923f280e272bb29fd05a899
- Update bundles to use yoga
This change reconfigures the bundles to use OpenStack yoga, the last
version that supports Focal and Jammy.
Change-Id: I8975f04ef03a7a1ff445771bacdb0fc6ed9d8267
Closes-Bug: #1991528
* Update charm-hacluster from branch 'master'
to 40bb1676b5e102e0fead006336d8ada54fb49ece
- Add bindep.txt
bindep.txt allows zuul to install the deb dependencies needed to run the
unittest, these are needed to run py310.
Change-Id: I1f8ef19905d899c32b90ba62c722358f03b54831
* Update charm-hacluster from branch 'master'
to 34c32005fed1e7aef1f51b7905406bb4a587536a
- Merge "Trivial fix for README.md links"
- Trivial fix for README.md links
Fixed the urls for juju-docs-actions and cdg-ha links.
Change-Id: I20e3c327312e5f579963b6f975271cc9eef992d4
* Update charm-hacluster from branch 'master'
to f31430969ab378645d5cfed2625d2e3acc40e73c
- Merge "Revert "Add Kinetic and Zed support""
- Revert "Add Kinetic and Zed support"
This reverts commit 527261db5cb0c81de395cd40071b58ecdd4596b2.
Reason for revert: I'm not sure that this should have been merged; it removes support for focal, and that's needed on the 2.4 branch; thus this couldn't be a clean cherry-pick to the stable/jammy branch.
Change-Id: I5b53d552961d39bda91ef97f425123c1bab7e349
* Update charm-hacluster from branch 'master'
to 1745a606b39e359357b5a248b27cef5fd5de3762
- Merge "Add Kinetic and Zed support"
- Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml
Change-Id: I1a250a0591c15971840bbd6130c7cff3822eed4f
* Update charm-hacluster from branch 'master'
to 4e53bea0769d6c8c37e1e2a612c191961e738222
- Fix 'crm node show' parsing to get list of nodes.
The command 'crm node show' is used on jammy to retrieve the list of
nodes defined in a cluster, although this command also includes the
properties set on a node (e.g. standby=off) which breaks the current
logic parsing.
This change uses a regular expresion to filter out all the lines from
the output that don't start with a non-white character (^\S+).
Change-Id: I3e00daa1b877a7faae1370f08b2d9c5bd7795c5f
Closes-Bug: #1987685
Related-Bug: #1972022
* Update charm-hacluster from branch 'master'
to cf1c3eeeb3610320a6819e4ddc7587d1a2e59210
- Merge "Drop the use of 'crm node status' on jammy."
- Drop the use of 'crm node status' on jammy.
The version of crmsh available on jammy doesn't have the 'crm node
status' subcommand available since it was removed[0], this change uses
the command 'crm node attribute' to figure out if the node is in standby
mode when running on ubuntu>=jammy, and 'crm node show' to get the list
of nodes.
[0] https://github.com/ClusterLabs/crmsh/pull/753
Change-Id: Iafb711be220573cb701527ec84de285edd8942cf
Closes-Bug: #1972022
* Update charm-hacluster from branch 'master'
to 3acc36209d2a1b722e14b39045268605fcf99e7b
- Merge "Install resource-agents-extra on jammy."
- Install resource-agents-extra on jammy.
The install hooks rsync a set of scripts and one of the destinations
is /usr/lib/stonith/plugins/external, this directory is created by the
installation of the package cluster-glue which is a pulled as an
indirect dependency of pacemaker, this changed on >=jammy where an
intermediate package named resource-agents was split into
resource-agents-base and resource-agents-extra wher the latter doesn't
get installed and it's the one that depends on cluster-glue.
The specific chain of dependencies are:
focal:
pacemaker -> pacemaker-resource-agents -> resource-agents -> cluster-glue
jammy
pacemaker -> pacemaker-resource-agents -> resource-agents-base
Change-Id: Ia00061bff2ebe16d35d52b256c61243935edabba
Closes-Bug: #1971841
* Update charm-hacluster from branch 'master'
to 920d0ab92704bdfa40b1e54c091bd3389c5e6c30
- Switch to render from charmhelpers
- add contrib/templating
- using render instead of render_template
- remove render_template function
Change-Id: I395d7dc06618998b9e6023ff649f4aa8c5930cc0
* Update charm-hacluster from branch 'master'
to 073095a6132d47b637c2afd1b60f93714cdb907f
- Merge "Catch FileExistsError when creating /etc/corosync dir."
- 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
* Update charm-hacluster from branch 'master'
to a0b419519cd438affb24ff80c0221cc33d884c9a
- Fix standby node regex for check_crm
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.
Change-Id: I137acad076bff58506fea6e1618a00765adacd9b
Closes-Bug: #1971182
Related-Bug: #1880576
* Update charm-hacluster from branch 'master'
to d54de3d3464352ca07e4b9d9f6a5c8350464b29b
- Prevent errors when private-address=None
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
* Update charm-hacluster from branch 'master'
to d1191dbcabdfd8684a86825f06c6ede266ba93ba
- Render corosync.conf file prior to pkg install
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
* Update charm-hacluster from branch 'master'
to ecceb52f33e8cccdca277f6ff015058fdfd832b4
- Update to classic charms to build using charmcraft in CI
This update is to ensure that the Zuul Canonical CI builds the charm
before functional tests and ensure that that artifact is used for the
functional tests. This is to try to ensure that the charm that gets
landed to the charmhub is the same charm that was tested with.
Change-Id: I4ebaac856ddda643804454288961924c1c256aa9
* Update charm-hacluster from branch 'master'
to e195794f39255d845bff091aa7c78b67598043b5
- Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Note that https://github.com/openstack/charms.openstack is used during tests
and he need `mock`, unfortunatelly it doesn't declare `mock` in its
requirements so it retrieve mock from other charm project (cross dependency).
So we depend on charms.openstack first and when
Ib1ed5b598a52375e29e247db9ab4786df5b6d142 will be merged then CI
will pass without errors.
Depends-On: Ib1ed5b598a52375e29e247db9ab4786df5b6d142
Change-Id: I631d32e1a330bcd17b53ee873833e8434023958f
* Update charm-hacluster from branch 'master'
to 6b0339920506a2c79c0ae0706898fc113e14f8ca
- Merge "Additional test updates"
- Additional test updates
* drop trusty/xenial metadata and function tests
* switch to release-specific zosci functional tests
* switch to yoga zosci unit test job
* add py39
Change-Id: I51ed5c7fdb98dcbea72298da956a66b411fed03f
* Update charm-hacluster from branch 'master'
to e2249d05e1aa57a27415f4966221dc62b3b2b61e
- Set loglevel of "Pacemaker is ready" to TRACE
Closes-Bug: #1889482
Change-Id: Ie97d09f5bd319a4adf93abd44fc465c77fd20620
* Update charm-hacluster from branch 'master'
to 939141a84c97406017c98dda269ddcb0f692cbd7
- Merge "Remove moved content from README"
- Remove moved content from README
The content in section 'update-ring action' has been
moved and integrated into a cloud operation in the CDG:
"Scale back an application with hacluster"
Depends-On: I98a687a9ac9a3336ece99a4ecb2a00189453869d
Change-Id: I5a19440c03f4e559ef3f22f5cb51d4ba911ad550
* Update charm-hacluster from branch 'master'
to a5b408ff52047cfe504cbae03170098c64d5fef2
- Merge "Safely delete node from ring"
- Safely delete node from ring
Provide the delete-node-from-ring action to safely remove a known node
from the corosync ring.
Update the less safe update-ring action to avoid LP Bug #1933223 and
provide warnings in actions.yaml on its use.
Change-Id: I56cf2360ac41b12fc0a508881897ba63a5e89dbd
Closes-Bug: #1933223
* Update charm-hacluster from branch 'master'
to 8215c5c9e31b41e1cccb20ea81d5199d789d8ca7
- Merge "Retry on "Transport endpoint is not connected""
- Retry on "Transport endpoint is not connected"
The crm node delete already handles some expected failure modes. Add
"Transport endpoint is not connected" so that it retries the node
delete.
Change-Id: I9727e7b5babcfed1444f6d4821498fbc16e69297
Closes-Bug: #1931588
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
* Update charm-hacluster from branch 'master'
to d17fdd276ef1c6614bfc43491e4cb9e1ee5ce612
- Add option for no-quorum-policy
Adds a config item for what to do when the cluster does not have quorum.
This is useful with stateless services where, e.g., we only need a VIP
and that can be up on a single host with no problem.
Though this would be a good relation data setting, many sites would
prefer to stop the resources rather than have a VIP on multiple hosts,
causing arp issues with the switch.
Closes-bug: #1850829
Change-Id: I961b6b32e7ed23f967b047dd0ecb45b0c0dff49a
* Update charm-hacluster from branch 'master'
to 221d4e71d40609f941b58ed5ca56c74d59dd3b14
- c-h sync - restore proxy env vars for add-apt-repository
Change-Id: Ib32258deceb445e307835269635cf1008d1a6cf9
* Update charm-hacluster from branch 'master'
to 7431fd21f15f96fd6891cd58f5cf2abb3cda9d3d
- Test bundles for focal-wallaby and hirsute-wallaby
These are the test bundles (and any associated changes) for
focal-wallaby and hirsute-wallaby support.
Libaries sync.
hisute-wallaby test is disabled (moved to dev) due to [1] as bundle may
reference a reactive charm.
[1] https://github.com/juju-solutions/layer-basic/issues/194
Change-Id: I84c6210e0db2596cb4ba12ba641b56b6e73b5419
* Update charm-hacluster from branch 'master'
to 8a3a725029b322693ef91e49e57de0a64c330f53
- Updates to flip all libraries back to master
This patchset updates all the requirements for charms.openstack,
charm-helpers, charms.ceph, zaza and zaza-openstack-tests back
to master branch.
Change-Id: I1e875533a5254924844aa3f47e89f1cdf8808671
* Update charm-hacluster from branch 'master'
to 2a5a495457bb502086aae8c46b118f2dfc8cc001
- 21.04 sync - add 'hirsute' in UBUNTU_RELEASES
The 'hirsute' key in c-h/core/host_factory/ubuntu.py:
UBUNTU_RELEASES had been missed out, and is needed for
hirsute support in many of the charms. This sync is to
add just that key. See also [1]
Note that this sync is only for classic charms.
[1] https://github.com/juju/charm-helpers/pull/598
Change-Id: If0848ffdc2d74b020e4be9d498745a5a0e4b7e92
* Update charm-hacluster from branch 'master'
to a15741976792805b417e025b2538e0d53076b3e0
- 21.04 libraries freeze for charms on master branch
* charm-helpers sync for classic charms
* build.lock file for reactive charms
* ensure tox.ini is from release-tools
* ensure requirements.txt files are from release-tools
* On reactive charms:
- ensure stable/21.04 branch for charms.openstack
- ensure stable/21.04 branch for charm-helpers
Change-Id: I509a9060f9c0fde133731e4dd2712fd30a672bcb
* Update charm-hacluster from branch 'master'
to 06796e65181faade0f217ae42bdf28be8b9dc552
- Fix pacemaker-remote-relation-changed hook error
This was happening because
trigger_corosync_update_from_leader() was being called
not only in `ha` relation hooks but also in
`pacemaker-remote` relation hooks after the implementation
for the related bug landed.
Closes-Bug: #1920124
Related-Bug: #1400481
Change-Id: I4952ef694589de6b72f04b387e30ca2333bc4cbc
* Update charm-hacluster from branch 'master'
to 64e696ae74516e8b69f3ffea547cae5859e456c6
- Improved action to display the cluster status
The `state` action will provide details about the health of the cluster.
This action has one parameter to display the history of the cluster status,
which is false by default.
Closes-Bug: #1717831
Change-Id: Iaf6e4a75a36491eab8e6802a6f437e5f410ed29e
* Update charm-hacluster from branch 'master'
to 457f88eda6b9ebe71d30247d1ac32a40b9a32039
- Adjust quorum after node removal
Add an `update-ring` action for that purpose.
Also print more on various pacemaker failures.
Also removed some dead code.
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/369
Change-Id: I35c0c9ce67fd459b9c3099346705d43d76bbdfe4
Closes-Bug: #1400481
Related-Bug: #1874719
Co-Authored-By: Aurelien Lourot <aurelien.lourot@canonical.com>
Co-Authored-By: Felipe Reyes <felipe.reyes@canonical.com>
* Update charm-hacluster from branch 'master'
to 6e1f20040ca0d154b50a2e999cfc0e75cc96f48b
- Remove some more dead code
Change-Id: Icf0c1a9c5e819bd2253d9a631e1ff6875bfd5200
Related-Bug: #1881114