이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Applying Hotfix Patch to Fuse on Apache Karaf


2.1. Patching Features and Bundles

Patches are ZIP archives that contain the updated versions of files present in Fuse on Apache Karaf installation. These include:

  • Bundles: These are the most common and in the simplest case, hotfix patch may include single bundle.
  • Configuration files and scripts that are present respectively in $FUSE_HOME/etc and $FUSE_HOME/bin directories.
  • Libraries that are not ordinary bundles and reside in $FUSE_HOME/lib directory.
  • Feature definition changes: Normally Karaf features are included in descriptors available in the $FUSE_HOME/system directory, but hotfix patches do not change these files. Instead, hot fix patch may alter feature override file which is $FUSE_HOME/etc/org.apache.karaf.features.xml. This allows you to alter feature definitions in hotfix manner by upgrading given feature’s bundles or even make given feature use additional bundle.

Difference between Upgrading and Hotfix Patches

  • Hotfix Patch: A hotfix patch contains fixes for only one or more critical bugs. These are intended to be applied on top of your current Red Hat Fuse distribution. Its main purpose is to update some of the bundles and librabies in an existing distribution.
  • Upgrading: The Fuse on Apache Karaf upgrade mechanism enables you apply fixes to an Apache Karaf container without needing to reinstall an updated version of Fuse on Karaf. It also allows you to roll back the upgrade, if the upgrade causes problems with your deployed applications. The Fuse on Apache Karaf upgrade process updates any files, including bundle JARs, configuration files, and any static files.

For Fuse on Apache Karaf Standalone you can apply the patch using commands from the Karaf console’s patch shell. This approach is non-destructive and reversible. Following procedure can also be used for upgrading Red Hat Fuse on Apache Karaf. For more information of upgrading see Upgrading Fuse on Apache Karaf.

2.2. Applying a Hotfix Patch to Red Hat Fuse on Apache Karaf

You can use the hotfix mechanism to update the available feature definitions and bundles at the same time. The procedure to apply a hotfix patch to the Fuse on Apache Karaf installation is as follows.

Procedure

  1. Download the required patch from the Customer Portal.
  2. Make a full backup of your Fuse on Apache Karaf installation before upgrading.
  3. Open the terminal and start Fuse on Apache karaf server.

    [user@FUSE_HOME/bin ~] $ ./fuse
  4. Add the patch to the container’s environment by entering the patch:add command. For example, to add the patch-xxx.zip patch file, enter:

    karaf@root()> patch:add 'file:///Downloads/patch-xxx.zip'
    [name]                 [installed] [rollup]   [description]
    my-patch-x 	       false       false       my-patch-x
  5. Simulate installing the patch by entering the patch:simulate command.

    This generates a log of the changes that will be made to the container when the patch is installed, but will not make any actual changes to the container. Review the simulation log to understand these changes.

  6. Enter patch:list command to view a list of added patches. In this list, the entries under the [name] heading are patch IDs.

    patch:list
    [name]                       [installed]   [description]
    my-patch-x                   false
  7. Apply a patch to the container by entering the patch:install command and specifying the patch ID for the patch that you want to apply.

    patch:install my-patch-x

2.3. Rolling back a Patch

You can rollback the installed hotfix patch and restore it to pre-patch behavior using the patch:rollback command, as follows:

Procedure

  1. Enter the patch:list command to obtain the patch ID of the most recently installed patch.
  2. To rollback the updated bundle enter the following command:

    karaf@root()> patch:rollback my-patch-x
    INFO : org.jboss.fuse.modules.patch.patch-management (2): Rolling back non-rollup patch "my-patch-x"
    removing overriden feature: hawtio-rbac/2.0.0.fuse-000117
    refreshing features
    Enter feature:info command to view the information about the feature.
    karaf@root()> feature:info hawtio-rbac
    Feature hawtio-rbac 2.0.0.fuse-000117
    Details:
          Installs the hawtio RBAC enabler bundle(s)
    Feature has no configuration
    Feature has no configuration files
    Feature has no dependencies.
    Feature contains followed bundles:
          mvn:io.hawt/hawtio-osgi-jmx/2.0.0.fuse-000117
    Feature has no conditionals.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.