dataplaneapi
dataplaneapi copied to clipboard
Results seem incoherent
Not sure that is an issue. Is it normal to get the results below?
$ curl -squ admin:password -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/services/haproxy/configuration/servers/prod-front-04?backend=bck_fronts"
{"_version":1,"data":{"address":"10.121.138.34","check":"enabled","name":"prod-front-04","port":80,"proxy-v2-options":null}}
$ curl -squ admin:password -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/services/haproxy/runtime/servers/prod-front-04?backend=bck_fronts"
{"code":404,"message":"Runtime server prod-front-04 not found in backend bck_fronts"}
$ curl -squ admin:password -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/services/haproxy/configuration/servers?backend=bck_fronts"
{"_version":1,"data":[{"address":"10.121.138.31","check":"enabled","name":"prod-front-01","port":80,"proxy-v2-options":null},{"address":"10.121.138.32","check":"enabled","name":"prod-front-02","port":80,"proxy-v2-options":null},{"address":"10.121.138.33","check":"enabled","name":"prod-front-03","port":80,"proxy-v2-options":null},{"address":"10.121.138.34","check":"enabled","name":"prod-front-04","port":80,"proxy-v2-options":null}]}
$ curl -squ admin:password -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/services/haproxy/runtime/servers?backend=bck_fronts"
[]
This can be that the HAProxy has not reloaded, or there is something wrong with your stats socket
configuration. For the /configuration
endpoints we are looking in the config file, while for the /runtime
endpoints we are using HAProxy's runtime API over the configured stats socket
for that process.
Can you share your global
section?
global
group root
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3 no-tls-tickets
ssl-default-server-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
stats socket /var/run/haproxy/info.sock
stats timeout 30s
tune.ssl.default-dh-param 2048
user root
I tried to reproduce your issue, but using dataplaneapi from master, /runtime
returns the correct output. So I would say either @ycadin has an issue in his configuration, or the bug has been fixed in recent versions.