Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

12.2. Patching Process

Red Hat JBoss Data Virtualization 6.3 and greater uses fuse-patch’s patch application system.
Previous versions of Red Hat JBoss Data Virtualization used other patch systems (Red Hat JBoss EAP’s for DV 6.2 and 6.1), and a manual system (for DV 6.0). Since it is part of the server, EAP’s system receives updates slowly, so for Red Hat JBoss Data Virtualizationa 6.3 it was necessary to use a separate patch system. Hence, there are now concurrent and separate EAP and DV patch streams.
The self-executing jar patch distro-format can be executed in the same manner as the installer jar.
Red Hat JBoss Data Virtualization’s patch jars include the packages for all 6.3 versions up to the current version. This also enables a form of rollback, in that the package can be downgraded by re-installing the prior version.
Help text is provided by the jar when an argument is incorrect/unrecognised, or the --help switch is provided.

Procedure 12.2. Upgrading

  1. Ensure the server is shut down.
  2. To update to the latest version contained in the jar’s repository, run these commands:
    $ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --query-server
    jboss-dv-6.3.0
    $ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --update jboss-dv
    INFO  - Upgrade from jboss-dv-6.3.0 to jboss-dv-6.3.1
    
    Alternatively, you can manually specify the version using these commands:
    $ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --query-server
    jboss-dv-6.3.0
    $ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --install jboss-dv-6.3.1
    INFO  - Upgrade from jboss-dv-6.3.0 to jboss-dv-6.3.1
    

    Note

    The --server argument is optional. If it isn’t specified, the JBOSS_HOME environment variable, and then the current/working directory will be tried. A basic test will be undertaken to make sure the directory appears to be the server root, otherwise an error will be returned.

Procedure 12.3. Downgrading

  1. Ensure the server is shut down.
  2. Roll back by specifying a version lower than the current version as the install argument’s value:
    $ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --query-server
    jboss-dv-6.3.1
    $ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --install jboss-dv-6.3.0
    INFO  - Downgrade from jboss-dv-6.3.1 to jboss-dv-6.3.0
    
If you encounter an error during the upgrade process, you will see a message like this:
$ java -jar [path]/63-patching/jboss-dv-6.3.1-patch.jar --server dist/ --update jboss-dv
INFO  - Upgrade from jboss-dv-6.3.0 to jboss-dv-6.3.1
ERROR - Attempt to override an already modified file dataVirtualization/vdb/teiid-odata.war
ERROR - Attempt to override an already modified file modules/system/layers/dv/org/jboss/teiid/api/main/teiid-api-8.12.5.redhat-7.jar
ERROR - ERROR One or more checksum failures, aborting operation. Use --force to override.
In this situation, you can revert the changes. To do so, run this command:
$ java -jar [path]/63-patching/jboss-dv-6.3.1-patch.jar --server dist/ --update jboss-dv --force
INFO  - Upgrade from jboss-dv-6.3.0 to jboss-dv-6.3.1
WARN  - Overriding an already modified file: dataVirtualization/vdb/teiid-odata.war
WARN  - Overriding an already modified file: modules/system/layers/dv/org/jboss/teiid/api/main/teiid-api-8.12.5.redhat-7.jar

Warning

An uninstall command is available, but Red Hat advises against using it. Running it will remove all files associated with the package name, not just that particular version. This is not a downgrade/rollback command (use install for that, as described above).
If you run this command accidentally, running "install" or "update" should put the files back into place.
Here are some miscellaneous commands:
To see the contents of the patch repository, run this command:
$ java -jar /path/to/jboss-dv-6.3.1-patch.jar --query-repository
jboss-dv-6.3.0
jboss-dv-6.3.1
This command lets you see the current packages on the server:
$ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --query-server
jboss-dv-6.3.1
This shows you the paths owned by the currently installed package:
$ java -jar [path]/jboss-dv-6.3.1-patch.jar --server dist/ --query-server-paths cli-scripts/ 
cli-scripts/ModeShape-domain.cli [jboss-dv-6.3.0]
cli-scripts/ModeShape-standalone.cli [jboss-dv-6.3.0]
cli-scripts/disable-welcome-root-domain.cli [jboss-dv-6.3.0]
cli-scripts/disable-welcome-root.cli [jboss-dv-6.3.0]
cli-scripts/teiid-add-database-logger-domain.cli [jboss-dv-6.3.0]
cli-scripts/teiid-add-database-logger.cli [jboss-dv-6.3.0]
cli-scripts/teiid-dashboard-add_datasource.cli [jboss-dv-6.3.0]
cli-scripts/teiid-dashboard-domain-add_datasource.cli [jboss-dv-6.3.0]
cli-scripts/teiid-deploy-dashboard-domain.cli [jboss-dv-6.3.0]
cli-scripts/teiid-deploy-dashboard.cli [jboss-dv-6.3.0]
cli-scripts/teiid-domain-auditcommand-logging.cli [jboss-dv-6.3.0]
cli-scripts/teiid-domain-mode-install.cli [jboss-dv-6.3.0]
cli-scripts/teiid-logger-ds.properties [jboss-dv-6.3.0]
cli-scripts/teiid-modeshape-domain.cli [jboss-dv-6.3.0]
cli-scripts/teiid-modeshape-standalone.cli [jboss-dv-6.3.0]
cli-scripts/teiid-standalone-auditcommand-logging.cli [jboss-dv-6.3.0]
cli-scripts/teiid-standalone-mode-install.cli [jboss-dv-6.3.0]
The argument value allows you to filter based on the the prefix of the paths. Passing an empty string ('' or "" in most shells) will return all paths (unfiltered).
You can also view an audit log of previous actions using this command:
$ java -jar /path/to/jboss-dv-6.3.1-patch.jar --server some-server/ --audit-log
# 13-Jul-2016 14:23:42
# Upgrade from jboss-dv-6.3.0 to jboss-dv-6.3.1
[properties]
[content]
ADD dataVirtualization/jdbc/modeshape-client-3.8.4.GA-redhat-8.jar 3027790150
DEL dataVirtualization/jdbc/modeshape-client-3.8.4.GA-redhat-9.jar 692252461
ADD dataVirtualization/jdbc/teiid-8.12.5.redhat-6-jdbc.jar 2751767369
DEL dataVirtualization/jdbc/teiid-8.12.5.redhat-7-jdbc.jar 181512329
ADD dataVirtualization/jdbc/teiid-hibernate-dialect-8.12.5.redhat-6.jar 2332531122
DEL dataVirtualization/jdbc/teiid-hibernate-dialect-8.12.5.redhat-7.jar 351948893
UPD dataVirtualization/logging/database-service.jar 2354483517
...

# 13-Jul-2016 14:25:18
# Downgrade from jboss-dv-6.3.1 to jboss-dv-6.3.0
[properties]
[content]
DEL dataVirtualization/jdbc/modeshape-client-3.8.4.GA-redhat-8.jar 3027790150
ADD dataVirtualization/jdbc/modeshape-client-3.8.4.GA-redhat-9.jar 692252461
DEL dataVirtualization/jdbc/teiid-8.12.5.redhat-6-jdbc.jar 2751767369
ADD dataVirtualization/jdbc/teiid-8.12.5.redhat-7-jdbc.jar 181512329
DEL dataVirtualization/jdbc/teiid-hibernate-dialect-8.12.5.redhat-6.jar 2332531122
ADD dataVirtualization/jdbc/teiid-hibernate-dialect-8.12.5.redhat-7.jar 351948893
UPD dataVirtualization/logging/database-service.jar 3678296797
...