Bug 550046 - httpd: new virtual host creation fails if Resource Name is string.
httpd: new virtual host creation fails if Resource Name is string.
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Configuration (Show other bugs)
1.4
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: Filip Drabek
: SubBug
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-23 07:02 EST by Sudhir D
Modified: 2013-09-02 03:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-02 03:17:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Sudhir D 2009-12-23 07:02:54 EST
Description of problem:
Creation of new virtual host for iManage httpd plugin fails if the "Resource Name" is given a string value.

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

How reproducible:
100%

Steps to Reproduce:
1. Install new iManage and embedded agent where httpd service is running.
2. Add the httpd service and click on Inventory tab.
3. Click on Create New Virtual Host.
4. Provide the Resource Name with any string like "test" and populate the document root which is a mandatory field. 
5. Save the changes.
  
Actual results:
Creation of new virtual host fails.

Expected results:
Creation of virtual host should pass with the resource name given.

Additional info:
The log snippet is below,

java.lang.NumberFormatException: For input string: "test"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:449)
	at java.lang.Integer.parseInt(Integer.java:499)
	at org.rhq.plugins.apache.util.HttpdAddressUtility.getVirtualHostSampleAddress(HttpdAddressUtility.java:132)
	at org.rhq.plugins.apache.ApacheServerComponent.createResource(ApacheServerComponent.java:361)
	at sun.reflect.GeneratedMethodAccessor2082.invoke(Unknown Source)
Comment 1 Sudhir D 2009-12-23 08:49:47 EST
Looks like the value that is entered in Resource Name field is getting set as the port number for that virtual host. If that is the case, the field name should be named correctly.
Comment 2 wes hayutin 2010-02-16 11:52:50 EST
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

keyword:
new = Tracking + FutureFeature + SubBug
Comment 3 wes hayutin 2010-02-16 11:58:26 EST
making sure we're not missing any bugs in rhq_triage
Comment 4 Filip Drabek 2010-11-18 03:16:17 EST
commit 3b7d1a901f61e5bd87a7cbe9d9d0d1c9cd5e5222
- Resource name format for created virtual hosts is Address:Port.
- updated error messages
Comment 5 Lukas Krejci 2011-05-16 07:23:29 EDT
This was not present in master, so I merged it in:

commit 6b9629ab665e458076993e30b73c68a222937ad5
Author: Lukas Krejci <lkrejci@redhat.com>
Date:   Mon May 16 13:10:48 2011 +0200

    BZ-550046 (httpd) new virtual host creation fails if Resource Name is string.
               - Resource name format for created virtual hosts is Address:Port.
               - updated error messages
Comment 6 Sunil Kondkar 2011-06-13 08:02:36 EDT
Verified on build#123 (Version: 4.1.0-SNAPSHOT Build Number: a6d2d56)

Tried to create a virtual host with providing resource name as as a string (Ex: test). This failed and the message center displayed the error message as "Wrong format of virtual host resource name. - Cause: java.lang.Exception:Wrong format of virtual host resource name. The right format is Address:Port."

Successfully created a virtual host with the Address:Port format (Ex: test:80).
Marking as verified.
Comment 7 Heiko W. Rupp 2013-09-02 03:17:02 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.

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