Currently the container handler status is updated
only when update_status hook is triggered.
Update the status once the service is ready instead
of waiting for update_status hook.
Change-Id: I52cf06af03dd1807ee0097d7dd7fb8bc85e13781
Accessing relation data during departed or broken
events results in KeyError from ops framework.
KeyError: 'Cannot index relation data with "None".
Are you trying to access remote app data during a
relation-broken event? This is not allowed.'
Add KeyError whenever remote data is accessed.
Change-Id: I8515ed584caee7304b091b3e57d83c660ac5b296
Some cases require restart of services after the
bootstrap is completed. The restart function _start_all()
is in notion of private function and so need to be
changed to notion of public.
Change-Id: I739fc762d30c1810bafd2261d62041d4678fa6fc
Add bootstrap status to compound status. Currently a charm will
advertise itself as active even if it is not bootstrapped.
Change-Id: Iec2e2ac37fbe723f3c7a457834d505ddb5146ff6
In line with the name change in Juju 3, switch the status message
to refer to intergration rather than relation.
Change-Id: Ia2b9bc8bdb083d041bbaa23059eef7a38127e1b8
Implement a pool of statuses,
define a status pool on the charm,
and set up some default opinionated statuses in the pool
for use by the main workload and the relations.
Change-Id: I1aa094138e66bffd02d1bbcce3db79c7fd4058c4
Ensure that any IP address changes are noticed and provided on
the ovsdb-cms relation - clients will need to update configuration
and restart services as needed.
Hostnames will not change.
Change-Id: I969f58fd40ab7f7651ce0af03ebd70def25f2ca1
Some clients can't use hostnames yet so expose both address and
hostname information on the ovsdb{-cms} interface type.
This supports backwards compatibility with the existing reactive
interfaces as well.
Change-Id: Iefe8ad601b305e3fdab7548e1d3357493491d3e9
Hostnames are resolvable under K8S and won't change when Pods
get refreshed during charm upgrades.
Rework OVN relation handlers to be hostname centric.
Note that this part of the codebase does not currently have
any test coverage.
Change-Id: Ief5c816ab5fbeb55aadf2b83697858f2ecb28807
Use new rehomed identity-service interface from keystone-k8s.
Depends-On: I75dac5894f456d6b9de5aa10e43c0d1ebbcceda8
Change-Id: I5d043b0096dada205aef05e0ef903ed2f495618d
This should be less error prone and more reliable
than storing the pebble status in stored state.
Also remove the PebbleHandler.ready attribute,
which appears to not be used.
Change-Id: I8028d6dff219b63472a6fb309040f79935add639
Use renamed rabbitmq-k8s operator in bundles and the new rabbitmq
interface from the same operator in the codebase.
This will require an update to fetch-libs.sh for all charms
to rollout.
Change-Id: I53c8b9d1194895bdf6322cf8a256f32459aa76d7
The existing cloud-credentials interface was missing from the charmhub
and not correctly namespaced to the keystone-k8s charm.
Update to use the new published version.
Change-Id: Ibb8cfe50609173b23b408414ab8452f4d6bcd4ae
A container service layer is a dictionary of services so there
may be more than once service defintion. Account for this by
iterating of the services and starting each one in turn.
Change-Id: I4cba2e0cda156a6852e71059b0dc0cb1948ce9e6
Remove bespoke charm config handling as this can now be done in
ops.testing. Also update call to _TestingModelBackend to include
charm config.
Change-Id: I041ac4bfead12268c99c1773f0ca60f141e34047
Currently when bootstrap fails, the exception
is caught and the event hook is considered as
successful. This patch defers the event when
bootstrap fails.
Change-Id: I03a028bb6f10ff5c180ee3be32be0b0f48a61a59
Following changes are done in this patch:
* Add mandatory flag to relations handler classes default
to False.
* Add mandatory_relations to charm base classes to list
all the mandatory relations.
* update relation_handlers_ready based on mandatory_relations
Change-Id: Ibc846461cf92a0a6501a15d03907c93ecdf90063
We can't silently ignore errors importing the ingress lib
_and_ refer to it in toplevel code.
So remove the top level 'optional' import,
and replace it with a non-optional inline import where it's used.
Also remove the type annotations
because these names may or may not be defined.
Change-Id: I45a285a929e70813c88ea1e11ef8085f7b96aaf9
Breaking changes for dependent charms:
- `self.db: str` has been removed in favour of
`self.dbs: Mapping[str, str]` mapping relation names to dabatase names
- interface name for database has changed
from mysql_datastore to mysql_client.
- The default database relation name has changed from `shared-db`
to `database`. We'll follow this convention in all dependent charms.
Change-Id: I750a8311c1e3db0b414207f712fa9061004b6920
To restructure unit tests from <charm>/unit_tests to
<charm>/tests/unit the charm_dir variable should point
to top <charm> directory properly. This patch fixes
correct top <charm> directory path to restructure
unit tests.