MXS-2057 Add log output for system test, and two random code fixes
This commit is contained in:
@ -1255,6 +1255,7 @@ static int read_log(const char* name, char** err_log_content_p)
|
|||||||
err_log_content[size] = '\0';
|
err_log_content[size] = '\0';
|
||||||
// printf("s=%ld\n", strlen(err_log_content));
|
// printf("s=%ld\n", strlen(err_log_content));
|
||||||
* err_log_content_p = err_log_content;
|
* err_log_content_p = err_log_content;
|
||||||
|
fclose(f);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -49,7 +49,7 @@ struct Duration : public Clock::duration
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** To seconds */
|
/** To seconds */
|
||||||
double secs()
|
double secs() const
|
||||||
{
|
{
|
||||||
return std::chrono::duration<double>(*this).count();
|
return std::chrono::duration<double>(*this).count();
|
||||||
}
|
}
|
||||||
|
@ -1020,6 +1020,7 @@ void RoutingWorker::check_systemd_watchdog()
|
|||||||
{
|
{
|
||||||
s_watchdog_next_check = now + s_watchdog_interval;
|
s_watchdog_next_check = now + s_watchdog_interval;
|
||||||
#ifdef HAVE_SYSTEMD
|
#ifdef HAVE_SYSTEMD
|
||||||
|
MXS_DEBUG("systemd watchdog keep-alive ping: sd_notify(false, \"WATCHDOG=1\")");
|
||||||
sd_notify(false, "WATCHDOG=1");
|
sd_notify(false, "WATCHDOG=1");
|
||||||
#endif
|
#endif
|
||||||
std::for_each(this_unit.ppWorkers, this_unit.ppWorkers + this_unit.nWorkers,
|
std::for_each(this_unit.ppWorkers, this_unit.ppWorkers + this_unit.nWorkers,
|
||||||
|
Reference in New Issue
Block a user