This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 536328 - (RHQ-690) Change apache resource key from baseDir of apache install to full path to httpd.conf
Change apache resource key from baseDir of apache install to full path to htt...
Status: CLOSED DUPLICATE of bug 593270
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
1.0.1
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: Lukas Krejci
Corey Welton
http://jira.rhq-project.org/browse/RH...
: Improvement
Depends On: RHQ-662 592038
Blocks: 619556
  Show dependency treegraph
 
Reported: 2008-07-18 18:38 EDT by Charles Crouch
Modified: 2015-02-01 18:25 EST (History)
3 users (show)

See Also:
Fixed In Version: 1.4
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-24 08:58:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Charles Crouch 2008-07-18 18:38:00 EDT
Discussion:

http://forums.rhq-project.org/viewtopic.php?f=5&t=62
Comment 1 Charles Crouch 2008-07-24 15:09:29 EDT
Example workaround:

1) Create unique symlinks to the base of the apache install for each apache instance e.g.
ln -s /apache2 /apache2-lxdapg04
ln -s /apache2 /apache2-lxdapg05
...

These links need to be unique on the machine, but not globally unique.

2) Start apache with the -d parameter pointing to these symlinks e.g.

/apache2/bin/httpd -k start -d /apache2-lxdapg04 -f /usr/local/apache2/conf/lxdapg04.conf -DSSL
/apache2/bin/httpd -k start -d /apache2-lxdapg05 -f /usr/local/apache2/conf/lxdapg05.conf -DSSL 
Comment 2 Charles Crouch 2008-07-24 15:10:02 EDT
Dropping to minor since a workaround is available
Comment 3 Greg Hinkle 2008-07-29 22:17:05 EDT
Future release
Comment 4 Ian Springer 2009-09-28 19:12:01 EDT
Fixed in trunk (r5221) and 1.1.0.GA CP branch (r5220).

Note, since this changes the Resource key, if users upgrade from an earlier version of the Apache plugin and already have Apache servers in inventory, a second set of Apache servers (with the new resource keys) will get discovered, and they will end up with two resources per Apache server in inventory. Ideally, they should uninventory the old set of Apache server resources. However, if they want to keep those around for the sake of the metric/operation/etc. history, then it is recommended that they effectively disable avail and metric collection on the resources by setting the snmp IP and or snmp Port connection properties to invalid values and unsetting the url connection property.


Comment 5 Ian Springer 2009-09-28 23:33:15 EDT
See also: support case 282455.
Comment 6 Ian Springer 2009-09-29 18:07:19 EDT
I made a mistake when I merged the fix into the 1.1.0 CP branch - r5227 corrects that.
Comment 7 Red Hat Bugzilla 2009-11-10 16:14:50 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-690
Comment 8 Ian Springer 2010-03-26 11:29:40 EDT
To test this feature:

1) Install Apache 2.x
2) Start up two instances from this same install using something like the following:

cd /opt/apache2

cp -pR conf conf2
# NOTE: ideally, also modify the two confs to point at different docroots, logfiles, etc. to tell them apart during testing

# start first instance...
bin/httpd -k start -d conf -f conf/httpd.conf 

# start second instance
bin/httpd -k start -d conf2 -f conf2/httpd.conf 

3) Run a full discovery scan from JON Agent and verify that two Apache Servers are discovered - one for each of the two instances you started above. Make sure that the conn props for both Apache servers look correct.
Comment 9 Corey Welton 2010-03-29 10:42:53 EDT
Ian, I am not sure this is working correctly... on linux anyway, it looks like it is naming the location relative to the agent root.

On a linux box, I created a second conf directory ("conf2") and started up the second httpd server using:

/usr/sbin/httpd -k start -d conf2 -f httpd.conf 

After installing agent on box, discovery was showing me this:


/etc/httpd/conf/httpd.conf  	 /etc/httpd/conf/httpd.conf  	NEW
/root/rhq-agent/conf2/httpd.conf 	/root/rhq-agent/conf2/httpd.conf NEW
Comment 10 Ian Springer 2010-03-29 11:40:00 EDT
Git commit 237ee88dbecd6809cefea82865bbe0b1d3b5582d fixes getServerRoot() so that if server root from httpd command line is a relative path, it will be resolved relative to the httpd process's cwd, not the cwd of the Agent process.

NOTE: There was a mistake in my original test steps. Please use the following steps instead:

1) Install Apache 2.x
2) Start up two instances from this same install using something like the
following:

cd /opt/apache2

cp -pR conf conf2
# NOTE: ideally, also modify the two confs to point at different docroots,
logfiles, etc. to tell them apart during testing

# start first instance...
bin/httpd -k start -d . -f conf/httpd.conf 

# start second instance
bin/httpd -k start -d . -f conf2/httpd.conf 

3) Run a full discovery scan from JON Agent and verify that two Apache Servers
are discovered - one for each of the two instances you started above. Make sure
that the conn props for both Apache servers look correct.    


Another scenario to test is not explicitly specifying the server root via -d, i.e. modify step 2 above with:

2b) 

# start first instance...
bin/httpd -k start -f conf/httpd.conf 

# start second instance
bin/httpd -k start -f conf2/httpd.conf
Comment 11 Corey Welton 2010-04-07 08:47:30 EDT
QA Verified, the paths to httpd.conf are now appropriately indicated.
Comment 12 Lukas Krejci 2010-07-13 11:41:04 EDT
I am reopening this because of bug 612189.
Comment 13 Corey Welton 2010-09-13 15:59:35 EDT
lukas: is this still relevant, if so what needs to be done/how long will it take?
Comment 14 Lukas Krejci 2010-09-14 03:41:28 EDT
this is still relevant, depends on bug 592038, which is still open.

The code is nearly finished, we only need to iron out one corner case issue and the UI.
Comment 15 Lukas Krejci 2010-09-24 08:58:12 EDT
Closing this in favour of bug 593270 that further specializes how the apache resource key should look like.

*** This bug has been marked as a duplicate of bug 593270 ***

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