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: I538b5c2a9df4de66c9874e65247496e54c0522e8
Use the generate_ha_relation_data helper from charmhelpers to
generate the data to send down the relation to the hacluster
charm.
This results in a few changes in behaviour:
1) The charm will no longer specify a nic name to bind the vip. This
is because Pacemaker VIP resources are able to automatically
detect and configure correct iface and netmask parameters based
on local configuration of the unit.
2) The original iface named VIP resource will be stopped and deleted
prior to the creation of the new short hash named VIP resource.
Change-Id: I50bddc990cb0182c8ba3a3d473fba2d60186322a
Drop generation of upstart override file and /etc/environment and
scrub any existing charm configuration in these locations from
an existing install.
These where required way back in the dawn of time when ceph support
was alpha/beta in cinder.
Provide backend specific configuration file path, allowing multiple
ceph clusters to be used with a single cinder application.
Change-Id: I7adba0d35fb7406afa40f047b79a9ab51a6a333d
Closes-Bug: 1769196
This charm contains the origical implementaion of the
db initialisation code that ensures that a db init/migrate
is only performed once as and when needed and that
services are only restarted accordingly. This patch serves as
a cleanup to include fixes and improvements as landed in
the related neutron-api patch that is adopting the same
approach.
Change-Id: I20161c8676d775f4a935315796d6e6b5376ba13c
Related-Bug: 1708459
Use the get_relation_ip function for selecting addresses for the
cluster relationship. Including overrides for the admin, internal,
and public config settings or extra bindings.
Partial-Bug: #1687439
Change-Id: I49f8039f069ba51a6eca58949106507d27af5302
When the percona-cluster charm sets an access-network but the default
unit-get address is not on that network extra shared-db relations get
executed. This is specifically a problem when running upgrades and
trying to avoid API downtime.
The root cause is that the access-network is not checked until the
SharedDBContext is consulted. But then db_joined function will
change it back to the wrong ip on subsequent runs.
This change adds a check for access-network on the relation during
the db_joined function and pushes IP selection off to
get_relation_ip.
Charm helpers sync to pull in changes to get_relation_ip.
Change-Id: I5a78e9dc07c92b54e99e62e00ef6fe505cfa2fdb
Partial-bug: #1677647
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.
Change-Id: I6bf4c1a59778105d81a211b044817cf1041157a2
Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks. Also
add new config option to allow one or more hardening
modules to be applied at runtime.
Change-Id: I69c132b95290faa2cf14accb5e024f98b5aa9c6b
Drop eligible leader checks for cluster and identity relations; setting
this data is always a good idea so that a consistent set of data is
presented to keystone.