Bug 600273
Summary: | Upgrade JON2.3.1 to JON2.4Beta0 gives exception in server log- "rhq_resource_type" violates foreign key constraint "rhq_resource_group_resource_type_id_fkey" on table "rhq_resource_group" | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Rajan Timaniya <rtimaniy> | ||||||||
Component: | Core Server | Assignee: | Ian Springer <ian.springer> | ||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Rajan Timaniya <rtimaniy> | ||||||||
Severity: | urgent | Docs Contact: | |||||||||
Priority: | urgent | ||||||||||
Version: | 3.0.0 | CC: | ccrouch, ian.springer | ||||||||
Target Milestone: | --- | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | 2.4 | Doc Type: | Bug Fix | ||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2010-08-12 16:47:02 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, 591531 | ||||||||||
Attachments: |
|
Description
Rajan Timaniya
2010-06-04 10:34:45 UTC
Test environment: OS - RHEL 5.4 JDK - SUN JDK 1.6.0_18-ea Database - Postgres 8.3 Groups details: 1) Created one compatible group and added resource 'JBoss AS 4.2.3.GA'. - Created alert for this group and alert condition is 'JVM Free Memory > 0.1B' 2) Created mix group and added resources to it, please refer attached screenshot (mix group screenshot) for added resources. 3) Created group definition and created dynagroup, please refer attached screeshot (group definition screenshot) Created attachment 421241 [details]
mix group screenshot
Created attachment 421242 [details]
group definiation screenshot
Commit 676d4d3c37a104b42d1a9c150f08e1222c7a3cfb fixes this by making the following changes to ResourceMetadataManagerBean.removeObsoleteTypesInNewTransaction(): 1) Obsolete Resource types are removed in reverse hierarchical order (that is, the leafs are removed first, followed by parents, followed by grandparents, etc.) 2) Any compatible groups with a member type of a type being removed are themselves removed. 3) If an exception occurs anywhere in the method, it is caught, an error is logged, and it is not rethrown. This prevents such an exception from causing the outer transaction (the call to registerPlugin()) from being rolled back, which would cause the entire metadata update to fail. Pushed to master. Verified on JON 2.4 Beta1 Steps 1) Install JON 2.3.1 with Oracle 10g (High Availability - 2 servers and 3 agents) 2) Perform operations on JON 2.3.1 (i) Create alerts for platform, JBoss AS4, RHQ Agent, Compatible group (alert condition is Free Memory > 0.1 OR Total Memory > 0.1) (ii) Create groups (Mix, Compatible, Group defination) (iii)Content repository syncronization (for JBoss Patch) (iv) Create Roles and Users (v) Change INVENTORY -> CONNECTION of JBoss AS4 (vi)Change configuration values of 'RHQ Agent' and create 'History' (vii)Perform LDAP settings (viii)Create 'SCHEDULES' for 'View Process List' on platform (ix) Enabled JBossAS events 3) Stop/Down all JON2.3.1 servers 4) Keep all agents running 5) Upgrade one server from JON2.3.1 to JON 2.4 Beta1 (with same database - Oracle 10g) 6) Please refer server log There is no error/exception observed with Oracle 10g: "rhq_resource_type" violates foreign key constraint "rhq_resource_group_resource_type_id_fkey" on table "rhq_resource_group" I will test this bug with Postgres database. Verified on JON 2.4 Beta1 Steps 1) Install JON 2.3.1 with Postgres 8.3/8.4 (High Availability - 2 servers and 2 agents) 2) Perform operations on JON 2.3.1 (i) Create alerts for platform, JBoss AS4, RHQ Agent, Compatible group (alert condition is Free Memory > 0.1 OR Total Memory > 0.1) (ii) Create groups (Mix, Compatible, Group defination) (iii)Content repository syncronization (for JBoss Patch) (iv) Create Roles and Users (v) Change INVENTORY -> CONNECTION of JBoss AS4 (vi)Change configuration values of 'RHQ Agent' and create 'History' (vii)Perform LDAP settings (viii)Create 'SCHEDULES' for 'View Process List' on platform (ix) Enabled JBossAS events 3) Stop/Down all JON2.3.1 servers 4) Keep all agents running 5) Upgrade one server from JON2.3.1 to JON 2.4 Beta1 (with same database - Postgres 8.3/8.4) 6) Please refer server log There is no error/exception observed with Postgres 8.3/8.4: "rhq_resource_type" violates foreign key constraint "rhq_resource_group_resource_type_id_fkey" on table "rhq_resource_group" Mass-closure of verified bugs against JON. |