Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1369027

Summary: ipa-client-install should handle keyboard interrupt gracefully rather than throwing traceback.
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED WONTFIX QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: pasik, pvoborni, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-18 22:22:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sudhir Menon 2016-08-22 11:08:49 UTC
Description of problem: ipa-replica-install should handle keyboard interrupt gracefiully rather than throwing traceback.


Version-Release number of selected component (if applicable):
ipa-server-4.4.0-8.el7.x86_64

How reproducible: Always


Steps to Reproduce:
1. Install ipa-server.
2. Install replica server using the command

#ipa-replica-install -P admin -w Secret123

3. Try to do a Ctrl+C before the command is sucessfully completed.

Actual results: Traceback is thrown on the console.
    [root@replica ~]# ipa-replica-install
    Configuring client side components
    One of password / principal / keytab is required.
    Installation failed. Rolling back changes.
    IPA client is not configured on this system.
Removing client side components
^CTraceback (most recent call last):
File "/usr/sbin/ipa-client-install", line 43, in <module>
from ipaclient import ipadiscovery
File "/usr/lib/python2.7/site-packages/ipaclient/ipadiscovery.py", line 25, in <module>
from dns import resolver, rdatatype
File "/usr/lib/python2.7/site-packages/dns/resolver.py", line 35, in <module>
import dns.message
File "/usr/lib/python2.7/site-packages/dns/message.py", line 27, in <module>
import dns.name
File "/usr/lib/python2.7/site-packages/dns/name.py", line 30, in <module>
import encodings.idna
File "/usr/lib64/python2.7/encodings/idna.py", line 7, in <module>
dots = re.compile(u"[\u002E\u3002\uFF0E\uFF61]")
File "/usr/lib64/python2.7/re.py", line 190, in compile
return _compile(pattern, flags)
File "/usr/lib64/python2.7/re.py", line 240, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib64/python2.7/sre_compile.py", line 505, in compile
code = _code(p, flags)
File "/usr/lib64/python2.7/sre_compile.py", line 490, in _code
_compile(code, p.data, flags)
File "/usr/lib64/python2.7/sre_compile.py", line 58, in _compile
_compile_charset(av, flags, code, fixup)
File "/usr/lib64/python2.7/sre_compile.py", line 184, in _compile_charset
for op, av in _optimize_charset(charset, fixup):
File "/usr/lib64/python2.7/sre_compile.py", line 227, in _optimize_charset
return _optimize_unicode(charset, fixup)
File "/usr/lib64/python2.7/sre_compile.py", line 307, in _optimize_unicode
charmap = [0]*65536
KeyboardInterrupt
ipa.ipapython.install.cli.install_tool(Replica): ERROR    The ipa-replica-install command failed. See /var/log/ipareplica-install.log for more information

Expected results: Handle keyboard interrupt for the command.

Additional info:

Comment 2 Martin Bašti 2016-08-31 13:22:44 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6281

Comment 3 Petr Vobornik 2017-04-06 16:06:04 UTC
IdM team doesn't have capacity to fix this bug for RHEL 7.4. Moving to next RHEL version. Fixing the bug there will depend on capacity of FreeIPA upstream. Without sufficient  justification there is a chance that it will be moved again later.

Comment 6 Rob Crittenden 2019-02-12 17:44:52 UTC
For the record, the failure is in ipa-client-install and is easily reproduced by running ipa-client-install -U and quickly hitting ^C.

Comment 7 Rob Crittenden 2019-02-18 22:22:03 UTC
So I looked again. Basically we'd have to wrap the entire thing, imports and all, in a try/except KeyboardInterrupt to capture every possible catchable interrupt. IMHO it's not worth it. This is a rare event.