Bug 602788
| Summary: | Trying to edit a script-based alert notification fails with FK constraint violation. | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Corey Welton <cwelton> |
| Component: | Alerts | Assignee: | Joseph Marques <jmarques> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Sudhir D <sdharane> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 1.4 | CC: | jmarques |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 2.4 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-08-12 16:54:50 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: | 607548 | ||
| Bug Blocks: | 577217 | ||
workaround is to remove busted notification and recreate. commit f4223c6c628f5b5788e804a0c7f382cfea121cdd
Author: Joseph Marques <joseph>
Date: Fri Jun 11 14:01:40 2010 -0400
BZ-602788: fix FK constaint violation when editing an alert notification with operation arguments
* instead of deleting and recreating the extraConfiguration object, just merge properties changes into it
* if user changes selection mode, need to null out the extraConfiguration
Blocked by 607548 QA Verified. Mass-closure of verified bugs against JON. |
Description of problem: If user saves an alert notification which runs a JBoss AS descendent script, and afterwards tries to edit it, s/he gets a FK constraint violation. Version-Release number of selected component (if applicable): How reproducible: Every time Steps to Reproduce: 1. Create an alert for a jboss as server, i.e., RHQ 2. Type: Resource Operations Resource Selection Mode: Relative Resource Start Search from: JBoss AS Server Then Filter By: Script 3. Enter "porbe.sh" in the box next to "Script" 4. Operation name: Execute script 5. Command Line arguments: keep "Unset" checked. 6. Return to the box which contains "porbe.sh". change this to "probe.sh" 7. hit save Actual results: Failed to save alert notification Cause: javax.ejb.EJBException:javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not execute update query -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: could not execute update query -> org.hibernate.exception.ConstraintViolationException:could not execute update query -> org.postgresql.util.PSQLException:ERROR: update or delete on table "rhq_config" violates foreign key constraint "rhq_alert_notification_extra_config_id_fkey" on table "rhq_alert_notification" Detail: Key (id)=(13618) is still referenced from table "rhq_alert_notification".[SQLException=ERROR: update or delete on table "rhq_config" violates foreign key constraint "rhq_alert_notification_extra_config_id_fkey" on table "rhq_alert_notification" Detail: Key (id)=(13618) is still referenced from table "rhq_alert_notification".] Expected results: No errors. Additional info: