$ curl -s -u admin:admin "http://localhost:30555/v3/services/haproxy/runtime/backends/function_figlet_forwarded/servers" | jq
[
{
"address": "IP_X",
"admin_state": "ready",
"id": "1",
"name": "openfaas-local",
"operational_state": "up",
"port": 31112
},
{
"address": "IP_Y",
"admin_state": "ready",
"id": "2",
"name": "test",
"operational_state": "up",
"port": 31112
}
]
$ curl -s -u admin:admin -X PUT "http://localhost:30555/v3/services/haproxy/runtime/backends/function_figlet_forwarded/servers/openfaas-local" -H "Content-Type: application/json" -d '{"weight": 80}' | jq
{
"address": "IP_X",
"admin_state": "ready",
"id": "1",
"name": "openfaas-local",
"operational_state": "up",
"port": 31112
}
$ curl -s -u admin:admin "http://localhost:30555/v3/services/haproxy/runtime/backends/function_figlet_forwarded/servers" | jq
[
{
"address": "IP_X",
"admin_state": "ready",
"id": "1",
"name": "openfaas-local",
"operational_state": "up",
"port": 31112
},
{
"address": "IP_Y",
"admin_state": "ready",
"id": "2",
"name": "test",
"operational_state": "up",
"port": 31112
}
]
Hi, I'm using the following two endpoints to add a new server and set its weight via the Runtime API, in order to avoid reloading HAProxy:
/services/haproxy/runtime/backends/{parent_name}/servers/{name}(doc)/services/haproxy/runtime/backends/{parent_name}/servers(doc)The issue I'm facing (also reported on the HAProxy Discourse) is that runtime transient server properties (such as
weight) are not properly returned by the GET/services/haproxy/runtime/backends/{parent_name}/servers/{name}endpoint.Here is an example:
curl commands
As shown above, even after setting the
weightvia the runtime API, the value does not appear in subsequentGETresponse. I think this is a bug, or am I doing something wrong? I'm using HAProxy 3.3.10-0a72d7f9f and Data Plane API v3.2.5 152e8a0.