PearsonEducation / thalassa-aqueduct

Dynamic haproxy load balancer and configuration. Part of Thalassa
Other
37 stars 17 forks source link

examples don't work #3

Closed endzyme closed 11 years ago

endzyme commented 11 years ago
root@test-haproxy:~/build# curl -X PUT -H 'Content-Type: application/json' -i 
localhost:10000/backends/adcapi --data "\`cat back.json\`"

Returns:

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 129
Cache-Control: no-cache
Date: Wed, 09 Oct 2013 21:25:00 GMT
Connection: keep-alive
{"code":400,"error":"Bad Request","message":"the key (role) is not allowed, the key (health) is not allowed"}

Here's the JSON root@test-haproxy:~/build# cat back.json

{"type":"dynamic","role":"test","mode":"http","version":"1.0.1","balance":"roundrobin","health":{"method":"GET","uri":"/checkity-check","httpVersion":"HTTP/1.1","interval":5000},"host":"test.com","natives":[],"members":[]}
endzyme commented 11 years ago

https://github.com/PearsonEducation/thalassa-aqueduct/blob/master/lib/Data.js#L60-L97

Doesn't appear to include "role" but I cannot tell why health wouldn't work.

mbrevoort commented 11 years ago

Sorry, role was a typo from a previous API change. There was a validation problem with health checks. I fixed that and added a test.

Thanks!