Bug 1119262 - [jon3-7] EAP6 drifts exclude pattern not working for windows case
Summary: [jon3-7] EAP6 drifts exclude pattern not working for windows case
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Drift
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: DR01
: JON 3.3.0
Assignee: Jay Shaughnessy
QA Contact: Garik Khachikyan
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-14 11:46 UTC by Garik Khachikyan
Modified: 2015-01-04 22:00 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-12-11 14:02:07 UTC
Type: Bug

Attachments (Terms of Use)
snapshot of the drift (no *_history/ files any more) (138.27 KB, image/png)
2014-08-14 12:11 UTC, Garik Khachikyan
no flags Details

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.

    -- 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)

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