Bug 1324366

Summary: Upgrade tool doesn't remove /standalone/deployments/business-central.war/META-INF/context.xml file
Product: [Retired] JBoss BRMS Platform 6 Reporter: Tibor Zimanyi <tzimanyi>
Component: Upgrade ToolAssignee: Bill Rainford <brainfor>
Status: CLOSED EOL QA Contact: Tibor Zimanyi <tzimanyi>
Severity: low Docs Contact:
Priority: medium    
Version: 6.3.0CC: kverlaen, lpetrovi, tzimanyi
Target Milestone: CR1   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:00:41 UTC Type: Bug
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
Folder containing upgrade results none

Description Tibor Zimanyi 2016-04-06 07:49:39 UTC
Description of problem:

When upgrading from product 6.1.2, Upgrade tool doesn't remove file /standalone/deployments/business-central.war/META-INF/context.xml although it hadn't changed. 

The file has checksum 335211032c026a5386f50f798f35ec31. This checksum is also present in checksums file. So it should be removed during update process. 


Version-Release number of selected component (if applicable): 6.3.0.ER2

How reproducible:

Run integration-tests from [1] with PR [2].

[1] https://github.com/jboss-integration/bxms-patch-tools/tree/6.1-to-6.3
[2] https://github.com/jboss-integration/bxms-patch-tools/pull/63

Actual results: The tests fail with 

Incorrectly blacklisted file - STATUS: MARKER_FILE_NOT_NECESSARY, FILE: .../standalone/deployments/business-central.war/META-INF/context.xml

Expected results:

The tests pass.

Comment 1 Petr Široký 2016-04-06 11:00:43 UTC
I noticed the same bug yesterday and fixed it on both branches.

6.1-to-6.3:
https://github.com/jboss-integration/bxms-patch-tools/commit/b73171f409faf8bf
 
6.2-to-6.3:
https://github.com/jboss-integration/bxms-patch-tools/commit/97588f2b80cbe282

Comment 2 Tibor Zimanyi 2016-04-15 12:42:55 UTC
Returning this. Issue still occurs. Now with different files. In Jenkins job, it doesn't remove domain.xml. See log: 

07:56:07.407 [main] ERROR o.j.b.p.integrationtests.BlacklistIT - Patch tool created unnecessary marker file for file /home/hudson/hudson_workspace/workspace/BxMS/BxMS-prod-6.3/patch-tool/bxms-patch-tools-6.1-to-6.3-itests/distribution/eap6.x/jdk/jdk1.8/label_exp/RHEL7/product/brms/integration-tests/target/test-classes/testdist/jboss-eap-6.4/domain/configuration/domain.xml!

When testing locally, it doesn't remove standalone-full.xml and creates both .new and .removed marker file. I will attach screenshot with the folder containing these files.

Comment 3 Tibor Zimanyi 2016-04-15 12:43:39 UTC
Created attachment 1147634 [details]
Folder containing upgrade results

Comment 4 Tibor Zimanyi 2016-04-15 12:45:29 UTC
I forgot the mention tested version, it's 6.3.0.ER3. Occurs with both upgrade zips (6.1 -> 6.2 and 6.2 -> 6.3).

Comment 5 Petr Široký 2016-04-15 14:35:45 UTC
I've tried to reproduce this manually (not running the integration-tests) and was not able to.

Looking at the BlacklistIT test, I think the above mentioned behavior is partially expected. https://github.com/jboss-integration/bxms-patch-tools/blob/6.2-to-6.3/integration-tests/src/test/java/org/jboss/brmsbpmsuite/patching/integrationtests/BlacklistIT.java#L179 adds string "someText" at the end of a file, which in this case happens to be the domain/configuration/domain.xml. So the patch tool then correctly assumes the file was changed by user and does not replace it with the latest version and instead creates the .new file.

As for the both standalone-full.xml.new and standalone-full.xml.removed, I wasn't able to reproduce that either. Would it be possible to get a TRACE log output from the tool?

Thanks!

Comment 6 Tibor Zimanyi 2016-04-19 11:30:45 UTC
Hi Petr, 

as we discussed, I fixed the tests, but the problem still occurs. For file that is changed by user and blacklisted at the same time, upgrade tool creates both .removed and .new marker file. Tried 6.1-to-6.3 upgrade. 

The fix for the tests is here: 
https://github.com/jboss-integration/bxms-patch-tools/pull/65

and here for 6.2-to-6.3 branch:

https://github.com/jboss-integration/bxms-patch-tools/pull/64

Comment 7 Petr Široký 2016-04-19 14:00:16 UTC
Should be fixed now (tried locally with the EAP bundles):

6.1-to-6.3:
https://github.com/jboss-integration/bxms-patch-tools/commit/566594fc6e312478

6.2-to-6.3:
https://github.com/jboss-integration/bxms-patch-tools/commit/f00f26d9a0950092

Comment 8 Tibor Zimanyi 2016-04-28 12:10:33 UTC
Verified.