Skip to content

Commit 5bdeef8

Browse files
fudunweimarkgoddard
authored andcommitted
Negative seqno need to be considered when comparing seqno
Need to consider Negative seqno to compare in some cases, but the task does not support to do that, we need to make it work. 1.we use mariabackup to restore datas on control1, delete the mariadb data on control2 and control3, and then use cluster recovery, as a result that the seqno of the other two nodes will be '-1'. 2. add one more control node into our existing mariadb cluster, and then use cluster recovery, the seqno of the new node will be '-1'. Change-Id: Ic1ac8656f28c3835e091637014f075ac5479d390 (cherry picked from commit 068f3fe)
1 parent 466e4cc commit 5bdeef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ansible/roles/mariadb/tasks/recover_cluster.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
shell:
7575
cmd: |
7676
if [[ ! -z {{ hostvars[inventory_hostname]['seqno'] }} && ! -z {{ hostvars[item]['seqno'] }} &&
77-
{{ hostvars[inventory_hostname]['seqno'] }} =~ ^[0-9]+$ && {{ hostvars[item]['seqno'] }} =~ ^[0-9]+$ &&
77+
{{ hostvars[inventory_hostname]['seqno'] }} =~ ^-?[0-9]+$ && {{ hostvars[item]['seqno'] }} =~ ^-?[0-9]+$ &&
7878
{{ hostvars[inventory_hostname]['seqno'] }} -lt {{ hostvars[item]['seqno'] }} ]]; then echo {{ hostvars[item]['seqno'] }}; fi
7979
with_items: "{{ groups['mariadb'] }}"
8080
register: seqno_compare

0 commit comments

Comments
 (0)