Bug 789065

Summary: rhq_resource_type_parents not updated in updated plugin deployment.
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: Plugin ContainerAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.1CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elias Ross 2012-02-09 16:56:14 UTC
https://community.jboss.org/message/715595#715595

What I believe is going on:

    I deployed the old 'hadoop' plugin that comes with RHQ. When deployed, the server created resources in the database with some information indicating parent/child relationships. In the old plugin, NameNode (V1) belonged to "Hadoop" server. In the new plugin NameNode (V2) belongs to the platform.
    I deployed my new plugin that uses the same resource names, though not entirely, and in fact the same name of the plugin. Although the server and client get the new version of the code, the server thinks the resource hierarchy must not have changed. From its point of view NameNode V1 and V2 have the same child/parent relationships but this is not the case.
    RHQ maps new versions of resources to the old version assuming the name hasn't changed.

 

So the fix seems to be:

    When the server detects a new version of the plugin and the resource names are the same, check to see that the parent relationships are the same.
    ...update the parent/child relationship. If this is hard, then delete the old resource IDs.
    Or at least document a way to deal with this condition. I assume "purging" the plugin works here. I am about to check this.

I also note:

    When the new version of the plugin is deployed, the old resource_type is kept. In this case 'Hadoop' is kept.

Comment 1 Mike Foley 2012-02-13 16:59:38 UTC
per triage 2/13/2012 (asantos, crouch, foley, loleary)

Comment 2 Elias Ross 2012-02-13 18:47:06 UTC
The work-around is to purge the old plugin from the system.