python-consul
python-consul copied to clipboard
Catalog register/deregister WriteRequest JSON field not supported in modern consul versions
Latest version of python-consul fails to register or deregister any services when ACLs are enabled, because the way it submits the auth token was deprecated and support dropped around consul 0.7. More recent versions of consul now also apply strict schemas and reject unknown fields, including the WriteRequest { token: "" } block currently used to send the ACL token.
This results in:
consul.base.BadRequest: 400 Request decode failed: json: unknown field "WriteRequest"
Reference for removal of WriteRequest: https://github.com/hashicorp/consul/issues/1034#issuecomment-278215999
(This is fixed in python-consul2, leaving this issue open to make it discoverable for anyone else who runs into it: https://github.com/poppyred/python-consul2/blob/master/consul/base.py#L1794).