From 22cc155e55928a0dc4aeccc17862bbb706d88754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 23 Jul 2018 21:59:57 +0300 Subject: [PATCH] MXS-1929: Process relationships when creating services The relationships of a service are handled by the service alteration code. Currently, only server relationships are handled by the code in question and filter relationships are ignored. --- server/core/config_runtime.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index e1b7ebe1f..c6e3af1a5 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -1915,6 +1915,13 @@ SERVICE* runtime_create_service_from_json(json_t* json) { rval = service_find(name); ss_dassert(rval); + + // Performing an alter right after creation takes care of server relationships + if (!runtime_alter_service_from_json(rval, json)) + { + runtime_destroy_service(rval); + rval = NULL; + } } config_parameter_free(params);