rpc: Fix error message in virNetServerSetClientLimits

That way it actually fits with what the condition checks for.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Martin Kletzander 2023-01-02 16:21:24 +01:00
parent 1d625c5d25
commit f007940cb2
4 changed files with 36 additions and 3 deletions

View File

@ -1114,9 +1114,9 @@ virNetServerSetClientLimits(virNetServer *srv,
if (max < max_unauth) { if (max < max_unauth) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG, "%s",
_("The overall maximum number of clients must be " _("The overall maximum number of clients waiting "
"greater than the maximum number of clients waiting " "for authentication must not be less than the overall "
"for authentication")); "maximum number of clients"));
return -1; return -1;
} }

View File

@ -0,0 +1,31 @@
{
"servers": {
"testServer0": {
"min_workers": 10,
"max_workers": 50,
"priority_workers": 5,
"max_clients": 5,
"max_anonymous_clients": 10,
"keepaliveInterval": 120,
"keepaliveCount": 5,
"next_client_id": 5,
"services": [
{
"auth": 0,
"readonly": true,
"nrequests_client_max": 2,
"socks": [
{
"fd": 100,
"errfd": -1,
"pid": 0,
"isClient": false
}
]
}
],
"clients": [
]
}
}
}

View File

@ -0,0 +1 @@
internal error: The overall maximum number of clients must not be less than the number of clients waiting for authentication

View File

@ -413,6 +413,7 @@ mymain(void)
EXEC_RESTART_TEST_FAIL("anon-clients", 2); EXEC_RESTART_TEST_FAIL("anon-clients", 2);
EXEC_RESTART_TEST("client-auth-pending", 1); EXEC_RESTART_TEST("client-auth-pending", 1);
EXEC_RESTART_TEST_FAIL("client-auth-pending-failure", 1); EXEC_RESTART_TEST_FAIL("client-auth-pending-failure", 1);
EXEC_RESTART_TEST_FAIL("invalid-max-clients-failure", 1);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
} }