Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1064373

Summary: [engine-setup] ascii check for ISO Domain name should be done immediately when defining domain name
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engine-setupAssignee: Ofer Schreiber <oschreib>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, bazulay, gklein, iheim, Rhev-m-bugs, sbonazzo, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: av3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-12 14:04:56 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:
Bug Depends On:    
Bug Blocks: 1078909, 1142926    
Description Flags
setup log none

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/", line 127, in _executeMethod
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/config/", line 395, in _add_iso_domain_to_db
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/config/", 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/", 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