Skip to content

Conversation

@madhuriupadhye
Copy link
Contributor

IPA trust tests fail with "Unable to read domain information" when IPA's DNS cannot resolve the AD domain.

Added setup_dns_forwarder() to IPATrustADTopologyController that: Creates a DNS forward zone for the AD domain
Resolves AD hostname to IP (required by ipa dnsforwardzone-add) Restarts named to apply the configuration

@gemini-code-assist
Copy link

Summary of Changes

Hello @madhuriupadhye, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the IPA-AD trust test setup by automating the configuration of DNS forwarding on the IPA server. Previously, trust tests could fail if the IPA's DNS was unable to resolve the Active Directory domain. The changes introduce a new utility method that ensures proper DNS resolution for the AD domain, making the trust establishment process more robust and reliable within the test framework.

Highlights

  • Automatic DNS Forwarder Setup: Introduced an automatic mechanism to configure a DNS forwarder on the IPA server for the trusted Active Directory (AD) domain. This ensures that IPA can correctly resolve AD domain names, which is crucial for establishing trust.
  • New setup_dns_forwarder Method: A new method, setup_dns_forwarder, has been added to IPATrustADTopologyController. This method handles the logic for creating the DNS forward zone, resolving the AD hostname to an IP address, and restarting the named service.
  • Improved Trust Test Reliability: By automatically configuring the DNS forwarder, the pull request addresses and resolves issues where IPA trust tests failed due to an inability to read AD domain information, thereby improving the reliability of these tests.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an automatic DNS forwarder setup for IPA-AD trust, which is a valuable addition to improve the reliability of trust tests. The implementation correctly identifies the need to configure DNS on the IPA server. I've found one potential issue with the error handling for DNS resolution of the AD host and provided a suggestion to make the implementation more robust and prevent hard-to-debug failures.

Copy link
Contributor

@jakub-vavra-cz jakub-vavra-cz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@thalman thalman left a comment

Choose a reason for hiding this comment

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

Looks good, ACK

IPA trust tests fail with "Unable to read domain information"
when IPA's DNS cannot resolve the AD domain.

Added setup_dns_forwarder() to IPATrustADTopologyController that:
Creates a DNS forward zone for the AD domain
Resolves AD hostname to IP (required by ipa dnsforwardzone-add)
Restarts named to apply the configuration

Signed-off-by: Madhuri Upadhye <mupadhye@redhat.com>
@madhuriupadhye madhuriupadhye merged commit 78f425a into SSSD:master Dec 8, 2025
6 checks passed
@danlavu
Copy link
Contributor

danlavu commented Dec 8, 2025

Hrmmm... I'm late to the party, we could replace most of this code with.

self.role.ipa.dns().add_forwarder(getattr(trusted.conn, "host", trusted.hostname))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants