Bug 1211407
Summary: | Agent plug-in deletion fails if resource group or auto-group operation was used | ||
---|---|---|---|
Product: | [JBoss] JBoss Operations Network | Reporter: | Larry O'Leary <loleary> |
Component: | Inventory | Assignee: | Libor Zoubek <lzoubek> |
Status: | CLOSED ERRATA | QA Contact: | Sunil Kondkar <skondkar> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | JON 3.3.2 | CC: | fbrychta, jshaughn, lzoubek, skondkar, spinder, theute |
Target Milestone: | ER01 | Keywords: | Triaged |
Target Release: | JON 3.3.3 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-30 16:41:50 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Larry O'Leary
2015-04-13 23:11:09 UTC
This same issue occurs if an operation had been invoked on an auto-group. For an JBoss EAP 6 standalone server and its platform's auto-group, the rhq_resource_group table will have an entry for the _JBossAS7 Standalone Servers_ auto-group: id name description resource_type_id ctime mtime modified_by recursive group_definition_id group_by category subject_id cluster_key cluster_resource_group_id auto_group_parent_resource_id 10041 jon3-3-0-server-psql-01372689 ( JBossAS7 Standalone Server ) <null> 10919 1429642814816 1429642814816 admin false <null> <null> COMPATIBLE 2 <null> <null> 10001 In this case the group id is 10041 and its parent is the platform resource which an id of 10001. The rhq_operation_history table will have an entry for the group operation that was performed on the _JBossAS7 Standalone Servers_ auto-group: id dtype job_name job_group operation_def_id status error_message subject_name ctime stime mtime parameters_config_id resource_id results_config_id group_history_id group_id 10031 group rhq-group-10041-109757538-1429643133932 rhq-group-10041 11014 SUCCESS <null> rhqadmin 1429643134035 1429643134035 1429643134385 <null> <null> <null> <null> 10041 In this case the operation history id is 10031 and the group the operation was invoked on has the id 10041. This row also has a reference to the operation definition with the id 11014. To reproduce this issue with an auto-group: 1. Install, configure and start JBoss EAP 6 standalone server. 2. Install, configure and start JBoss ON 3.3 system. 3. Import EAP 6 server into inventory. 4. Configure connection settings for EAP server. 5. From the _JBossAS7 Standalone Servers_ auto-group node, found under the platform resource, invoke the _Start_ operation. This is the auto-group node for resources of type _JBossAS7 Standalone Server_, NOT the individual resource. 6. From the agent plug-ins administration page, delete the AS7 plug-in. Please note that if using JBoss ON 3.3.1 or earlier, you will first need to manually work around BZ-1200579 before you can call this issue "reproduced." I'd recommend deleting all compat groups for the doomed type, as part of the type removal. I don't think this is too heavy handed, even if the groups had been manually created. I was able to reproduce the issue on manually created group. Based on IRC chat with Jay, I am going to fix this within ResourceGroupManagerBean#removeCompatibleGroupConstructs - this get's called whenever compatible group get's empty and switches to MIXED group. We're going to delete GroupOperationHistories, but keep/detach ResourceOperationHistories. Easiest way to achieve that is exposing OperationManagerBean#deleteOperationHistory_helper method as Local interface and put optional detach logic into it. branch: master link: https://github.com/rhq-project/rhq/commit/c3b9a2374 time: 2015-04-29 14:28:22 +0200 commit: c3b9a237403afa066bcf13cfa24bdff323e65404 author: Libor Zoubek - lzoubek message: Bug 1211407 - Agent plug-in deletion fails if resource group or auto-group operation was used Whenever Compatible group transforms to mixed group (ie. becomes empty) we now delete GroupOperationHistory rows, but keep ResourceOperationHistory. This fixes Bug 1211407, because agent plug-in deletion means resourceType deletion, which means resource deletion, which means removing resources from groups - removing resource of same resourceType from group makes it empty => mixed. This is when this fix comes to play. Available for test with 3.3.3 ER01 build: https://brewweb.devel.redhat.com/buildinfo?buildID=446732 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of jon-server-3.3.0.GA-update-03.zip. Verified on JBoss ON 3.3.3 ER01 build Verified AS7 plug-in deletion after operation invoked on compatible resource group of JBossAS7 Standalone Server and also for JBossAS7 Standalone Servers auto-group. The plug-in deletion is successful without errors. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-1525.html |