Bug 736208 - Agent needs to clean up when unexpected error occurs during drift detection
Summary: Agent needs to clean up when unexpected error occurs during drift detection
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: drift
Version: 4.1
Hardware: Unspecified
OS: Unspecified
high
unspecified vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 707225
TreeView+ depends on / blocked
 
Reported: 2011-09-07 02:19 UTC by John Sanda
Modified: 2012-02-07 19:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:25:29 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 736204 None None None Never

Internal Links: 736204

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


Note You need to log in before you can comment on or make changes to this bug.