Skip to content

Conversation

@rjeffman
Copy link
Member

@rjeffman rjeffman commented Aug 26, 2025

Adding an A/AAAA record to a host fails if there's not a reverse zone set that the resulting PTR record can be added to, even if create_reverse is false.

Changing the rule to create the reverse record fixes the issue.

Fixes: #1381

Summary by Sourcery

Allow adding A/AAAA records without requiring a reverse zone when create_reverse is false and fix reverse record handling.

Bug Fixes:

  • Resolve failure adding A/AAAA record if no reverse zone exists when create_reverse is set to false.

Enhancements:

  • Only generate and clean up reverse PTR commands when the create_reverse flag is truthy and always remove the extra_create_reverse argument.

Tests:

  • Add tests to verify adding an A record without PTR record in an unmanaged subnet is both successful and idempotent.
  • Update DNS test environment to include an alternate IPv4 address and remove unused IPv6 reverse zone variables.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rjeffman rjeffman requested a review from t-woerner August 27, 2025 00:30
@rjeffman rjeffman added the Candidate Good candidate for next minor release. label Aug 29, 2025
@rjeffman rjeffman force-pushed the ipadnsrecord_a_rec_create_reverse branch from 672ce06 to 1b4ddb1 Compare September 8, 2025 14:57
@rjeffman
Copy link
Member Author

rjeffman commented Sep 8, 2025

Test failure is due to broken FreeIPA deployment on Fedora Rawhide.

@rjeffman rjeffman force-pushed the ipadnsrecord_a_rec_create_reverse branch from 1b4ddb1 to dd39c47 Compare September 22, 2025 12:46
@rjeffman rjeffman requested a review from t-woerner October 17, 2025 17:55
Adding an A/AAAA record to a host fails if there's not a reverse zone
set that the resulting PTR record can be added to, even if
create_reverse is false.

Changing the rule to create the reverse record fixes the issue.

Fixes: freeipa#1381

Signed-off-by: Rafael Guterres Jeffman <[email protected]>
@rjeffman rjeffman force-pushed the ipadnsrecord_a_rec_create_reverse branch from dd39c47 to 763418e Compare November 11, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Candidate Good candidate for next minor release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipadnsrecord fails to add IP adderess without reverse zone, even with create_reverse == false

2 participants