You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update_weights="${update_weights} UPDATE mysql_servers SET weight=${read_weight} WHERE hostgroup_id IN (10, 8010) AND hostname LIKE \"${pod_name}%\"; UPDATE mysql_servers SET weight=${write_weight} WHERE hostgroup_id IN (11, 8011) AND hostname LIKE \"${pod_name}%\";"
83
+
done
84
+
53
85
wait_for_proxy
54
86
87
+
sed -i "s/^clusterHost.*=.*$/clusterHost=\"${service}\"/"${PERCONA_SCHEDULER_CFG}
88
+
55
89
SSL_ARG=""
56
90
if [ "$(proxysql_admin_exec "127.0.0.1"'SELECT variable_value FROM global_variables WHERE variable_name="mysql-have_ssl"')"="true" ];then
57
91
SSL_ARG="--use-ssl=yes"
92
+
if [ "${SCHEDULER_ENABLED}"=="true" ];then
93
+
sed -i "s/^useSSL.*=.*$/useSSL=1/"${PERCONA_SCHEDULER_CFG}
94
+
else
95
+
SSL_ARG="--use-ssl=yes"
96
+
fi
58
97
fi
59
98
60
-
local tmp=$(mktemp)
61
-
sed "s/WRITE_NODE=.*/WRITE_NODE='$pod_zero.$service:3306'/g" /etc/proxysql-admin.cnf >${tmp}
62
-
cat ${tmp}>/etc/proxysql-admin.cnf
63
-
64
-
proxysql-admin \
65
-
--config-file=/etc/proxysql-admin.cnf \
66
-
--cluster-hostname="$first_host" \
67
-
--enable \
68
-
--update-cluster \
69
-
--force \
70
-
--remove-all-servers \
71
-
--disable-updates \
72
-
--force \
73
-
$SSL_ARG
74
-
75
-
proxysql-admin \
76
-
--config-file=/etc/proxysql-admin.cnf \
77
-
--cluster-hostname="$first_host" \
78
-
--sync-multi-cluster-users \
79
-
--add-query-rule \
80
-
--disable-updates \
81
-
--force
82
-
83
-
proxysql-admin \
84
-
--config-file=/etc/proxysql-admin.cnf \
85
-
--cluster-hostname="$first_host" \
86
-
--update-mysql-version
99
+
if [ "${SCHEDULER_ENABLED}"=="true" ];then
100
+
if proxysql-admin --config-file=/etc/proxysql-admin.cnf --is-enabled >/dev/null 2>&1;then
0 commit comments