浏览代码

check for sst_in_progress

PROD-16528

Change-Id: Iacc949fb68e323632e0ed7a60e11c44a9812e724
master
Jiri Broulik 6 年前
父节点
当前提交
31b91b05b1
共有 3 个文件被更改,包括 11 次插入0 次删除
  1. +9
    -0
      galera/files/bootstrap.sh
  2. +1
    -0
      galera/master.sls
  3. +1
    -0
      galera/slave.sls

+ 9
- 0
galera/files/bootstrap.sh 查看文件

@@ -4,6 +4,7 @@ service {{ service.service }} start

counter=${1:-60}
retries=0
sst_in_progress='/var/lib/mysql/sst_in_progress'

while [ $counter -gt 0 ]
do
@@ -13,6 +14,14 @@ do
fi
counter=$(( counter - 1 ))
retries=$(( retries + 1 ))
{%- if slave %}
if [ $retries -gt 20 ]; then
if [ ! -e $sst_in_progress ]; then
echo "No sst is in progress."
break
fi
fi
{%- endif %}
sleep ${2:-10}
done


+ 1
- 0
galera/master.sls 查看文件

@@ -130,6 +130,7 @@ galera_bootstrap_script:
- source: salt://galera/files/bootstrap.sh
- defaults:
service: {{ master|yaml }}
slave: False
- template: jinja

{%- if salt['cmd.shell']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %}

+ 1
- 0
galera/slave.sls 查看文件

@@ -127,6 +127,7 @@ galera_bootstrap_script:
- mode: 755
- defaults:
service: {{ slave|yaml }}
slave: True
- source: salt://galera/files/bootstrap.sh
- template: jinja


正在加载...
取消
保存