* Update charm-interface-hacluster from branch 'master'
to d91e83a1fa59a13f4160febfe536c68dc762e436
- Use the passed arguments in remove_dnsha
This appears to be a typo, where self.service_name and self.endpoint_type
was used in the same way as seen in other methods,
but self.service_name or self.endpoint_type is not defined in this class,
or any subclasses of it.
So we can use the passed name and endpoint_type arguments here.
Closes-Bug: #2037515
Change-Id: I12c561057372c11632b2d97fa1763fc92d89f479
* Update charm-interface-hacluster from branch 'master'
to f3a72cdc9f0ce99f130198528130cf39d18ffefd
- Update jobs to fix the CI
- remove old / deprecated zuul jobs
- update to the latest rolling python3 jobs
- update tox based on tox4 fixes
- update tox python targets
- add the platform mocking patch - copy from https://review.opendev.org/c/openstack/charm-nova-compute-nvidia-vgpu/+/899177/2/unit_tests/__init__.py
Change-Id: If77436f4c27cf719907a2888d5b1e9e6c7eb3f7c
* Update charm-interface-hacluster from branch 'master'
to 5fc5216f51dcf98530d45e137d55fd94b39d150a
- Add monitor for stopped services when clone=False
The cluster as its currently configured for services with clone=False,
Pacemaker will monitor exclusively that the daemon is running in the
node where it should, but will take no actions if the same daemon is
running (e.g. started manually by a sysadmin) in another node of the
cluster, this becomes a problem for services that are expected to be
configured in active/passive (e.g. manila-share).
This change configures two monitors for services with clone=False, one
that monitors the daemon is running where it should, and another one
that monitors the daemon is not running where it shouldn't.
primitive res_apache systemd:apache2 \
...
op monitor interval=5s role=Started \
op monitor interval=6s role=Stopped
https://clusterlabs.org/pacemaker/doc/deprecated/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_resource_operations.html#s-resource-monitoring
Closes-Bug: #1904623
Change-Id: I9e5383f5ab6b6967aa0f2318764519989a292227
* Update charm-interface-hacluster from branch 'master'
to 2b714e90b1b8845ce7390bb1dad5a56a65437907
- Merge "Update relation data even if the new value is empty"
- Update relation data even if the new value is empty
This will enable removal of previously created
resources. Originaly, the empty values were not
propagated so the resource ended up in both fields
"json_delete_resources" and "json_resources".
Closes-Bug: #1953623
Change-Id: I34693bb0e30bce96144a983e55e212e27029ba52
* Update charm-interface-hacluster from branch 'master'
to 5451d82104fb21d2b012c0c40ec55ff8d68b4081
- Drop six.
Charm-helpers dropped py2 support, hence charms are in the process of
dropping support for it too, this change drops the use of the `six`
library.
Change-Id: I4c76e60780e7dc1189a9fad8f8caf34c3fad5f65
* Update charm-interface-hacluster from branch 'master'
to fa48a2151f86c2e983a174c9bace565829d20a75
- Expose interface for colocation of services
Change-Id: I22b3158f895fd782f4dbf95347d877b6b6f492fd
* Update charm-interface-hacluster from branch 'master'
to 679a76dfe564ab1a8f46a124f2f8b74ba3e96965
- Move common requires code
Move common requires code in to the common module so that
requires.py only contains the code which is specific to
reactive charms. This will allow for a subsequent patch which
creates a requires interface consumable by operator framework
charms.
Change-Id: I70037252cc7a677a9394929cb0cd17e9506ab624
* Update charm-interface-hacluster from branch 'master'
to 6c611a3c61909fda411f7a79af53908ec7bef2c8
- Migrate from testr to stestr
Change-Id: I735638f91617d2e951c3ec23498c8ac116cf8f08
* Update charm-interface-hacluster from branch 'master'
- 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: Ibbbcfe51e76537702a2f4612a8b9829b25b2d149
* Update charm-interface-hacluster from branch 'master'
- Resource parameter order is important on Eoan+
Port of https://github.com/juju/charm-helpers/pull/373 to this
interface for reactive charms. From the ch pull request:
On Eoan we saw errors like:
ERROR: syntax in primitive: Attribute order error: timeout must appear
before any instance attribute parsing 'primitive res_ks_cf9dea1_vip
ocfheartbeatIPaddr2 params ip=10.5.253.30 op monitor depth=0
timeout=20s interval=10s'
It would appear, that ordering matters, update resource config function
to the correct order.
Change-Id: I1f8a440fb0ad62192307946de42b9b176b3ef4c1
Partial-Bug: #1843830
* Update charm-interface-hacluster from branch 'master'
- Make SystemdService never give up on resources
Change-Id: Icd202be7cf55f8bd883d102c81881ed15a0e5191
Closes-Bug: #1859044
* Update charm-interface-hacluster from branch 'master'
- Control access to crm in cases when the unit is yet not
having any corosync resource available.
Closes-bug: #1864804
Change-Id: I6eb3b9a816a93c4c7894e17935b1e7c8604592c5
Signed-off-by: José Pekkarinen <jose.pekkarinen@canonical.com>
* Update charm-interface-hacluster from branch 'master'
- Merge "Never give up on resources"
- Never give up on resources
Configure pacemaker to never give up on resources and
to recheck 5 seconds after a failure. This is achieved
using migration-threshold and failure-timeout options *1.
*1 https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_failure_response.html
Change-Id: I4044810daa83f9bd7a59430b5c52c009149fac6e
Partial-Bug: #1839021
* Update charm-interface-hacluster from branch 'master'
- Add support for systemd
Systemd support is in corosync, but currently the add_init_service
handles adding an upstart service only. This results in Charmed
Kubernetes having incorrectly monitored services.
Change-Id: I935613292ce6b78cf645469fda6d21b0aa695c28
Closes-Bug: #1843933
* Update charm-interface-hacluster from branch 'master'
- Avoid pollution and false positives with tox.ini
- removing sitepackages in tox.ini to avoid test env pollution
- skip_missing_interpreters in tox.ini set to False to avoid false
positives by skipping missing interpreters.
Change-Id: I3e9653753f17e68a302184a734b8fbe6fbf92df8
* Update charm-interface-hacluster from branch 'master'
- Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Note that python35-charm-jobs is retained since this charm is supported
on Xenial.
Change-Id: Ie5ed4bc0b8c1ecf1c870b9d7d1147c32950eec28
Story: #2005924
Task: #34228
- OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.htmlhttp://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html
Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
* Update charm-interface-hacluster from branch 'master'
- Added tox environment for gathering coverage
This technique was borrowed from the tox "cover" environment in
openstack/nova's tox.ini. This leverages the fact that stestr lets
you override the python executable via the PYTHON environment
variable. Doing this allows us to easily generate coverage for our
unit tests.
An important caveat is that this does not provide any coverage for
tests via zaza, amulet, etc. It is purely focused on the unit tests.
Note that this replaces the previous .coveragerc; coverage
configuration is instead pulled from tox.ini.
Change-Id: Ia0f190f7de273290d01091fd9211a4bbdb688be5
* Update charm-interface-hacluster from branch 'master'
- Adding support for deletion of vip, dns, and init services.
Change-Id: I6b0f00aaf7e3c83e1a35ed1ecb4127f743aeba6d