Red Hat Bugzilla – Bug 736204
Drift detection task stops running when base directory does not exist
Last modified: 2011-11-11 17:33:47 EST
Description of problem:
The drift detector runs on a reoccurring schedule in a thread pool. If an exception occurs during task execution such that it is not handled and propagates out of the task, subsequent executions of the task will be terminated. This happens when a drift configuration has a value for its base directory that evaluates to a non-existent path.
Version-Release number of selected component (if applicable):
Any time the base directory evaluates to a non-existent path
Steps to Reproduce:
1. Create a drift configuration for a platform resource
2. For the base directory, choose a value that evaluates to a non-existent path
3. Set the interval to a really low value like 10 so that drift detections occurs quickly and frequently.
4. Wait five minutes so that the drift detection will have had time to run twice.
5. Create another drift configuration that is valid such that the base directory evaluates to an existing file system path.
6. Wait a few minutes for the drift detection to run.
Drift detection for the second configuration will never run. Nor will it run for any other configuration because the drift detector task has stopped running.
Drift detection should continue running.
A fix for this has already been committed to the drift branch. The fix makes sure that exceptions do not propagate out of the drift detector task. While the error handling is necessary, I do not think it is sufficient. We need to do some up front validation when a user creates a drift configuration, and we need to make sure we do appropriate clean up on the agent when unexpected errors do occur. I will file separate bugs for these because I think that they can be tested and happen independent of one another.
The key thing is that one bad drift configuration does not bring all
I see agent side checking of valid paths as an additional enhancement to this.
This bug over laps with bug 738346 and the fix really addresses this one as well. Moving to ON_QA.
The negative test for Drift with an invalid directory is unverifiable ... there are no changesets. The basic positive use-case does not work for me.
This overlaps with bug 751912. The fix is twofold. First drift detection continues to run even if the base directory does not exist. Secondly, a non-existent base directory is reported as out of compliance. I am closing this since 751912 was already verified.
*** This bug has been marked as a duplicate of bug 751912 ***