You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the library (or possibly the PDNS API) correctly interprets "test" to mean "test.example.org", it causes a "DNS Record is not canonical" error to be returned:
fatal: [nicola.noflag.org.uk]: FAILED! => {"changed": false, "failed": true, "msg": "Could not create record test..noflag.org.uk: HTTP 422: DNS Name 'test.example.org' is not canonical"}
This exact error occurs when the domain record is both "test" and "test.example.org", the returned string is identical in both cases (!!)
The only reference to this error is here where they suggest adding a dot and it looks from the source code here (line 412) that its tripping a function which expects the domain record to end in a "." as well. When I submitted the domain record as "test.example.org." instead of "test", the library worked more or less as expected.
I believe the documentation should be updated to reflect this --- will submit a patch in the morning.
This also effects zones with an error like {"msg": "Could not create zone example.org: HTTP 422: https://ns0.noflag.org.uk:443/api/v1/servers/localhost/zones: DNS Name 'example.org' is not canonical", "failed": true, "invocation": {"module_args": {"pdns_port": 443, "pdns_api_key": "xxx", "kind": "master", "name": "example.org", "nameservers": ["ns2.noflag.org.uk.", "n1.noflag.org.uk."], "masters": null, "pdns_host": "ns0.noflag.org.uk", "state": "present", "pdns_prot": "https", "server": "localhost"}}}
And nameservers with an error like {"msg": "Could not create zone example.org.: HTTP 422: https://ns0.noflag.org.uk:443/api/v1/servers/localhost/zones: Nameserver is not canonical: 'ns2.noflag.org.uk'", "failed": true, "invocation": {"module_args": {"pdns_port": 443, "pdns_api_key": "xxx", "kind": "master", "name": "example.org.", "nameservers": ["ns2.noflag.org.uk", "n1.noflag.org.uk"], "masters": null, "pdns_host": "ns0.noflag.org.uk", "state": "present", "pdns_prot": "https", "server": "localhost"}}}
It would perhaps be best to have the library itself check for the presence or absence of a dot at the end of the string for zones, records and nameservers.
The text was updated successfully, but these errors were encountered:
dm-coding
pushed a commit
to dm-coding/ansible-module-powerdns
that referenced
this issue
Dec 23, 2017
Although the library (or possibly the PDNS API) correctly interprets "test" to mean "test.example.org", it causes a "DNS Record is not canonical" error to be returned:
fatal: [nicola.noflag.org.uk]: FAILED! => {"changed": false, "failed": true, "msg": "Could not create record test..noflag.org.uk: HTTP 422: DNS Name 'test.example.org' is not canonical"}
This exact error occurs when the domain record is both "test" and "test.example.org", the returned string is identical in both cases (!!)
The only reference to this error is here where they suggest adding a dot and it looks from the source code here (line 412) that its tripping a function which expects the domain record to end in a "." as well. When I submitted the domain record as "test.example.org." instead of "test", the library worked more or less as expected.
I believe the documentation should be updated to reflect this --- will submit a patch in the morning.
`Ensure A record
name: host01.internal.example.com.
zone: zone01.internal.example.com
type: A
content: 192.168.1.234
ttl: 1440
pdns_host: powerdns.example.com
pdns_port: 8081
pdns_api_key: topsecret`
This also effects zones with an error like
{"msg": "Could not create zone example.org: HTTP 422: https://ns0.noflag.org.uk:443/api/v1/servers/localhost/zones: DNS Name 'example.org' is not canonical", "failed": true, "invocation": {"module_args": {"pdns_port": 443, "pdns_api_key": "xxx", "kind": "master", "name": "example.org", "nameservers": ["ns2.noflag.org.uk.", "n1.noflag.org.uk."], "masters": null, "pdns_host": "ns0.noflag.org.uk", "state": "present", "pdns_prot": "https", "server": "localhost"}}}
And nameservers with an error like
{"msg": "Could not create zone example.org.: HTTP 422: https://ns0.noflag.org.uk:443/api/v1/servers/localhost/zones: Nameserver is not canonical: 'ns2.noflag.org.uk'", "failed": true, "invocation": {"module_args": {"pdns_port": 443, "pdns_api_key": "xxx", "kind": "master", "name": "example.org.", "nameservers": ["ns2.noflag.org.uk", "n1.noflag.org.uk"], "masters": null, "pdns_host": "ns0.noflag.org.uk", "state": "present", "pdns_prot": "https", "server": "localhost"}}}
It would perhaps be best to have the library itself check for the presence or absence of a dot at the end of the string for zones, records and nameservers.
The text was updated successfully, but these errors were encountered: