Bug 602270

Summary: Resource operation alert sender reports success even if the invoked operation fails
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: AlertsAssignee: Joseph Marques <jmarques>
Status: CLOSED CURRENTRELEASE QA Contact: Sudhir D <sdharane>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: 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:57:20 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:

Description Lukas Krejci 2010-06-09 14:01:11 UTC
Description of problem:

$SUBJECT says it all.

How reproducible:
always

Steps to Reproduce:
1. Create an alert on some resource that executes an operation on another resource
2. Set up the server/agent/the underlying resource so that that operation fails when invoked
3. Trigger the alert
  
Actual results:
The history entry for the alert report success, while the operation history on the target resource reports operation failure.

Expected results:
The alert should report the failure along with the detailed information about the operation failure.

Additional info:

For the always failing operation, I started the agent as an unprivileged user and set up the alert to start an apache server. That always fails unless the agent runs with enough privileges.

Comment 1 Joseph Marques 2010-06-30 07:30:44 UTC
commit 894b6792a5f614d63b10703a726a29e4aab603e0
Author: Joseph Marques <joseph>
Date:   Wed Jun 30 03:26:37 2010 -0400

BZ-602123: BZ-602270: various tweaks for alert notification processing
    
* never allow any exceptions to bubble up during notification processing
    
* add new UNKNOWN status for AlertNotificationLogs
** use the UNKNOWN state to catching mishaving plugins during alert processing
    
* add new DEFERRED status for AlertNotificationLogs
** use the DEFERRED state or operations
** since we don't wait for the operation to complete, we don't know it's termination state)
    
* add new PARTIAL status for AlertNotificationLogs
** use it to represent mixed success/failures during email sending
** do not defer email sending anymore, execute during each notification processing
** by processing them all upfront, easier to reason about terminating ResultState

Comment 2 Sudhir D 2010-07-02 13:19:02 UTC
Direct Emails 	PARTIAL 	Target addresses were: [rhquser, ^&$*((@)#$.$@]
Successfully sent to: [rhquser]
Failed to send to: [^&$*((@)#$.$@]

Resource Operations 	DEFERRED 	Executed 'Store Configuration' on the ( dhcp6-150.pnq.redhat.com-embedded > Tomcat (8080) ) resource
Check the corresponding operation history for more details.

Also, I did not see any exception in the logs. Marking this bug as verified.

Comment 3 Corey Welton 2010-08-12 16:57:20 UTC
Mass-closure of verified bugs against JON.