Skip to content

Tests: gdm utils and topology updates for xidp#232

Open
spoore1 wants to merge 1 commit intoSSSD:masterfrom
spoore1:gdm_and_topo_fixes
Open

Tests: gdm utils and topology updates for xidp#232
spoore1 wants to merge 1 commit intoSSSD:masterfrom
spoore1:gdm_and_topo_fixes

Conversation

@spoore1
Copy link
Contributor

@spoore1 spoore1 commented Feb 16, 2026

With additional changes for the Passwordless GDM tests, the changes allow for better integration with default MHC configs with out pre-provisioning environments.

GDM topology controller now joins IPA domain during setup.

With additional changes for the Passwordless GDM tests, the changes
allow for better integration with default MHC configs with out
pre-provisioning environments.

GDM topology controller now joins IPA domain during setup.
@gemini-code-assist
Copy link

Summary of Changes

Hello @spoore1, 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 test framework for Passwordless GDM by improving its integration with default MHC configurations. It streamlines environment provisioning by automating IPA domain joining for the GDM topology controller during test setup. Additionally, it increases the resilience of GDM utility functions by adjusting error handling for text assertion commands, allowing for more graceful failure management.

Highlights

  • IPA Domain Joining: The GDM topology controller now automatically joins the IPA domain during its setup process, which includes removing existing Kerberos configurations and backing up IPA client files.
  • GDM Utility Robustness: The assert_text method in the GDM utilities has been updated to prevent command execution failures from raising exceptions, improving test stability.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • sssd_test_framework/topology_controllers.py
    • Added logic to enroll the client host into the IPA domain, including steps to remove old Kerberos configurations and backup IPA client files.
    • Ensured the realm join command is executed to integrate the client with the IPA domain.
    • Set the self.provisioned flag to True after the setup process completes.
  • sssd_test_framework/utils/gdm.py
    • Modified the assert_text method to include raise_on_error=False when executing commands, allowing the method to handle command failures gracefully without raising an exception.
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 enhances the GDM test topology by having the client join the IPA domain during setup, which is a logical addition for passwordless test scenarios. The fix in gdm.py to correctly handle command exit codes in assert_text is also a good improvement. I have one suggestion regarding code duplication in topology_controllers.py to enhance maintainability.

Comment on lines +293 to +304
self.logger.info(f"Enrolling {client.hostname} into {ipa.domain}")

# Remove any existing Kerberos configuration and keytab
client.fs.rm("/etc/krb5.conf")
client.fs.rm("/etc/krb5.keytab")

# Backup ipa-client-install files
client.fs.backup("/etc/ipa")
client.fs.backup("/var/lib/ipa-client")

# Join ipa domain
client.conn.exec(["realm", "join", ipa.domain], input=ipa.adminpw)

Choose a reason for hiding this comment

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

medium

This block of code for enrolling a client into an IPA domain appears to be duplicated from IPATopologyController.topology_setup and is also very similar to logic in IPATrustADTopologyController.topology_setup. To improve maintainability and reduce code duplication, consider extracting this logic into a shared helper method. Since all these controllers inherit from ProvisionedBackupTopologyController, a good approach would be to add a helper method to that base class and call it from the different topology_setup methods that require it.

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 this pull request may close these issues.

1 participant