Commit 7d73b726 authored by unknown's avatar unknown

Fix for BUG#18023: IM: instance can be started several times;

monitor interval must be > 2sec.


server-tools/instance-manager/guardian.cc:
  Start instance only if it is really crashed.
parent 67ddb320
......@@ -138,11 +138,14 @@ void Guardian_thread::process_instance(Instance *instance,
break;
case JUST_CRASHED:
if (current_time - current_node->crash_moment <= 2)
{
if (instance->is_crashed())
{
instance->start();
log_info("guardian: starting instance %s",
instance->options.instance_name);
}
}
else
current_node->state= CRASHED;
break;
......@@ -151,6 +154,8 @@ void Guardian_thread::process_instance(Instance *instance,
monitoring_interval)
{
if ((current_node->restart_counter < restart_retry))
{
if (instance->is_crashed())
{
instance->start();
current_node->last_checked= current_time;
......@@ -158,6 +163,7 @@ void Guardian_thread::process_instance(Instance *instance,
log_info("guardian: restarting instance %s",
instance->options.instance_name);
}
}
else
current_node->state= CRASHED_AND_ABANDONED;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment