Bug 835312 - Apache httpd VirtualHost ServerName value should be used for resource's name in inventory
Summary: Apache httpd VirtualHost ServerName value should be used for resource's name ...
Status: ON_QA
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.2
Hardware: All
OS: All
medium vote
Target Milestone: ---
: RHQ 4.13
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
Depends On:
Blocks: 837449 1127874
TreeView+ depends on / blocked
Reported: 2012-06-25 23:36 UTC by Marc Shirley
Modified: 2018-01-30 17:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 837449 (view as bug list)
Last Closed:

Attachments (Terms of Use)

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:

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

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

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