Bug 1284086 - atomic-openshift-installer crashes on non-ascii hostname input
atomic-openshift-installer crashes on non-ascii hostname input
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Samuel Munilla
Ma xiaoqiang
Depends On:
  Show dependency treegraph
Reported: 2015-11-20 14:21 EST by Evgheni Dereveanchin
Modified: 2016-07-03 20:46 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-29 15:58:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Evgheni Dereveanchin 2015-11-20 14:21:15 EST
Description of problem:
When installing, if a non-ascii text is sent as hostname during Host Configuration, the installer will crash.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. atomic-openshift-installer install
2. press Y
3. press Enter
4. enter a non-ascii symbol (Ж)

Actual results:

Enter hostname or IP address: []: env1-ose3-masterювуьщюдфт
Traceback (most recent call last):
  File "/usr/bin/atomic-openshift-installer", line 9, in <module>
    load_entry_point('ooinstall==3.0.0', 'console_scripts', 'oo-install')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 542, in install
    oo_cfg = get_missing_info_from_user(oo_cfg)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 294, in get_missing_info_from_user
    oo_cfg.hosts = collect_hosts()
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 108, in collect_hosts
  File "/usr/lib/python2.7/site-packages/click/termui.py", line 89, in prompt
    result = value_proc(value)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 37, in validate_prompt_hostname
    'and re-enter it.'.format(hostname))
  File "/usr/lib/python2.7/site-packages/click/exceptions.py", line 71, in __init__
    UsageError.__init__(self, message, ctx)
  File "/usr/lib/python2.7/site-packages/click/exceptions.py", line 38, in __init__
    ClickException.__init__(self, message)
  File "/usr/lib/python2.7/site-packages/click/exceptions.py", line 14, in __init__
    message = message.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 17: ordinal not in range(128)

Expected results:

Enter hostname or IP address: []: env1-ose3-masterювуьщюдфт
Error: invalid input
Comment 1 Samuel Munilla 2016-01-12 14:31:09 EST
Should be fixed by https://github.com/openshift/openshift-ansible/pull/1172
Comment 2 Gan Huang 2016-01-25 23:05:26 EST
Verfied with atomic-openshift-utils-3.0.35-1.git.0.6a386dd.el7aos.noarch

Actual results:

Enter hostname or IP address: Ж
Error: Invalid hostname. Please double-check this value and re-enter it.
Enter hostname or IP address:

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