Bug 593270 - Apache resource key not unique enough
Summary: Apache resource key not unique enough
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 3.0.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
: RHQ-690 673260 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-18 11:58 UTC by Lukas Krejci
Modified: 2018-11-14 15:02 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:24:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2010-05-18 11:58:27 UTC
Description of problem:

Currently, the Apache instance is assigned a resource key containing the full path to the httpd.conf file that the instance uses. I think this is not completely unique, because the ServerRoot (either defined by the -d commandline option or by the ServerRoot directive in the config file itself) contributes to the configuration.

The ServerRoot defines the root directory from which all the relative paths in the configuration file are resolved. This opens an opportunity for the admin to have one "master" httpd.conf that would delegate parts of the configuration to other included config files that would be referenced using relative paths.

The choice of ServerRoot location using the -d commandline param would then cause different files to be included in the "master" config and thus define a different final configuration of the apache server as a whole.

I think the Apache resource key should be composed from *both* the server root location *and* the location of the httpd.conf file.

How reproducible:
Always

Steps to Reproduce (as root):
1. mkdir -p /httpd-test/my-server-root1/conf; mkdir /httpd-test/my-server-root1/logs
2. mkdir -p /httpd-test/my-server-root2/conf; mkdir /httpd-test/my-server-root2/logs
3. cp /etc/httpd/conf/http.conf /httpd-test
4. remove all Listen directives from /httpd-test/httpd.conf (and remove all the VirtualHost directives and includes, etc. basically make the configuration as minimal as possible)
5. add "Include conf/listen.conf" to the beginning of httpd-test/httpd.conf
6. echo "Listen 80" > /httpd-test/my-server-root1/conf/listen.conf
7. echo "Listen 81" > /httpd-test/my-server-root2/conf/listen.conf
8. apachectl -d /httpd-test/my-server-root1 -f /httpd-test/httpd.conf
9. apachectl -d /httpd-test/my-server-root2 -f /httpd-test/httpd.conf

Actual results:
The two instances started using the steps above get the same resource key (and thus are considered one) even though one can be reached at port 80 and the other at port 81

Expected results:
Both instances should be identified.

Comment 1 Corey Welton 2010-09-24 12:31:48 UTC
 lukas - is this scope for resource upgrade work?

Comment 2 Lukas Krejci 2010-09-24 12:58:12 UTC
*** Bug 536328 has been marked as a duplicate of this bug. ***

Comment 3 Lukas Krejci 2010-09-24 13:00:17 UTC
technically no, practically yes.

This is waiting for resource upgrade to be in master so that this code doesn't break people's existing inventories when deployed. 

Basically this bug supersedes bug 536328 which I therefore closed as duplicate of this one.

Comment 4 Larry O'Leary 2011-01-28 15:22:24 UTC
*** Bug 673260 has been marked as a duplicate of this bug. ***

Comment 5 Sunil Kondkar 2011-06-27 09:09:36 UTC
Verified on build#158 (Version: 4.1.0-SNAPSHOT Build Number: c1539ab)

Followed the steps and verified that both Apache instances at port 80 and 81 are discovered.

Marking as verified.

Comment 6 Heiko W. Rupp 2013-09-02 07:24:38 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.