Bug 835312

Summary: Apache httpd VirtualHost ServerName value should be used for resource's name in inventory
Product: [Other] RHQ Project Reporter: Marc Shirley <mshirley>
Component: PluginsAssignee: Nobody <nobody>
Status: ON_QA --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2CC: hrupp, jshaughn, loleary
Target Milestone: ---   
Target Release: RHQ 4.13   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 837449 (view as bug list) Environment:
Last Closed: 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: 837449, 1127874    

Description Marc Shirley 2012-06-25 23:36:14 UTC
Description of problem:
When importing an Apache httpd virtual host which has a ServerName value which is not resolvable back to an interface on the local machine, the hostname or IP of the local machine is used instead of the ServerName value.  For an httpd instance with multiple virtual hosts with unresolvable ServerName values, this results in virtual host resources that are only identifiable by the port number in the resource name, or by manually inspecting each resource for the ServerName value recorded in the resource key.

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

How reproducible:
Very

Steps to Reproduce:
1. Add virtual host section to httpd.conf with unresolvable ServerName value:
Listen 8080
<VirtualHost *:8080>
        ServerName myunresolvablehost:8080
</VirtualHost>

2. Start httpd instance
3. Run discovery in agent to pick up "myunresolvablehost" ('discovery -f' if httpd instance is already in inventory
4. Navigate to httpd's virtual host children
5. Identify the newly added virtual host resource
  
Actual results:
Resource name is the local machine's hostname or IP address in format "hostname:8080"

Expected results:
Resource name should be referencing the value of the ServerName directive of the virtual host configuration.  For example, "myunresolvablehost:8080".

Comment 1 Jay Shaughnessy 2013-09-12 15:17:00 UTC
re-targeting for 4.10.  See lkrejci's comments in Bug 837449.

Comment 2 Heiko W. Rupp 2014-03-11 14:52:20 UTC
Pushing to 4.11

Comment 3 Heiko W. Rupp 2014-05-08 14:42:39 UTC
Bump the target version now that 4.11 is out.

Comment 4 Lukas Krejci 2014-10-31 09:07:34 UTC
Fixed by BZ 837449