-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in certbot-dns-ovh using lexicon #1758
Comments
Why OVH, why ... So basically the issue is due to an error raised by Three scenarios can happen with
Documentation of OVH has always stated that API response body was a JSON for some POST request, and no body for others (typically However it seems that now, OVH APIs may return an empty body instead of no body sometimes. I really mean sometimes here because the behavior appears to be flaky. I tested creation and deletion of records: sometimes no body is returned for I released a new version of Lexicon that explicitly catches 3) to return Release |
Hello, Api has been changed to return a HTTP 204 instead of an HTTP 200 with body = null |
The code was already completely fine with either 200 or 204 code, and also fine with a response without body. In this case The problem here was that some APIs started to return an empty body, for which What is worse is that the same endpoint returns sometimes no body, sometimes an empty body. I guess that it is related to some internal state on OVH side, like the endpoint triggers an action or not. But this is not specified anywhere in the doc, that is stated only that no body is returned for this kind of endpoints. |
Hello, Thanks for the fast correction ! However, I still have another error
Thanks for your help |
Hi, On behalf of the OVH DNS team I apologize for the trouble. |
Thanks a lot @e-gautier for you response. It clarifies the situation. I think that changing from HTTP 200 to HTTP 204 in these endpoints makes sense. Alone this change would have had no impact, at least on Lexicon/Certbot side, and I bet in most other places also. Indeed the semantic usually applied is given by calling some abstraction method to check that the response is "valid", and any HTTP client will consider that 200 and 204 are valid. Here we are calling The real problem is that these endpoints are now returning a body, which is an empty string. This is a direct violation of the intention of HTTP 204 status, and also of any response containing the header So I would strongly advise you to stop the API from returning a body when HTTP 204 is involved. Not only that it will kill right now all errors encountered by OVH users with Lexicon and Certbot, but you get a clean implementation that is future-proof. |
Hello @adferrand, |
You are right and I interpretated wrongly the situation. Before these APIs (and still a couple of others, like In that extent HTTP 204 makes an actual body not necessary, even So I concur with this change in the long term, but sadly it still represents a move in the API in short term that would deserve at least a migration path and potentially some versioning on the API... |
Hello guys, Does the issue has been fixed lately ? |
Yes, it has been fixed. |
Hello,
I use certbot-dns-ovh who use lexicon for dns.
But lexicon return an error for OVH provider. This worked before so i think it's can be a change in OVH api or in lexicon code.
Certbot require lexion >=3.14.1 : https://github.com/certbot/certbot/blob/d9d825ac50414ba837fdd319beaa5a9f72139457/certbot-dns-ovh/setup.py#L10C24-L10C24
As you can see in logs, lexicon return error
An issue is also open on certbot side but i think resolution need to be find on lexicon side : certbot/certbot#9799
Thanks for your help
The text was updated successfully, but these errors were encountered: