[Mariadb] Update the start script to fix lingering annotation

This patch fixes the issue where the script is leaving behind
reboot.node annotation after cluster is up. These changes were reverted,
back in the commit c2269d70a2  and are
absolutely needed. So  we are putting the reboot.node annotion empty
value back before calling run_mysqld.

Change-Id: I3f8ad2f5de0f169d7e37f1a15bcc85ebde4c01c8
Signed-off-by: Singh, Jasvinder (js581j) <js581j@att.com>
This commit is contained in:
Singh, Jasvinder (js581j)
2025-09-25 12:25:36 -05:00
parent d67035241a
commit 8f961833e6
2 changed files with 10 additions and 1 deletions

View File

@@ -911,7 +911,6 @@ def run_mysqld(cluster='existing'):
logger.info(
"This is a fresh node joining the cluster for the 1st time, not attempting to set admin passwords or upgrading"
)
logger.info("Launching MariaDB")
run_cmd_with_logging(mysqld_cmd, logger)
@@ -996,6 +995,8 @@ elif get_cluster_state() == 'live':
time.sleep(default_sleep)
set_configmap_annotation(
key='openstackhelm.openstack.org/cluster.state', value='live')
set_configmap_annotation(
key='openstackhelm.openstack.org/reboot.node', value='')
run_mysqld()
elif get_cluster_state() == 'reboot':
reboot_node = get_configmap_value(

View File

@@ -0,0 +1,8 @@
---
mariadb:
- |
The reboot.node annotation wasn't removed after the cluster init is done.
This happened due to the fact that commit
c2269d70a23b55c459233ab5fc28362b7c2ca766 removed necessary code lines for
this and is absolutely needed. So, we are putting these changes back.
...