Skip to content

Webhook tries to create record in wrong zone #33

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

Closed
NicoJDE opened this issue Mar 18, 2025 · 5 comments · Fixed by #44
Closed

Webhook tries to create record in wrong zone #33

NicoJDE opened this issue Mar 18, 2025 · 5 comments · Fixed by #44

Comments

@NicoJDE
Copy link
Contributor

NicoJDE commented Mar 18, 2025

Hello,

we found a Bug that the provider tries to create a record in the wrong zone. We found the following Log line at OpenStack side:

"POST /v2/zones/93b315cf-c256-4ec8-bca9-4fafa73ffd14/recordsets HTTP/1.1\" status: 400 "}

The Webhook Provider make following Logs

level=error msg="Failed to apply changes: Expected HTTP response code [201 202] when accessing [POST https://dns.fra.cloud.inovex.io/v2/zones/93b315cf-c256-4ec8-bca9-4fafa73ffd14/recordsets], but got 400 instead: {\"code\": 400, \"type\": \"invalid_recordset_location\", \"message\": \"RecordSet belongs in a child zone: fra.ics.inovex.de.\", \"request_id\": \"req-85bdbc4d-e282-4358-aa66-dfbce1c95023\"}" 
@maxbischoff
Copy link
Member

Can you tell me what the record was, and what zones were available? I assume fra.ics.inovex.de. is Zone 93b315cf-c256-4ec8-bca9-4fafa73ffd14/?

@NicoJDE
Copy link
Contributor Author

NicoJDE commented Mar 18, 2025

thats the point 93b315cf-c256-4ec8-bca9-4fafa73ffd14 is the inovex.de. zone but the record should be created in the zone 937b6d5e-48dc-4405-8ccd-3885cff0d771 fra.ics.inovex.de.

@NicoJDE
Copy link
Contributor Author

NicoJDE commented Mar 18, 2025

The interesting point is that the error is no persistent. At the next reconciliation the record get created in the right zone.

@maxbischoff
Copy link
Member

maxbischoff commented Mar 18, 2025

I opened #37 to fix another issue I encountered with zone matching. I don't see how this issue would be fixed by it, though, especially since your error is not always occuring. I did add a test for your case, which was successful.

@NicoJDE
Copy link
Contributor Author

NicoJDE commented Mar 21, 2025

The fix in #37 dont fix my issue. Today I upgraded to version 1.0.1 and i got

webhook time="2025-03-21T07:34:16Z" level=error msg="Failed to apply changes: Expected HTTP response code [201 202] when accessing [POST https://dns.fra.cloud.inovex.io/v2/zones/93b315cf-c256-4ec8-bca9-4fafa73ffd14/recordsets], but got 400 instead: {\"code\": 400, \"type\": \"invalid_recordset_location\", \"message\": \"RecordSet belongs in a child zone: fra.ics.inovex.de.\", \"request_id\": \"req-d13694ca-7cb0-4d07-aa0a-783b87e959e4\"}"                                                                                                                            
external-dns time="2025-03-21T07:34:16Z" level=debug msg="Failed to apply changes with code 500"                                              
external-dns time="2025-03-21T07:34:16Z" level=error msg="Failed to do run once: soft error\nfailed to apply changes with code 500"  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants