Bug 1369027 - ipa-client-install should handle keyboard interrupt gracefully rather than throwing traceback.
Summary: ipa-client-install should handle keyboard interrupt gracefully rather than th...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Kaleem
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-22 11:08 UTC by Sudhir Menon
Modified: 2019-02-18 22:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-18 22:22:03 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.