From a412ed62110f17069751ea9497c9824f7c1d2fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 24 Mar 2020 10:45:58 +0200 Subject: [PATCH 1/4] Fix monitor REST API documentation The DELETE documentation had the wrong endpoint. --- Documentation/REST-API/Resources-Monitor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/REST-API/Resources-Monitor.md b/Documentation/REST-API/Resources-Monitor.md index 49988c8e3..b8e16c2db 100644 --- a/Documentation/REST-API/Resources-Monitor.md +++ b/Documentation/REST-API/Resources-Monitor.md @@ -366,7 +366,7 @@ Invalid JSON body: ### Destroy a monitor ``` -DELETE /v1/monitors/:name/stop +DELETE /v1/monitors/:name ``` Destroy a created monitor. The monitor must not have relationships to any From 7b00d2c01bc33e4e1f4fe920d86a642385c73b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 24 Mar 2020 10:55:54 +0200 Subject: [PATCH 2/4] MXS-2942: Only DELETE monitors with no servers The behavior is now according to the documentation and is consistent with how services behave. --- server/core/config_runtime.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/core/config_runtime.cc b/server/core/config_runtime.cc index fa99859bb..b5db226d1 100644 --- a/server/core/config_runtime.cc +++ b/server/core/config_runtime.cc @@ -1384,6 +1384,15 @@ bool runtime_destroy_service(Service* service) bool runtime_destroy_monitor(MXS_MONITOR* monitor) { + monitor_stop(monitor); + + if (monitor->monitored_servers) + { + monitor_start(monitor, monitor->parameters); + config_runtime_error("Cannot destroy monitor '%s', it is monitoring servers.", monitor->name); + return false; + } + bool rval = false; char filename[PATH_MAX]; snprintf(filename, sizeof(filename), "%s/%s.cnf", get_config_persistdir(), monitor->name); @@ -1404,12 +1413,7 @@ bool runtime_destroy_monitor(MXS_MONITOR* monitor) if (rval) { - monitor_stop(monitor); - - while (monitor->monitored_servers) - { - monitor_remove_server(monitor, monitor->monitored_servers->server); - } + mxb_assert(!monitor->monitored_servers); monitor_deactivate(monitor); MXS_NOTICE("Destroyed monitor '%s'", monitor->name); } From 1fc5ec36b1682f9139dc97741f27a74abcf04dff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 24 Mar 2020 15:22:40 +0200 Subject: [PATCH 3/4] Add filters to `maxctrl show service` The filters were not listed. --- maxctrl/lib/show.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maxctrl/lib/show.js b/maxctrl/lib/show.js index 06d51c9fc..809264c26 100644 --- a/maxctrl/lib/show.js +++ b/maxctrl/lib/show.js @@ -122,6 +122,11 @@ const service_fields = [ path: 'relationships.servers.data[].id', description: 'Servers that the service uses' }, + { + name: 'Filters', + path: 'relationships.filters.data[].id', + description: 'Filters that the service uses' + }, { name: 'Parameters', path: 'attributes.parameters', From 2630cc930ff38662227a9ce354c5c1e59513ff85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 27 Mar 2020 09:54:36 +0200 Subject: [PATCH 4/4] Install 2.3 license file --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70d30ba05..24995accb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -229,6 +229,7 @@ endif() install_file(${CMAKE_SOURCE_DIR}/COPYRIGHT core) install_file(${CMAKE_SOURCE_DIR}/README.md core) install_file(${CMAKE_SOURCE_DIR}/LICENSE.TXT core) +install_file(${CMAKE_SOURCE_DIR}/LICENSE23.TXT core) install_file(${CMAKE_SOURCE_DIR}/LICENSE-THIRDPARTY.TXT core) install_file(etc/lsyncd_example.conf core) install_manual(Documentation/maxscale.1 1 core)