Red Hat Bugzilla – Bug 789065
rhq_resource_type_parents not updated in updated plugin deployment.
Last modified: 2012-02-13 13:47:06 EST
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.
per triage 2/13/2012 (asantos, crouch, foley, loleary)
The work-around is to purge the old plugin from the system.