From 8a63c801c673a3c9f202f198091c4e41b3f4033c Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Tue, 27 Feb 2018 17:39:13 +0100 Subject: [PATCH] Fix mariadb recover seqnum regex Regex used to find the recover seqnum partition is not returning the real num id rather a None. Task fails due seqnum[0] is not iterable. Change-Id: I1be55b6ebfc17c6d423e638662ec2a9f4b9b49a2 Closes-Bug: #1752128 --- ansible/roles/mariadb/tasks/recover_cluster.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/mariadb/tasks/recover_cluster.yml b/ansible/roles/mariadb/tasks/recover_cluster.yml index 2258216e76..a011cb2319 100644 --- a/ansible/roles/mariadb/tasks/recover_cluster.yml +++ b/ansible/roles/mariadb/tasks/recover_cluster.yml @@ -43,7 +43,7 @@ shell: "docker cp {{ mariadb_service.container_name }}:/var/log/kolla/mariadb/mariadb.log /tmp/mariadb_tmp.log" - name: Get MariaDB wsrep recovery seqno - shell: "tail -n 200 /tmp/mariadb_tmp.log | grep Recovered | tail -1 | awk '{print $7}' | awk -F'\n' '{print $1}' | awk -F':' '{print $2}'" + shell: tail -n 200 /tmp/mariadb_tmp.log | awk -F" " '$0~/Recovered position/{print $NF;exit;}' | awk -F":" '{print $1}' register: wsrep_recovery_seqno - name: Removing MariaDB log file from /tmp