Stop processing configuration after the first failure
If the configuration processing encounters an error at the object construction stage, it needs to stop immediately. If another object depends on the object that failed, it would also fail but in a very confusing manner. Mainly this manifests itself as a missing reference to the object which would cause misleading errors to be logged.
This commit is contained in:
parent
6e79e34dd7
commit
c56ef3cc27
@ -1542,6 +1542,16 @@ process_config_context(CONFIG_CONTEXT *context)
|
||||
{
|
||||
error_count += create_new_monitor(obj, monitored_servers);
|
||||
}
|
||||
|
||||
if (error_count)
|
||||
{
|
||||
/**
|
||||
* We need to stop creating objects after the first error since
|
||||
* any objects that depend on the object that failed would fail in
|
||||
* a very confusing manner.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (error_count)
|
||||
|
Loading…
x
Reference in New Issue
Block a user