10 Zero Downtime Patching

Zero Downtime (ZDT) patching allows you to roll out distributed patches to multiple clusters or to your entire domain with a single command. All without causing any service outages or loss of session data for the end-user. It takes what was once a tedious and time-consuming task and replaces it with a consistent, efficient, and resilient automated process.

Note:

Zero Downtime Patching currently applies to Fusion Middleware environments only.

If you are patching a multi-host topology, one of the first steps after downloading a patch is to identify whether the patch is suitable for Zero Downtime (ZDT) patching. If it is, you can use one of two methods to apply the patch with OPatchAuto.

10.1 About Zero Downtime Patching with OPatchAuto

Zero Downtime (ZDT) patching provides a process and mechanism for rolling out a patch across a domain while allowing applications to continue to service requests.

You can apply a ZDT patch using OPatchAuto, which rolls out the change to one node at a time and allows a load balancer (typically, Oracle Traffic Director (OTD) to redirect incoming traffic to the remaining nodes until the change is complete.

The recommended way to identify whether a patch is suitable for ZDT patching is to determine the value of the patch uptime option in the metadata of the patch. To identify a ZDT patch, see Section 10.2, "Identifying a Zero Downtime Patch."

10.2 Identifying a Zero Downtime Patch

You can identify a Zero Downtime (ZDT) patch by the value of the patch uptime option in the patch metadata.

After you download a patch, open up patchdeploy.xml in the PATCH_HOME/etc/config directory, where PATCH_HOME is the location of the patch directory that contains the patch.

If the value of patch-uptime-option is FMW_ROLLING_ORACLE_HOME, as shown in the following example:

<patch-uptime-option>FMW_ROLLING_ORACLE_HOME<patch-uptime-option>

OR the value is FMW_ROLLING_SESSION:

<patch-uptime-option>FMW_ROLLING_SESSION<patch-uptime-option>

Then, the patch is suitable for ZDT patching.

If FMW_ROLLING_ORACLE_HOME or FMW_ROLLING_SESSION does not appear in the patch metadata, then you know that the patch is not suitable for ZDT patching, and as a result, not compatible with a ZDT patch plan. The value of the patch uptime option will help you select the appropriate patch plan for applying the patch. For information on selecting a patch plan, see Section 10.3, "About the Available Patch Plans."

10.3 About the Available Patch Plans

After you identify whether a patch is suitable for ZDT patching, it is important that you review and understand the characteristics and limitations of the patch plans available for applying a patch.

A patch plan describes the sequence of steps to execute in order to deploy a patch. To execute a plan, you specify the plan name on the command line using the -plan option. For more information, see "Patch Plans"

To discover the plans available in an Oracle home, use the opatchauto lsplans command. The following example shows sample output of this command, which lists and describes the available plans:

cd ORACLE_HOME/OPatch
./opatchauto lsplans
 
Oracle OPatchAuto Version 13.9.0.0.0
Copyright (c) 2015, Oracle Corporation.  All rights reserved.
 
  OPatchAuto available patch plan information:
 
    Product Name: OPatchAuto Core
      Patch Plan Name: rolling (Default)
        Description: Process patch targets on a per-home basis and tries to minimize downtime.
      Patch Plan Name: parallel
        Description: Process patch targets in parallel and does not attempt to minimize downtime.
 
    Product Name: Oracle Fusion Middleware
      Patch Plan Name: wls-zdt-rollout
        Description: Performs full WLS ZDT rollout.
      Patch Plan Name: wls-push-image
        Description: Performs only image push portion of WLS ZDT rollout.

After identifying whether the patch is a ZDT patch (see Section 10.2, "Identifying a Zero Downtime Patch"), consider the following information when choosing a plan:

  • If a patch is not a ZDT patch, you should use the parallel patch plan to apply the patch, as shown in Section 10.4, "Applying a non-ZDT Patch on Multiple Hosts Using the Apply Command."

  • If a patch is a ZDT patch, there are two available plans, rolling and wls-zdt-rollout.

    • Use the rolling option if the patch is a FMW_ROLLING_ORACLE_HOME patch. This option uses a pure OPatchAuto approach, where OPatchAuto is used to perform all patching operations. This is the recommended method for Fusion Middleware.

      With this approach, you can perform both image based and non-image based patching. You can also use this approach to perform what is known as configuration patching (or patching operations performed on a domain). However, this method has no session management features, such as migrating a session to another server when a server is shutdown.

      For information on how to apply a ZDT patch with the rolling plan, see Section 10.5, "Applying a ZDT Patch on Multiple Hosts Using the Apply Command."

    • Use the wls-zdt-rollout option if the patch is a FMW_ROLLING_SESSION patch. You also use OPatchAuto for this option, but certain lifecycle operations are delegated to WebLogic Server components, such as WLST or the WebLogic Server Administration Console. This is recommended for WebLogic Server only.

      This approach only supports image based patching and does not support configuration patching. But, it does provide support for migrating a session when an instance is shutdown.

      This document does not cover the steps to apply a ZDT patch using this option. For more information, see Introduction to Zero Downtime Patching in Administering Zero Downtime Patching Workflows.

10.4 Applying a non-ZDT Patch on Multiple Hosts Using the Apply Command

To apply a non-ZDT patch, use the opatchauto apply command with the parallel patch plan. This is the same command as opatchauto apply -analyze, except you remove the -analyze argument when you are ready to apply the patch.

The following example shows how to use the opatchauto apply command to apply a non-ZDT patch to an Oracle Fusion Middleware environment on multiple hosts.

This example assumes that:

  • The patch you have downloaded has been saved to a directory that is named for the patch number in My Oracle Support. In this case, the patch number is 15941858.

  • The user runs the OPatchAuto command from the ORACLE_HOME/OPatch directory and includes the location of the patch (PATCH_HOME) as an argument to the command.

    Note:

    When you run the opatchauto apply command, make a note of the session id (for example, EKZR) in the command output. This will simplify the rollback process if you decide to roll back the patch later.
opatchauto apply PATCH_HOME -plan parallel -topology path_to_topology_file -wallet wallet_location -walletPassword password_ifneeded 

For example:

opatchauto apply /home/oracle/patches/15941858 -plan parallel -topology /home/oracle/topologies/topology.xml -wallet /tmp/samplewallet -walletPassword password 

10.5 Applying a ZDT Patch on Multiple Hosts Using the Apply Command

To apply a Zero Downtime (ZDT) patch, use the opatchauto apply command with the rolling patch plan. This is the same command as opatchauto apply -analyze, except you remove the -analyze argument when you are ready to apply the patch.

The following example shows how to use the opatchauto apply command to apply a ZDT patch to an Oracle Fusion Middleware environment on multiple hosts.

This example assumes that:

  • The patch you have downloaded has been saved to a directory that is named for the patch number in My Oracle Support. In this case, the patch number is 15941858.

  • The user runs the OPatchAuto command from the ORACLE_HOME/OPatch directory and includes the location of the patch (PATCH_HOME) as an argument to the command.

    Note:

    • When you run the opatchauto apply command, make a note of the session id (for example, EKZR) in the command output. This will simplify the rollback process if you decide to roll back the patch later.

    • rolling is the default patch plan if no plan is specified on the command line.

opatchauto apply PATCH_HOME -plan rolling -topology path_to_topology_file -wallet wallet_location -walletPassword password_ifneeded 

For example:

opatchauto apply /home/oracle/patches/15941858 -plan rolling -topology /home/oracle/topologies/topology.xml -wallet /tmp/samplewallet -walletPassword password