Bug 1064373 - [engine-setup] ascii check for ISO Domain name should be done immediately when defining domain name
Summary: [engine-setup] ascii check for ISO Domain name should be done immediately whe...
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.4.0
Assignee: Ofer Schreiber
QA Contact: Jiri Belka
Whiteboard: integration
Depends On:
Blocks: rhev3.4beta 1142926
TreeView+ depends on / blocked
Reported: 2014-02-12 13:48 UTC by Jiri Belka
Modified: 2014-09-18 12:24 UTC (History)
7 users (show)

Fixed In Version: av3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-06-12 14:04:56 UTC
oVirt Team: ---
Target Upstream Version:

Attachments (Terms of Use)
setup log (1.93 MB, text/x-log)
2014-02-12 13:48 UTC, Jiri Belka
no flags Details

System ID Priority Status Summary Last Updated
oVirt gerrit 24816 None None None Never
oVirt gerrit 25438 None None None Never

Description Jiri Belka 2014-02-12 13:48:26 UTC
Created attachment 862301 [details]
setup log

Description of problem:
ascii check for ISO Domain name should be done immediately when defining domain name.

I was able to define 'ČÍNA' as domain name for ISO domain during engine-setup.
Nothing informed me that this name is not valid but in the end of engine-setup ascii check was done and failed because of this name and engine-setup did roll-back.

I would expect this check would be done immediately in time of defining the name and not too late when whole setup fails and then rollbacks. It's "useless" lose of time...

2014-02-12 14:07:24 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND                 Local ISO domain name [ISO_DOMAIN]:
2014-02-12 14:07:36 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:RECEIVE    ČÍNA
2014-02-12 14:07:36 DEBUG otopi.context context.dumpEnvironment:441 ENVIRONMENT DUMP - BEGIN
2014-02-12 14:07:36 DEBUG otopi.context context.dumpEnvironment:456 ENV OVESETUP_CONFIG/isoDomainMountPoint=str:'/var/lib/exports/iso'
2014-02-12 14:07:36 DEBUG otopi.context context.dumpEnvironment:456 ENV OVESETUP_CONFIG/isoDomainName=str:'ČÍNA'
2014-02-12 14:09:11 DEBUG otopi.plugins.ovirt_engine_setup.config.iso_domain iso_domain._generate_md_content:67 Generating ISO Domain metadata
2014-02-12 14:09:11 DEBUG otopi.context context._executeMethod:137 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 127, in _executeMethod
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/config/iso_domain.py", line 395, in _add_iso_domain_to_db
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/config/iso_domain.py", line 228, in _prepare_new_domain
    content=self._generate_md_content(sdUUID, description),
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/config/iso_domain.py", line 78, in _generate_md_content
    checksum.update(''.join(lines).encode('ascii', 'xmlcharrefreplace'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 21: ordinal not in range(128)
2014-02-12 14:09:11 ERROR otopi.context context._executeMethod:146 Failed to execute stage 'Misc configuration': 'ascii' codec can't decode byte 0xc4 in position 21: ordinal not in range(128)

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

How reproducible:

Steps to Reproduce:
1. define ISO domain with non-ascii chars during engine-setup
2. see where it fails

Actual results:
fails too late, in the end of the whole setup

Expected results:
raise warning immediately to inform to define valid ascii name

Additional info:

Comment 1 Jiri Belka 2014-03-19 11:38:36 UTC
ok, av3.

          Local ISO domain ACL []: 
          Local ISO domain name [ISO_DOMAIN]: ČÍNA
[ ERROR ] Domain name can only consist of alphanumeric characters.
          Local ISO domain name [ISO_DOMAIN]:

Comment 2 Itamar Heim 2014-06-12 14:04:56 UTC
Closing as part of 3.4.0

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