Bug 902990

Summary: katello-configure fails if Organization name contains special characters - user cannot resume after failure
Product: [Retired] Subscription Asset Manager Reporter: sthirugn <sthirugn>
Component: katelloAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED WONTFIX QA Contact: SAM QE List <sam-qe-list>
Severity: high Docs Contact:
Priority: high    
Version: 1.3CC: jlyle, mmccune, sthirugn, tomckay
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-26 20:32:34 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 971511    

Description sthirugn@redhat.com 2013-01-22 21:23:34 UTC
Description of problem:
katello-configure fails if Organization name contains special characters (other space,'_','-')
Note: This Bug is being created in reference to https://bugzilla.redhat.com/show_bug.cgi?id=813291

Version-Release number of selected component (if applicable):
* candlepin-0.7.23-1.el6_3.noarch
* candlepin-tomcat6-0.7.23-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.1-12h.el6_3.noarch
* katello-cli-common-1.2.1-12h.el6_3.noarch
* katello-common-1.2.1-14h.el6_3.noarch
* katello-configure-1.2.3-2h.el6_3.noarch
* katello-glue-candlepin-1.2.1-14h.el6_3.noarch
* katello-headpin-1.2.1-14h.el6_3.noarch
* katello-headpin-all-1.2.1-14h.el6_3.noarch
* katello-selinux-1.2.1-2h.el6_3.noarch
* thumbslug-0.0.28-1.el6_3.noarch
* thumbslug-selinux-0.0.28-1.el6_3.noarch


How reproducible:
All Times


Steps to Reproduce:
1.# yum -y install katello-headpin-all
2.# katello-configure --deployment=sam --user-name='root' --user-pass='redhat' --org-name='Red Hat Czech, s. r. o.'

Starting Katello configuration
The top-level log file is [/var/log/katello/katello-configure-20130121-171651/main.log]
Creating Candlepin database user
############################################################ ... OK
Creating Katello database user
############################################################ ... OK
Creating Katello database
############################################################ ... OK
Initializing Katello data
##########################################################
  Failed, please check [/var/log/katello/katello-configure/db_seed.log]
  Report errors using # katello-debug tool.

Note: Log shows:
"Unable to create first org: Label is invalid;Label cannot contain characters other than ascii alpha numerals, '_', '-'. ;Name cannot contain characters other than alpha numerals, space,'_', '-'.


3. Attempt to use an Organization name with valid characters
# katello-configure --deployment=sam --user-name='root' --user-pass='redhat' --org-name='Red Hat Czech'

  Failed, please check [/var/log/katello/katello-configure/db_seed.log]
  Report errors using # katello-debug tool.

Note: This time log complaints that the user already exists


  
Actual results:
The user is stuck and katello-configure cannot resume even with a valid Organization name.



Expected results:
katello-configure should error out if the input parameters are invalid even before attempting to start the configuration
(or)
katello-configure should support an easy resume

Additional info:
As far as I know, I tried two workarounds for this issue and they worked:

WORKAROUND 1: (Do not use --user-name or --user-pass)
# katello-configure --deployment=sam --org-name='Red Hat Czech'
(Works fine - a new administrator user called 'admin' was also created.  I was able to log in both as 'root' or 'admin' user.  They both have administrator privileges)

WORKAROUND 2: (Using --reset-data=YES)
# katello-configure --reset-data=YES --deployment=sam --user-name='root' --user-pass='redhat' --org-name='Red Hat Czech'
(Works fine)

Comment 1 Tom McKay 2013-08-09 17:35:45 UTC
Confirmed this is still an issue. Work-around is to create a non-special org, then create the desired org name after configuration (or simply rename the created org with the desired name since the org label needs to be non-special chars anyway).

Comment 2 sthirugn@redhat.com 2014-06-27 20:59:04 UTC
This still exists in SAM 1.4

Comment 3 Bryan Kearney 2017-06-26 20:32:34 UTC
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!