+++ This bug was initially created as a clone of upstream RHQ Bug #835312 +++
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):
Steps to Reproduce:
1. Add virtual host section to httpd.conf with unresolvable ServerName value:
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
Resource name is the local machine's hostname or IP address in format "hostname:8080"
Resource name should be referencing the value of the ServerName directive of the virtual host configuration. For example, "myunresolvablehost:8080".
This is a usability issue that makes it difficult to identify a virtual host in the resource list as we do not retain the virtual host name as the resource name in the even the virtual host name is not resolvable. Apache does not require the server name to be resolvable as it is a "virtual" name and not a "logical" name.
The fix for this should be relatively easy with no impact.
As per 8/20 triage 8/20 pushing to JON312
Fixed in the master. This change does not touch the resourceKey format, only resourceName.
Author: burmanm <firstname.lastname@example.org>
Date: Tue Aug 5 21:17:47 2014 +0300
[BZ 837449] Change behaviour of apache plugin to select ServerName + VirtualHost combination as first priority for resourceName and fall back to server
commit to release/jon3.2.x : bb173ddb263775f7c4dd3abf91ffa2559d425ea6
Moving to ON_QA as this is available for test in JON 3.2.3 ER01 build:
Tested on Version : 3.2.0.GA Update 03 Build Number :bca1bc8:e19c43d
Added below virtual host entry to httpd.conf with unresolvable ServerName value:
- Started httpd instance
- After discovery navigated to httpd's virtual host children
- Observed that he newly added virtual host resource name has the format "<hostname>:8080"
Please refer the attached screenshot.
Created attachment 928313 [details]
This issue was fixed and released in JWS management plug-in for JBoss ON 3.3 per BZ-1127874. Please upgrade to JBoss ON 3.3 to receive this fix.