Bug 501780 - Luci invalidates some "system hostnames" that are valid
Luci invalidates some "system hostnames" that are valid
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: conga (Show other bugs)
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Ryan McCabe
Cluster QE
: ZStream
Depends On:
Blocks: 580200 580201 580202
  Show dependency treegraph
Reported: 2009-05-20 13:09 EDT by Shane Bradley
Modified: 2016-04-26 09:27 EDT (History)
8 users (show)

See Also:
Fixed In Version: conga-0.12.2-15.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-01-13 17:26:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix bug (379 bytes, application/octet-stream)
2010-07-02 11:32 EDT, Ryan McCabe
no flags Details
new patch with additional fix (551 bytes, patch)
2010-09-01 02:11 EDT, Ryan McCabe
no flags Details | Diff

  None (edit)
Description Shane Bradley 2009-05-20 13:09:05 EDT
Description of problem:                                                                                                                                                            
Luci will invalidate some "System Hostnames". There are two known cases that I am aware of:                                                                                        
Both of these issues occur in  conga-0.12.2/luci/plone-custom/conga.js                                                                                                             
1) Using non-fqdns(however hostname is in /etc/hosts on all nodes)                                                                                                                 
 will yield the error, as in with hostname "rh5node1":                                                                                                                             
"rh5node1" is not a valid hostname: Hostnames must be fully qualified.                                                                                                             
 if (i.length === 1) {                                                                                                                                                             
               if (iponly) {                                                                                                                                                       
                       return ('You must enter an IP address in quad-dot notation.');                                                                                              
               } else {                                                                                                                                                            
                       return ('Hostnames must be fully qualified.');                                                                                                              
2) Using TLD that is incorrect detect as IP "glycine.0efg" will error:                                                                                                             
  "glycine.0efg" is not a valid hostname: Invalid IP address.                                                                                                                      
  if (!isNaN(parseInt(i[i.length - 1], 10))) {                                                                                                                                     
              return ('Invalid IP address.');                                                                                                                                      
Now, one solution would be script around these conditions or "System                                                                                                               
Hostname" checking can be completely removed in the javascript.                                                                                                                    
Version-Release number of selected component (if applicable):                                                                                                                      
How reproducible:                                                                                                                                                                  
Steps to Reproduce:                                                                                                                                                                
1.Add existing cluster to luci                                                                                                                                                     
2.Enter System hostname as example above                                                                                                                                           
Actual results:                                                                                                                                                                    
Errors are returned as stated above                                                                                                                                                
Expected results:                                                                                                                                                                  
System Hostname should be accepted and submit should not error out.                                                                                                                
Additional info:
Comment 3 Chris Ward 2010-02-11 05:16:19 EST
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.
Comment 7 Issue Tracker 2010-02-23 09:20:22 EST
Event posted on 02-23-2010 09:20am EST by akunysz

Repro steps assuming a pristine RHEL 5 system registered to the
server-cluster channel (no need for custom DNS, resolv.conf or cluster
# yum install luci
# luci_admin init
[set password to "quux" or whatever]
# service luci start

From an host that has a web browser (possibly the same host that is
running luci but another is fine):
go to https://$HOSTNAME:8084/
log in the web interface as "admin" and the password you defined earlier
click "Add a System"
enter "foo.bar" in the "System Hostname" field
enter "foobar" in the "Root Password" field
click "Submit"

A message box saying "Do you really want to add the following Storage
Systems: foo.bar" should appear. This is expected.
click "cancel"

Replace "foo.bar" in the "System Hostname" field with "foo.0efg".
Click on "Submit".

A message box saying "The following errors were found: "foo.0efg" is
not a valid hostname: Invalid IP Address." should appear. That's the

This event sent from IssueTracker by akunysz 
 issue 289144
Comment 8 Issue Tracker 2010-02-23 09:32:55 EST
Event posted on 02-23-2010 09:32am EST by akunysz

I confirm the bug is still present in luci-0.12.2-10.el5.

This event sent from IssueTracker by akunysz 
 issue 289144
Comment 26 Ryan McCabe 2010-07-02 11:32:52 EDT
Created attachment 429101 [details]
Patch to fix bug
Comment 32 Ryan McCabe 2010-09-01 02:11:44 EDT
Created attachment 442336 [details]
new patch with additional fix
Comment 36 errata-xmlrpc 2011-01-13 17:26:26 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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