Samuel Allan 539f36817f
[tempest-k8s] Fix error on remove-application
Previously on application remove,
tempest-k8s charm would error at the relation-broken hook,
causing the removal to fail:

```
tempest/0*                   error        idle       10.1.169.40         hook failed: "identity-ops-relation-broken"
```

with traceback:

```
  File "/var/lib/juju/agents/unit-tempest-0/charm/src/handlers.py", line 609, in _on_provider_goneaway
    self.charm.set_tempest_ready(False)
  File "/var/lib/juju/agents/unit-tempest-0/charm/./src/charm.py", line 283, in set_tempest_ready
    self.peers.set_unit_data({TEMPEST_READY_KEY: "true" if ready else ""})
  File "/var/lib/juju/agents/unit-tempest-0/charm/lib/ops_sunbeam/relation_handlers.py", line 625, in set_unit_data
    self.interface.set_unit_data(settings)
  File "/var/lib/juju/agents/unit-tempest-0/charm/lib/ops_sunbeam/interfaces.py", line 150, in set_unit_data
    self.peers_rel.data[self.model.unit][k] = v
AttributeError: 'NoneType' object has no attribute 'data'
```

This fixes the issue for tempest (and potentially if similar issues
are present on other sunbeam charms),
by checking if peels_rel exists because trying to interact with it.

Change-Id: I5e01c1dba719a63160f0452282d57b9eae14b41b
2024-05-15 14:32:46 +02:00
2024-01-25 12:30:54 +01:00
2024-04-27 11:17:30 +05:30
2023-11-30 15:32:39 +05:30
2023-11-30 15:32:39 +05:30
2023-11-30 15:32:39 +05:30
2024-04-27 11:17:30 +05:30
2024-02-02 15:25:35 +05:30
2023-11-30 15:32:39 +05:30
2024-03-06 09:55:34 +10:30
2024-04-27 11:17:30 +05:30
2024-01-25 12:30:54 +01:00

Monolithic Repository for Sunbeam Charms

This repository contains the core charms for the Sunbeam deployment and associated charm libraries.

Development docs

See the CONTRIBUTING.md in the root of the repository and individual charm directories for more information.

Description
Juju Charms - Monorepo for sunbeam Charms
Readme 7.8 MiB
Languages
Python 89.2%
Jinja 10.2%
Shell 0.6%