-
Notifications
You must be signed in to change notification settings - Fork 96
Description
import consulate
consul_host = os.environ['CONSUL_HOST']
consul = consulate.Consul(consul_host)
consul.agent.service.deregister('redis')
Your code use Method GET. You need to use ### PUT.
So, service can't been deleted.
16:55:48.376090 IP colswic01.test.local.56820 > 172.18.0.2.8500: Flags [P.], seq 323:501, ack 491, win 245, options [nop,nop,TS val 1460761607 ecr 1460761605], length 178
E...L.@.@.............!4..:68.......Y......
W.t.W.t.GET /v1/agent/service/deregister/redis HTTP/1.1
Host: 127.0.0.1:8500
Accept-Encoding: gzip, deflate
Connection: keep-alive
User-Agent: python-requests/2.19.1
Accept: /
16:55:48.376423 IP 172.18.0.2.8500 > colswic01.test.local.56820: Flags [P.], seq 491:737, ack 501, win 252, options [nop,nop,TS val 1460761607 ecr 1460761607], length 246
E..*..@.@.H.........!4..8.....:.....YD.....
W.t.W.t.HTTP/1.1 405 Method Not Allowed
Allow: OPTIONS,PUT
Content-Encoding: gzip
Content-Type: text/plain; charset=utf-8
Vary: Accept-Encoding
Date: Mon, 25 Jun 2018 13:55:48 GMT
Content-Length: 46