MXS-1929: Allow startup with no services
MaxScale can now be started with an empty configuration file and services can be created at runtime. Filters cannot yet be created at runtime so complete runtime creation of configurations is not yet possible.
This commit is contained in:
@ -2094,7 +2094,7 @@ int main(int argc, char **argv)
|
||||
/** Start the services that were created above */
|
||||
n_services = service_launch_all();
|
||||
|
||||
if (n_services == 0)
|
||||
if (n_services == -1)
|
||||
{
|
||||
const char* logerr = "Failed to start all MaxScale services. Exiting.";
|
||||
print_log_n_stderr(true, true, logerr, logerr, 0);
|
||||
|
@ -87,7 +87,7 @@ void service_destroy_instances(void);
|
||||
* Initialize and start all services. This should only be called once by the
|
||||
* main initialization code.
|
||||
*
|
||||
* @return Number of successfully started services
|
||||
* @return Number of successfully started services or -1 on error
|
||||
*/
|
||||
int service_launch_all(void);
|
||||
|
||||
|
@ -650,7 +650,8 @@ int service_launch_all()
|
||||
|
||||
ptr = ptr->next;
|
||||
}
|
||||
return error ? 0 : n;
|
||||
|
||||
return error ? -1 : n;
|
||||
}
|
||||
|
||||
bool serviceStop(SERVICE *service)
|
||||
|
Reference in New Issue
Block a user