python-consul icon indicating copy to clipboard operation
python-consul copied to clipboard

Catalog register/deregister WriteRequest JSON field not supported in modern consul versions

Open optiz0r opened this issue 4 years ago • 0 comments

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).

optiz0r avatar Jul 27 '21 11:07 optiz0r