MXS-1883 Maintenance is now the only user-modifiable bit for a monitored server

The request to turn maintenance off/on is a separate flag, although the actual
status is still contained in the status bitfield.
This commit is contained in:
Esa Korhonen
2018-05-24 13:47:56 +03:00
parent 2f48d079db
commit c039821467
11 changed files with 182 additions and 40 deletions

View File

@ -22,6 +22,7 @@
#include <maxscale/protocol.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/router.h>
#include <maxscale/server.hh>
#include <maxscale/utils.h>
/*
@ -329,7 +330,7 @@ static void handle_error_response(DCB *dcb, GWBUF *buffer)
"mode.", dcb->server->name,
dcb->server->address, dcb->server->port);
server_set_status(dcb->server, SERVER_MAINT);
mxs::server_set_status(dcb->server, SERVER_MAINT, NULL);
}
else if (errcode == ER_ACCESS_DENIED_ERROR ||
errcode == ER_DBACCESS_DENIED_ERROR ||