Bug 591840

Summary: JON shows two entries for resources after upgrade JON 2.3.1 to JON 2.4
Product: [Other] RHQ Project Reporter: Rajan Timaniya <rtimaniy>
Component: Core ServerAssignee: Lukas Krejci <lkrejci>
Status: CLOSED NOTABUG QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: high    
Version: 3.0.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-14 15:26:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 565628    
Attachments:
Description Flags
screenshot
none
screenshot none

Description Rajan Timaniya 2010-05-13 10:50:16 UTC
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 18:11:39 UTC
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 12:52:44 UTC
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 12:54:16 UTC
Created attachment 414043 [details]
screenshot

Comment 4 Lukas Krejci 2010-05-14 15:26:20 UTC
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