Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2066

Enrollment agent - ipa-hcc register hangs in Ansible

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • hms-0.7
    • None
    • Identity Management
    • None
    • HMSIDM Sprint 29, HMSIDM Sprint 30
    • 2
    • None

      While I was working on end-to-end testing for ipa-hcc and idm-domains-backend (HMS-2038), I ran into an issue with the CI pipeline. It blocked and eventually timed out. It took me a while to figure out that the get-ipa-hcc-register.py script does not include the "--unattended" option, so the script was waiting for confirmation from the user. It turns out that the sys.stdin.isatty() check does not trigger under Ansible. The ssh connection of Ansible has stdin connected to a pseudo terminal interface.

      Can we do a better job in detecting automation tools like Ansible and Chef? Or at least have a timeout, so ipa-hcc registers exits with an error after 30 seconds or so? Python's input() doesn't have a timeout argument. We could emulated it with select() syscall or signal.alert() + custom signal handler.

      Related to: https://gitlab.cee.redhat.com/identity-management/idmocp/ipa-hcc/-/merge_requests/74

              cheimes@redhat.com Christian Heimes
              cheimes@redhat.com Christian Heimes
              Fraser Tweedale
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: