Skip to content
Snippets Groups Projects
Commit 984cb0a7 authored by Sven Kieske's avatar Sven Kieske
Browse files

mariadb: fix cluster recovery


sometimes cluster recovery didn't work
because we only look for the sequence number in the last 200 lines
of the log file.

fix this by ingesting the complete file and only register the last
sequence number we find.

Closes-Bug: 1821173

Change-Id: Iea2661c9d5d262cf99edd5f5b567f252607a0003
Signed-off-by: default avatarSven Kieske <kieske@osism.tech>
parent 603af281
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@
# WSREP: Recovered position: <UUID>:<seqno>.
- name: Get MariaDB wsrep recovery seqno
become: true
shell: tail -n 200 /tmp/mariadb_tmp.log | awk -F" " '$0~/Recovered position/{print $NF;exit;}' | awk -F":" '{print $2}'
shell: awk -F" " '/Recovered position/{seqno=$NF} END{split(seqno, a, ":"); print a[2]}' /tmp/mariadb_tmp.log
register: wsrep_recovery_seqno
- name: Removing MariaDB log file from /tmp
......
---
fixes:
- |
Fixed an issue where the MariaDB Cluster recovery process would fail if the
sequence number was not found in the logs. The recovery process now checks
the complete log file for the sequence number and recovers the cluster.
See `LP#1821173 <https://bugs.launchpad.net/kolla-ansible/+bug/1821173>`__
for details.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment