Detect double monitoring of servers

Adding a server to multiple monitors is forbidden. This should be detected
and reported to the end user.

The information provided by the config_runtime system to the client isn't
as detailed as it could be. Some sort of an error message stack should be
added so that client facing interfaces could properly report the reason
for the failure. Currently the only way to detect the reason of the
failure is to parse the log files.
This commit is contained in:
Markus Makela
2016-12-11 09:14:53 +02:00
parent 312cf69739
commit cb218804ef
6 changed files with 29 additions and 26 deletions

View File

@ -852,7 +852,8 @@ static void cmd_AddServer(DCB *dcb, SERVER *server, char *v1, char *v2, char *v3
}
else
{
dcb_printf(dcb, "No service or monitor with the name '%s'\n", values[i]);
dcb_printf(dcb, "Could not add server '%s' to object '%s'. See error log for more details.\n",
server->unique_name, values[i]);
}
}
}