Bug 745753

Summary: Drift Function is not working as expected
Product: [Other] RHQ Project Reporter: Jeeva Kandasamy <jkandasa>
Component: driftAssignee: John Sanda <jsanda>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: medium    
Version: unspecifiedCC: jshaughn
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-14 04:05:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Drift configuration and history
none
Agent-Server log files none

Description Jeeva Kandasamy 2011-10-13 10:04:05 UTC
Created attachment 527943 [details]
Drift configuration and history

Description of problem:
Drift function is not working as expected. For file change also showing new file added. Even I did change a single file, it was showing like all files added newly.

Version-Release number of selected component (if applicable):
Version: 4.1.0-SNAPSHOT
Build Number: 04b6565
GWT Version: 2.0.4
SmartGWT Version: 2.4

How reproducible:
100%


Steps to Reproduce:
1.Log on to RHQ GUI with required privilege 
2.Create a drift with the details on screen shot
3.Create a folder and files on the location,
   - /home/hudson/includeDir/folder1/file1.txt
   - /home/hudson/includeDir/folder2/file2.txt
   - /home/hudson/excludeDir/folder3/file3.txt
   - /home/hudson/excludeDir/folder4/file4.txt
4.Add some lines in all files
5.wait >60 seconds (as we configured interval as 60 seconds)
6.look at history, will be listed as new file added. (includeDir/folder1/file1.txt,includeDir/folder2/file2.txt)
7.Add some more lines on all the files
8.wait > 60 seconds
9.look at history, will be listed new file added on snapshot 2 also. (includeDir/folder1/file1.txt,includeDir/folder2/file2.txt). It should not be, as this files are already available, should be reflect as changed on history.
10.If I delete a file (Ex.includeDir/folder1/file1.txt), on history it's showing file added (includeDir/folder2/file2.txt)

Note: I clicked 'Detect Now' also sometimes.
  
Actual results:
For file changes/removed also displaying as new file(s) added. I did change on single file. But listing both the files are added newly.

Expected results:
Should work as per design

Additional info: Screen shot is attached.

Comment 1 Jeeva Kandasamy 2011-10-13 12:46:46 UTC
Created attachment 527967 [details]
Agent-Server log files

Comment 2 Jay Shaughnessy 2011-10-13 16:23:47 UTC
I think if there is a problem here it may be due to a scenario that 
perhaps wasn't handled. In steps 2 and 3 it looks like when the drift
definition is created the base directory does not exist on the file
system. The first detection may not work as expected and perhaps
subsequent runs get confused.

We'll look into this.

Comment 3 Jeeva Kandasamy 2011-10-14 04:05:04 UTC
My bad, Sorry for the troubling. Automation code was developed few weeks back to create drift on GUI. I didn't notice the new field 'Pinned' and it was enabled by automation code. On the above scenario at very first (on pinned reference) we did not have any files/directories and it is working as expected as per 'Pinned' functionality, hence I'm moving this bug to CLOSED state.