Bug 1147001

Summary: Server log exception when saving a resource error
Product: [Other] RHQ Project Reporter: Thomas Segismont <tsegismo>
Component: Plugin ContainerAssignee: Thomas Segismont <tsegismo>
Status: ON_QA --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.13   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1147002 (view as bug list) Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 1147002    
Attachments:
Description Flags
Server log exception none

Description Thomas Segismont 2014-09-26 14:19:36 UTC
Created attachment 941583 [details]
Server log exception

Description of problem:
An exception is logged on the server:
HHH000437: Attempting to save one or more entities that have a non-nullable association with an unsaved transient entity.

It appears as soon as the agent is restarted, during resource activation.

How reproducible:
Not 100% sure how to reproduce

Steps to Reproduce:
1.Setup RHQ server and agent environment on a machine with Postgres server running
2.In discovery queue, ignore Postgres resource
3.Wait for agent inventory to stabilize (couple of minutes)
4.Restart the agent

Actual results:
A Postgres plugin error is logged on the agent indicating that the credentials are invalid
The Hibernate HHH000437 issue message is logged on the server when the error is reported to the server.

Expected results:
A Postgres plugin error is logged on the agent indicating that the credentials are invalid.
No exception logged on the server

Comment 1 Thomas Segismont 2014-09-26 14:22:35 UTC
Fixed in master

commit 61dc694215ad0058fd1e94e39af69337899c19bb
Author: Thomas Segismont <tsegismo>
Date:   Fri Sep 26 16:20:44 2014 +0200
    
    Do not send resource error until the resource is synced with server