Bug 1372167

Summary: Update 6.3.1 - patching utility cannot uninstall latest patch
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Juraj Duráni <jdurani>
Component: ProductizationAssignee: Alex Szczuczko <aszczucz>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Stastny <jstastny>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: aszczucz, blafond, jolee, mbaluch, thauser, vhalbert
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-06 14:21:32 UTC Type: Support Patch
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Juraj Duráni 2016-09-01 05:53:36 UTC
Description of problem:
New patching utility for JDV 6.3 cannot uninstall latest patch (see [1]). The error message says that "cli-scripts/teiid-logger-ds.properties" has been modified. However, uninstall command has been issues right after install/update command.

Additional information:
Warning about ModeShape.vdb - this appears if patching JDV server which does not contain ModeShape installation. Should not be problem.
Warning about *.dodeploy file - this file is replaced with other flag-file after first running of JDV server. This warning is OK as we do not want to manage other flag-files (e.g. *.deployed, *.failed, *.skipdeploy,...).



[1]
[jdurani@localhost 631]$ java -jar jboss-dv-6.3.1-patch.jar --server /home/jdurani/redhat/data-virtualization/dv_6.3.0/untouched_631_2/ --update jboss-dv
INFO  - Upgrade from jboss-dv-6.3.0 to jboss-dv-6.3.1
[jdurani@localhost 631]$ java -jar jboss-dv-6.3.1-patch.jar --server /home/jdurani/redhat/data-virtualization/dv_6.3.0/untouched_631_2/ --uninstall jboss-dv-6.3.1
INFO  - Uninstall jboss-dv-6.3.1
ERROR - Attempt to delete an already modified file cli-scripts/teiid-logger-ds.properties
WARN  - Attempt to delete a non existing file: dataVirtualization/vdb/ModeShape.vdb
WARN  - Attempt to delete a non existing file: standalone/deployments/integration-platform-console.war.dodeploy
ERROR - ERROR One or more checksum failures, aborting operation. Use --force to override.
[jdurani@localhost 631]$ java -jar jboss-dv-6.3.1-patch.jar --server /home/jdurani/redhat/data-virtualization/dv_6.3.0/untouched_631_2/ --uninstall jboss-dv-6.3.1 --force
INFO  - Uninstall jboss-dv-6.3.1
ERROR - Attempt to delete an already modified file cli-scripts/teiid-logger-ds.properties
WARN  - Attempt to delete a non existing file: dataVirtualization/vdb/ModeShape.vdb
WARN  - Attempt to delete a non existing file: standalone/deployments/integration-platform-console.war.dodeploy
ERROR - ERROR One or more checksum failures, aborting operation. Use --force to override.
[jdurani@localhost 631]$ java -jar jboss-dv-6.3.1-patch.jar --server /home/jdurani/redhat/data-virtualization/dv_6.3.0/untouched_631_2/ --install jboss-dv-6.3.0
INFO  - Downgrade from jboss-dv-6.3.1 to jboss-dv-6.3.0

Comment 1 Alex Szczuczko 2016-09-01 13:45:57 UTC
I will see what's wrong with that properties file, and try to clean up the handling of optionals and marker files.

Comment 2 Alex Szczuczko 2016-09-01 16:05:35 UTC
I just realised that you were using the "--uninstall" command, which is kind of weirdly designed. Although it accepts a specific version, it will remove the whole package. Removing DV from the EAP server has never been supported operation, as far as I know :)

"--install jboss-dv-6.3.0" (the version before the patch version) is the appropriate way to "rollback" or "uninstall this patch" of the DV package.

So, --uninstall, as implemented, isn't really applicable to DV's use of fuse-patch. I left it in because I wanted to keep the custom build I have of fuse-patch somewhat generic.

I think what I will do is add a feature that checks for a marker resource in the jar, and if present, hide/disable the uninstall command. That way the genericness is preserved, but we can avoid this confusion for DV.

Comment 3 Juraj Duráni 2016-09-02 04:38:53 UTC
Yes, uninstalling JDV serer from EAP isn't supported/tested, so it would be nice to have 'uninstall' option disabled. Thanks Alex.

Comment 4 Juraj Duráni 2016-12-05 10:01:16 UTC
Option --uninstall is hidden (JDV 6.3.3).