Skip to content
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

ipadnsrecord: create_reverse PTR record value missing trailing dot #1150

Open
crt0r opened this issue Oct 5, 2023 · 1 comment
Open

ipadnsrecord: create_reverse PTR record value missing trailing dot #1150

crt0r opened this issue Oct 5, 2023 · 1 comment
Labels

Comments

@crt0r
Copy link

crt0r commented Oct 5, 2023

Hello!

During a test deployment of FreeIPA for research purposes, our team discovered weird behavior that looks like a potential bug, but we're not sure.

When it was discovered?

While creating an A record for a client machine before enrollment. The create_reverse variable was set to true.

Screenshot 2023-10-05 101947

What it produced?

A PTR record was created in a reverse zone of our domain. It lacks a trailing dot.
Screenshot 2023-10-05 101917_p

What this causes?

When someone tries to resolve an address to a DNS name, they get a malformed response. The IP address is resolved to a domain name combined with the reverse zone name.
Screenshot 2023-10-05 102710_p

Hence, Ansible's ansible_fqdn variable contains such a malformed fqdn.
Screenshot 2023-10-05 102906_p

Which, in its turn, causes the ipaclient role to fail the host enrollment process.
Screenshot 2023-10-05 111506_p

Thoughts

As per some old comment on serverfault, similar behavior happens when a PTR record value misses a trailing dot. https://serverfault.com/questions/1056739/why-is-the-reverse-zone-name-appended-to-the-returned-domain-names-in-reverse-dn#answer-1056752

I'm not a developer, just a Jr. DevOps engineer, but I searched a bit around the codebase of the ipadnsrecord module and it seems like there's a missing dot in a string template on this line.


Is this a bug indeed or we did something wrong? Thanks in advance =D

@rjeffman rjeffman added the bug label Oct 6, 2023
@rjeffman
Copy link
Member

rjeffman commented Oct 6, 2023

I'm having some issues in my test environment , but it seems that the issue also happens with FreeIPA CLI.

In any case I'm setting this as a bug. We may have to fix it on both sides.

As a workaround, ensure that the zone_name parameter ends with a dot ('.'), as in zone_name: example.com., as this fixed the issued for me.

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

No branches or pull requests

2 participants