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 1359221

Summary: katello-installer --katello-proxy-url fails due to '_' in the fqdn in proxy server name
Product: Red Hat Satellite 6 Reporter: Josh Foots <jfoots>
Component: InstallerAssignee: Chris Roberts <chrobert>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.9CC: bbuckingham, chrobert, stbenjam, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-07 15:38:22 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: 1360471    

Description Josh Foots 2016-07-22 14:23:06 UTC
Description of problem:
katello-installer --katello-proxy-url <servername> --katello-proxy-port 8020

fails when there are special characters in the FQDN of the proxy

the problem is the URI module cannot parse the underscore in the proxy's FQDN 

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

How reproducible:


Steps to Reproduce:
1. run the katello-installer --katello-proxy-url with an underscore in the address

Actual results:
katello-installer --katello-proxy-url <servername> --katello-proxy-port 8020
/usr/share/ruby/uri/generic.rb:214:in `initialize': the scheme https does not accept registry part: (or bad hostname?) (URI::InvalidURIError)
        from /usr/share/ruby/uri/http.rb:84:in `initialize'
        from /usr/share/ruby/uri/common.rb:214:in `new'
        from /usr/share/ruby/uri/common.rb:214:in `parse'
        from /usr/share/ruby/uri/common.rb:747:in `parse'
        from /usr/share/ruby/uri/common.rb:996:in `URI'
        from /usr/share/katello-installer/hooks/pre_validations/11-check_proxy_url.rb:11:in `block (4 levels) in load'
        from /usr/share/gems/gems/kafo- `instance_eval'
        from /usr/share/gems/gems/kafo- `block (4 levels) in load'
        from /usr/share/gems/gems/kafo- `instance_exec'
        from /usr/share/gems/gems/kafo- `execute'
        from /usr/share/gems/gems/kafo- `block in execute'
        from /usr/share/gems/gems/kafo- `each'
        from /usr/share/gems/gems/kafo- `execute'
        from /usr/share/gems/gems/kafo- `execute'
        from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
        from /usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
        from /usr/share/gems/gems/kafo- `run'
        from /usr/sbin/katello-installer:46:in `<main>'

Expected results:

For the URI to correctly process the special characters.

Additional info:

Comment 1 Chris Roberts 2016-07-22 15:55:43 UTC

For the meantime we can do the following:


or we can comment out the installer check. Let me know if you need help with this.

- Chris

Comment 3 Stephen Benjamin 2016-08-01 18:41:38 UTC
There seems to be a good bit of misinformation out there about the dreaded underscore. As far as I can tell, _ is only valid in certain cases but this isn't one of them - "proxy_server" is part of the host name and the RFC's explicitly disallows underscore there. More info here -

Ruby URI module is handing this correctly I think. 

@Chris, Can we close this NOTABUG? I think the error message is helpful enough ("bad host name")

Comment 4 Chris Roberts 2016-09-07 15:38:22 UTC

I agree I have only see 1 case come in with this issue. Most customers are following the RFC guidelines. Also it looks that the case is closed attached to this bug so further supporting a close.

Closing this out as NOTABUG.

- Chris Roberts