From 79a5ca0b3446cf62f4d6677551272ec79fee965a Mon Sep 17 00:00:00 2001 From: Enrico Deusebio Date: Wed, 6 Dec 2023 21:27:45 +0100 Subject: [PATCH] add some time for settling down --- src/upgrade.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/upgrade.py b/src/upgrade.py index c91033a4..d4d1a6bc 100644 --- a/src/upgrade.py +++ b/src/upgrade.py @@ -4,6 +4,7 @@ """Manager for handling Kafka in-place upgrades.""" import logging +import time from typing import TYPE_CHECKING from charms.data_platform_libs.v0.upgrade import ( @@ -101,6 +102,9 @@ def _on_upgrade_granted(self, event: UpgradeGrantedEvent) -> None: logger.info(f"{self.charm.unit.name} upgrading service...") self.charm.snap.restart_snap_service() + # Allow for some time to settle down + time.sleep(60) + try: logger.debug("Running post-upgrade check...") self.post_upgrade_check()