[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
This commit is contained in:
Vasyl Saienko 2023-07-10 07:44:35 +00:00
parent cb3afe6f85
commit 842f0f11dc
3 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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 "

View File

@ -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
...