Clean active status for unit

Ensure that no unit level message is set when setting the
unit status.  This allows deployment tooling to correctly
assess when deployment is complete.

Provide the URL for horizon as part of the application
status message.

Change-Id: I3dafeff3332202d6c91d8e477d5a40ce98131017
This commit is contained in:
James Page 2022-11-14 11:17:10 +00:00
parent 18038c5865
commit 2c81e9f12d

View File

@ -139,7 +139,11 @@ class OpenstackDashboardOperatorCharm(sunbeam_charm.OSBaseOperatorAPICharm):
"""Configure charm services."""
super().configure_charm(event)
if self.bootstrapped():
self.status.set(ops.model.ActiveStatus(self.ingress_public.url))
self.status.set(ops.model.ActiveStatus(""))
if self.model.unit.is_leader():
self.model.app.status = ops.model.ActiveStatus(
self.ingress_public.url
)
if __name__ == "__main__":