Bug 550046 - httpd: new virtual host creation fails if Resource Name is string.
Summary: httpd: new virtual host creation fails if Resource Name is string.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Configuration
Version: 1.4
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Filip Drabek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-23 12:02 UTC by Sudhir D
Modified: 2013-09-02 07:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:17:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Sudhir D 2009-12-23 12:02:54 UTC
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 13:49:47 UTC
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 16:52:50 UTC
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 16:58:26 UTC
making sure we're not missing any bugs in rhq_triage

Comment 4 Filip Drabek 2010-11-18 08:16:17 UTC
commit 3b7d1a901f61e5bd87a7cbe9d9d0d1c9cd5e5222
- Resource name format for created virtual hosts is Address:Port.
- updated error messages

Comment 5 Lukas Krejci 2011-05-16 11:23:29 UTC
This was not present in master, so I merged it in:

commit 6b9629ab665e458076993e30b73c68a222937ad5
Author: Lukas Krejci <lkrejci>
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 12:02:36 UTC
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 07:17:02 UTC
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.