Bug 1119262

Summary: [jon3-7] EAP6 drifts exclude pattern not working for windows case
Product: [JBoss] JBoss Operations Network Reporter: Garik Khachikyan <gkhachik>
Component: DriftAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Garik Khachikyan <gkhachik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: jshaughn, mkoci
Target Milestone: DR01   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:02:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
snapshot of the drift (no *_history/ files any more) none

Description Garik Khachikyan 2014-07-14 11:46:13 UTC
Description of problem:
Having a Windows EAP6 server and setting up a configuration drift (in scopes of new feature in JON3-7) not works as expected in means of exclude pattern (I was providing all the defaults leaving: ./*_history/**/*)
It shows up 3 files changed in case of a build of new bundle in there where 2 of them are under standalone_history/ folder there.

Version-Release number of selected component (if applicable):
4.12.0-SNAPSHOT 1a62d13

How reproducible:
from the first attempt

Steps to Reproduce:
1. register a windows agent having there a running EAP6.
2. discover and import all resources.
3. prepare a drift and leave all the values as it suggests by default for that EAP6 resource.
4. deploy a bundle there (e.g. jenkins.war) to make the standalone.xml changed.

Actual results:
See the snapshot of that drift - It appears with 3 files changed like:
 - standalone_xml_history/current/standalone.v1.xml (new) wrong
 - standalone_xml_history/standalone.last.xml (changed) wrong
 - standalone.xml (changed) correct

Expected results:
only standalone.xml change should shown

Additional info:

Comment 1 Jay Shaughnessy 2014-07-23 18:12:51 UTC
master commit d3f63b559551ca4ab1c185410308d2f9e01c03cb
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Wed Jul 23 14:06:54 2014 -0400

    The issue here is that the drift template defines the plugin descriptor
    and in this case, the associated excludes filter: pattern="*_history/**/*".
    It can only be predefined in one format, and the plugin naturally uses
    linux-style forward slashes for the directory separator.

    But on Windows that is the wrong separator.

    The solution is to convert to the native separator slash internally at
    "detection-time", regardless of the slashing used in the pattern.  This is,
    I think, in-line with ant file-pattern approach we are using.

    Also,
    -- added new FileUtil.useNativeSlash(String path)



release/jon3.3.x commit 01c7bb3bdd69e657a852ae71a6647acdbc7f5427
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Wed Jul 23 14:09:59 2014 -0400

    Cherry-Pick of master 83e926c0debb558b2e90efee47317517ea4bb4db

Comment 2 Simeon Pinder 2014-07-31 15:51:30 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 4 Garik Khachikyan 2014-08-14 12:11:26 UTC
Created attachment 926756 [details]
snapshot of the drift (no *_history/ files any more)