Merge branch '2.3' into develop
This commit is contained in:
@ -1145,16 +1145,13 @@ int Mariadb_nodes::truncate_mariadb_logs()
|
||||
int local_result = 0;
|
||||
for (int node = 0; node < N; node++)
|
||||
{
|
||||
char sys[PATH_MAX + 1500];
|
||||
if (strcmp(IP[node], "127.0.0.1") != 0)
|
||||
{
|
||||
snprintf(sys,
|
||||
sizeof(sys),
|
||||
"ssh -i %s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=quiet %s@%s 'sudo truncate /var/lib/mysql/*.err --size 0;sudo rm -f /etc/my.cnf.d/binlog_enc*\' &",
|
||||
sshkey[node],
|
||||
access_user[node],
|
||||
IP[node]);
|
||||
local_result += system(sys);
|
||||
local_result += ssh_node_f(node, true,
|
||||
"truncate -s 0 /var/lib/mysql/*.err;"
|
||||
"truncate -s 0 /var/log/syslog;"
|
||||
"truncate -s 0 /var/log/messages;"
|
||||
"rm -f /etc/my.cnf.d/binlog_enc*;");
|
||||
}
|
||||
}
|
||||
return local_result;
|
||||
|
@ -247,7 +247,11 @@ int Maxscales::restart_maxscale(int m)
|
||||
if (use_valgrind)
|
||||
{
|
||||
res = stop_maxscale(m);
|
||||
res += start_maxscale(m);
|
||||
res = ssh_node_f(m, false,
|
||||
"sudo --user=maxscale valgrind --leak-check=full --show-leak-kinds=all "
|
||||
"--log-file=/%s/valgrind%02d.log --trace-children=yes "
|
||||
"--track-origins=yes /usr/bin/maxscale", maxscale_log_dir[m], valgring_log_num);
|
||||
valgring_log_num++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -791,12 +791,16 @@ void TestConnections::init_maxscale(int m)
|
||||
true,
|
||||
"cp maxscale.cnf %s;"
|
||||
"iptables -F INPUT;"
|
||||
"rm -rf %s/*.log /tmp/core* /dev/shm/* /var/lib/maxscale/maxscale.cnf.d/ /var/lib/maxscale/*;"
|
||||
"%s"
|
||||
"maxctrl api get maxscale/debug/monitor_wait",
|
||||
"rm -rf %s/*.log /tmp/core* /dev/shm/* /var/lib/maxscale/maxscale.cnf.d/ /var/lib/maxscale/*;",
|
||||
maxscales->maxscale_cnf[m],
|
||||
maxscales->maxscale_log_dir[m],
|
||||
maxscale::start ? "service maxscale restart;" : "");
|
||||
maxscales->maxscale_log_dir[m]);
|
||||
if (maxscale::start)
|
||||
{
|
||||
maxscales->restart_maxscale(m);
|
||||
maxscales->ssh_node_f(m,
|
||||
true,
|
||||
"maxctrl api get maxscale/debug/monitor_wait");
|
||||
}
|
||||
}
|
||||
|
||||
void TestConnections::copy_one_mariadb_log(int i, std::string filename)
|
||||
|
Reference in New Issue
Block a user