From 842f0f11dc23dca823d92482d69b200b69548cc3 Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Mon, 10 Jul 2023 07:44:35 +0000 Subject: [PATCH] [mariadb] Give more time on resolving configmap update conflicts Make 'data too old' timeout dependent on state report interval. Increase timeout to 5 times of report interval. Change-Id: I0c350f9e64b65546965002d0d6a1082fd91f6f58 --- mariadb/Chart.yaml | 2 +- mariadb/templates/bin/_start.py.tpl | 3 ++- releasenotes/notes/mariadb.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index 31edd4c664..7e12ec9cc7 100644 --- a/mariadb/Chart.yaml +++ b/mariadb/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v10.6.7 description: OpenStack-Helm MariaDB name: mariadb -version: 0.2.58 +version: 0.2.59 home: https://mariadb.com/kb/en/ icon: http://badges.mariadb.org/mariadb-badge-180x60.png sources: diff --git a/mariadb/templates/bin/_start.py.tpl b/mariadb/templates/bin/_start.py.tpl index 2687310336..c012963e04 100644 --- a/mariadb/templates/bin/_start.py.tpl +++ b/mariadb/templates/bin/_start.py.tpl @@ -665,8 +665,9 @@ def check_if_cluster_data_is_fresh(): sample_time_ok = True for key, value in list(sample_times.items()): sample_time = iso8601.parse_date(value).replace(tzinfo=None) + # NOTE(vsaienko): give some time on resolving configmap update conflicts sample_cutoff_time = datetime.utcnow().replace( - tzinfo=None) - timedelta(seconds=20) + tzinfo=None) - timedelta(seconds=5*state_configmap_update_period) if not sample_time >= sample_cutoff_time: logger.info( "The data we have from the cluster is too old to make a " diff --git a/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index 2b87ac2381..fbdebcfe90 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -74,4 +74,5 @@ mariadb: - 0.2.56 Stop running threads on sigkill - 0.2.57 Remove useless retries on conflicts during cm update - 0.2.58 Prevent TypeError in get_active_endpoint function + - 0.2.59 Give more time on resolving configmap update conflicts ...