Bug 1077634

Summary: Failed to update connection settings
Product: [Other] RHQ Project Reporter: Filip Brychta <fbrychta>
Component: ConfigurationAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.11CC: hrupp, jshaughn
Target Milestone: GA   
Target Release: RHQ 4.11   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-21 10:13:35 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:
Attachments:
Description Flags
server log none

Description Filip Brychta 2014-03-18 10:42:28 UTC
Created attachment 875868 [details]
server log

Description of problem:
Update of connection settings fails with following exception:
org.hibernate.PersistentObjectException:detached entity passed to persist: org.rhq.core.domain.configuration.definition.ConfigurationDefinition

Version-Release number of selected component (if applicable):
Version :	
4.11.0-SNAPSHOT
Build Number :	
65e78e6

How reproducible:
Always

Steps to Reproduce:
1. clean installation of rhq
2. import some platform
3. navigate to platform resource -> Inventory -> Connection Settings
4. update any filed (e.g Metadata Cache Timeout)
5. click on save button

Actual results:
Failed to update connection settings.
org.hibernate.PersistentObjectException:detached entity passed to persist: org.rhq.core.domain.configuration.definition.ConfigurationDefinition

Expected results:
No errors

Additional info:
Complete exception from server log attached.

Comment 1 Filip Brychta 2014-03-18 11:22:02 UTC
This was discovered by automation. Last successful run was on rhq master fe43668

Comment 2 Jay Shaughnessy 2014-03-19 13:33:58 UTC
This problem is not in any release, found and fixed during 4.11 development.

This BZ results from a regression due to changes for Bug 1073201. I will link the BZ's.

master commit ed149e572d7a063ad69d45a47aa97126180ebd4d
Author: Jay Shaughnessy <jshaughn>
Date:   Tue Mar 18 17:44:26 2014 -0400

[1073201] revision due to regression
When updating plugin config we added an optimization to root the ensuing
service discovery at the resource being updated, as opposed to doing a
full service scan.  The regression resulted from passing the attached
Resource to the agent.  Never pass attached objects to the agent from
the server.  Unfortunately, detaching the object was not viable as it
actually needed to stay attached for the overall logic flow. So, I
lightened the API to just require the resourceId, which is a better agent
API anyway.

Comment 3 Filip Brychta 2014-03-19 14:58:27 UTC
Verified on
Version :	
4.11.0-SNAPSHOT
Build Number :	
978063b

Comment 4 Heiko W. Rupp 2014-07-21 10:13:35 UTC
Bulk closing of RHQ 4.11 issues, now that RHQ 4.12 is out.

If you find an issue with those, please open a new BZ, linking to the old one.