Failure to load filters is now a configuration error

When a filter module is not found or the instance creation fails, this is considered
a fatal error and MaxScale will not start. If a failure occurs when the configuration
is being reloaded, the service will not use filters and an error will be logged.
This commit is contained in:
Markus Makela
2015-11-17 06:06:56 +02:00
parent 9c7118eb9a
commit 41d26b5b73
3 changed files with 69 additions and 40 deletions

View File

@ -1028,7 +1028,10 @@ process_config_context(CONFIG_CONTEXT *context)
if (filters && obj->element)
{
serviceSetFilters(obj->element, filters);
if (!serviceSetFilters(obj->element, filters))
{
error_count++;
}
}
}
else if (!strcmp(type, "listener"))
@ -2141,7 +2144,11 @@ process_config_update(CONFIG_CONTEXT *context)
}
if (filters && obj->element)
{
serviceSetFilters(obj->element, filters);
if (!serviceSetFilters(obj->element, filters))
{
MXS_ERROR("Failed to set service filters for '%s'. This "
"service will not use filters.", obj->object);
}
}
}
else if (!strcmp(type, "listener"))