Bug 591840 - JON shows two entries for resources after upgrade JON 2.3.1 to JON 2.4
JON shows two entries for resources after upgrade JON 2.3.1 to JON 2.4
Status: CLOSED NOTABUG
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
3.0.0
All Linux
high Severity medium (vote)
: ---
: ---
Assigned To: Lukas Krejci
Corey Welton
:
Depends On:
Blocks: rhq_triage
  Show dependency treegraph
 
Reported: 2010-05-13 06:50 EDT by Rajan Timaniya
Modified: 2010-05-14 11:26 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-14 11:26:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot (154.34 KB, image/png)
2010-05-13 06:50 EDT, Rajan Timaniya
no flags Details
screenshot (116.95 KB, image/png)
2010-05-14 08:54 EDT, Rajan Timaniya
no flags Details

  None (edit)
Description Rajan Timaniya 2010-05-13 06:50:16 EDT
Created attachment 413711 [details]
screenshot

Description of problem:
JON shows two entries for some resources like Jboss As Server and Apache HTTP Server after upgrade. One is with old resource name and second with new resource name.

Version-Release number of selected component (if applicable):
JON build# 136 - Revision: 10615

How reproducible:
Always

Steps to Reproduce:
1) Install JON 2.3.1 and agent
2) Upgrade JON 2.3.1 to JON 2.4
3) Log in to upgraded JON 2.4
4) Click on 'Platform -> JbossAS', 'Platform -> Apache' and other resource(s)
  
Actual results:
JON shows two entries for some resources like Jboss As Server and Apache HTTP Server after upgrade. One is with old resource name and second with new resource name.

Expected results:
There should be single entry for single resource (platform/server/service/group). 

Additional info:
Please refer attached screenshot.
Comment 1 Lukas Krejci 2010-05-13 14:11:39 EDT
The 2 RHQ servers appearing in the screenshot are probably caused by the original JON 2.3.1 being installed in the different location than JON 2.4.0. During the upgrade the old resource isn't removed (by design we don't remove the resources that appear down) and the new one is then discovered.

I could not replicate that behaviour when the upgraded server was installed into the same location as the previous version (that way they get the same resource key and thus are considered the same in the server inventory).

For Apache, the reason for 2 servers appearing is that the format of the resource key has changed. I created bug 592038 for it.

To verify this duplicated RHQ server in the screenshot, could you please provide the resource keys of both resources (can be found on the inventory tab)?

What other resources do see this issue for?
Comment 2 Rajan Timaniya 2010-05-14 08:52:44 EDT
I have tested this with High Availability (test case: https://tcms.engineering.redhat.com/case/47937/?from_plan=2377), so its 2 RHQ servers. Both were upgrade from JON 2.3.1 to JON 2.4 (I haven't remove any resources during the upgrade).

Tested again without High Availability with following steps:
1) Install JON 2.3.1 on Postgres 8.3
2) Upgrade JON 2.3.2 to JON 2.4
3) Log in to upgraded JON 2.4
4) Click on 'Platform -> JbossAS', 'Platform -> Apache' and other resource(s)

This can be reproduced if we use different location during the upgrade.

The resource keys details are as given below:
JbossAS
1) rajanlaptop RHQ Server, JBoss AS 4.2.3.GA default (0.0.0.0:2099)
Resource Key: /NotBackedUp/install/jon2.3.1_post/jon-server-2.3.1.GA/jbossas/server/default

2) rajanlaptop RHQ Server
Resource Key: /NotBackedUp/install/jon147/jon-server-2.4.0-SNAPSHOT/jbossas/server/default

There is different resource key, but resource name is like one name has old naming convention and other has new.

Please let me know if you need any other information.
Comment 3 Rajan Timaniya 2010-05-14 08:54:16 EDT
Created attachment 414043 [details]
screenshot
Comment 4 Lukas Krejci 2010-05-14 11:26:20 EDT
The situation with RHQ servers is expected. As you said, you haven't removed any resources before the upgrade. So, when the server was upgraded, there was a RHQ server located at "/NotBackedUp/install/jon2.3.1_post/jon-server-2.3.1.GA/jbossas/server/default" already present in the inventory. But the agent found it down, because, understandably, it is not running, because you've started the new RHQ server in the new location. The agent finds that new RHQ server and reports it in the discovery results. You import it from the server GUI and suddenly you have two RHQ servers in the inventory. That is expected and works as designed. The agent itself doesn't know that the second server was meant to upgrade the first one.

Now the situation with Apache servers is different and as I said before it requires more attention. But that work should be tracked in bug 592038.

I will close this bug, because the duplicate RHQ servers are expected (if using different locations for jon231 and jon240 as you said you did) and the apache problem is tracked in a standalone bugzilla.

If you find another resources that are duplicated after the upgrade, please create new bugreports for them as the solution will possibly vary on case by case basis.

Thanks,

Lukas

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