Bug 736208 - Agent needs to clean up when unexpected error occurs during drift detection
Agent needs to clean up when unexpected error occurs during drift detection
Product: RHQ Project
Classification: Other
Component: drift (Show other bugs)
Unspecified Unspecified
high Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
Blocks: 707225
  Show dependency treegraph
Reported: 2011-09-06 22:19 EDT by John Sanda
Modified: 2012-02-07 14:25 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-07 14:25:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Sanda 2011-09-06 22:19:25 EDT
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:
Actual results:

Expected results:

Additional info:
Comment 1 John Sanda 2011-10-04 14:27:59 EDT
This was addressed by the commit discussed in bug 739194
Comment 2 Mike Foley 2012-02-07 14:25:29 EST
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.