diff --git a/Documentation/REST-API/Resources-Server.md b/Documentation/REST-API/Resources-Server.md index c9acaaff1..4ef3321ee 100644 --- a/Documentation/REST-API/Resources-Server.md +++ b/Documentation/REST-API/Resources-Server.md @@ -574,6 +574,18 @@ the following URL must be made: PUT /v1/servers/db-server-1/set?state=maintenance ``` +This endpoint also supports the `force=yes` parameter that will cause all +connections to the server to be closed if `state=maintenance` is also set. By +default setting a server into maintenance mode will cause connections to be +closed only after the next request is sent. + +The following example forcefully closes all connections to server _db-server-1_ +and sets it into maintenance mode: + +``` +PUT /v1/servers/db-server-1/set?state=maintenance&force=yes +``` + #### Response Server state modified: diff --git a/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md index 825ac9f20..109f648cc 100644 --- a/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md @@ -118,6 +118,16 @@ The output shows the statements (the canonical version) in the cache, the number of times they have been encountered and how they have been classified. +### REST API & MaxCtrl: Hard maintenance mode + +The new `--force` option for the `set server` command in MaxCtrl allows all +connections to the server in question to be closed when it is set into +maintenance mode. This causes idle connections to be closed immediately. + +For more information, read the +[REST-API](../REST-API/Resources-Server.md#set-server-state) documentation for +the `set` endpoint. + ## Bug fixes [Here is a list of bugs fixed in MaxScale 2.4.0.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.4.0)