Bug 736208

Summary: Agent needs to clean up when unexpected error occurs during drift detection
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: driftAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.1   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 19:25:29 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:    
Bug Blocks: 707225    

Description John Sanda 2011-09-07 02:19:25 UTC
Description of problem:
Unexpected errors can happen during drift detection while the agent is generating a change set report file. The file on disk could be in an inconsistent state causing errors for future drift detection.

This problem manifests itself by following the steps for bug 736204. 

When the drift detector runs for the configuration having an invalid base directory, an exception is thrown, and an empty change set file is left on the file system. For example, for a resource with id 123 and a drift configuration named, BAD_CONFIG, the file <RHQ_AGENT_HOME>/data/changesets/123/BAD_CONFIG/changeset.txt would be empty. That file should never be empty, even with a valid base directory. The file should always contain headers.

When an unexpected error occurs during drift detection, the changeset.txt file should be reset to its state prior to the drift detection running. This will ensure that changeset.txt remains in a consistent state from one run of the drift detector to the next. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2011-10-04 18:27:59 UTC
This was addressed by the commit discussed in bug 739194

Comment 2 Mike Foley 2012-02-07 19:25:29 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE