Skip to content

Commit

Permalink
Reintroduce check for container ready (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
welpaolo authored Apr 13, 2023
1 parent ef1a70e commit d752428
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def _on_certificate_available(self, event) -> None:
event.defer()
return

if not self.charm.container.can_connect():
event.defer()
return

# avoid setting tls files and restarting
if event.certificate_signing_request != self.csr:
logger.error("Can't use certificate, found unknown CSR")
Expand Down

0 comments on commit d752428

Please sign in to comment.