We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 858e6a7 commit a301a4aCopy full SHA for a301a4a
src/upgrade.py
@@ -34,7 +34,7 @@
34
from typing_extensions import override
35
36
import k8s_helpers
37
-from constants import MYSQLD_SAFE_SERVICE
+from constants import CONTAINER_NAME, MYSQLD_SAFE_SERVICE
38
39
if TYPE_CHECKING:
40
from charm import MySQLOperatorCharm
@@ -203,6 +203,8 @@ def _on_upgrade_changed(self, _) -> None:
203
204
Run update status for every unit when the upgrade is completed.
205
"""
206
+ if not self.charm.unit.get_container(CONTAINER_NAME).can_connect():
207
+ return
208
if not self.upgrade_stack and self.idle and self.charm.unit_initialized:
209
self.charm._on_update_status(None)
210
0 commit comments