Apply a Patch

put

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/instances/{serviceId}/patches/{patchId}

Applies a patch to an Oracle Java Cloud Service instance.

A patch could be a Patch Set Update (PSU) or a tools patch (patches internal scripts for cloud tools only, not the operating system).

Only apply patches that are approved for Oracle Java Cloud Service. The approved list can be retrieved by getting the list of available patches. See View Available Patches.

Applying other patches manually rather than from an approved PSU or tools patch causes precheck failure and patching to fail. If you have applied other patches manually, remove them before applying an approved patch.

To minimize service disruption, a patch is applied in a rolling pattern, patching a single node at a time. See About Patching and Rollback in Administering Oracle Java Cloud Service.

When applying a patch to a service instance that has Oracle Coherence enabled, by default, the patching process performs a rolling restart of Managed Coherence Servers. Maintaining data is achieved by checking that the StatusHA state for a Coherence member is NODE-SAFE before shutting down the node to apply the patch.

Note: Patching is not supported for Oracle Java Cloud Service instances if you have installed any product that modifies MW_HOME (such as Oracle WebCenter Portal and Oracle Data Integrator). Patching is also not supported if you are reusing a license via the Bring Your Own License (BYOL) entitlement (for any product that modifies MW_HOME). Because patching replaces the contents of MW_HOME, patching prechecks flag this condition and patching fails.

(Not available on Oracle Cloud at Customer) Apply a WebLogic Server software version upgrade patch: A WebLogic Server version upgrade patch is a special Patch Set Update patch identitifed by a patchCategory value of MajorPatch. See View Available Patches.

Currently a WebLogic Server upgrade patch downloads the WebLogic 12.2.1.3 binaries to each virtual machine on the specified Oracle Java Cloud Service instance, then updates Oracle Java Cloud Service to indicate that the upgrade patch has been applied to the service instance. Applying the upgrade patch is one of the prerequisite steps that must be performed before using a manual process to upgrade a service instance from one of the WebLogic Server 12c versions (12.2.1.2, 12.2.1.0 or 12.1.3) or WebLogic Server 11g to WebLogic Server 12c (12.2.1.3). Note that applying the upgrade patch does not perform the actual process of patching and upgrading the WebLogic Server software to the 12.2.1.3 version, which is done later by using the WebLogic Upgrade Assistant. See Upgrade the WebLogic Server Version for an Oracle Java Cloud Service Instance in Administering Oracle Java Cloud Service.

Note the following before applying a WebLogic Server software version upgrade patch:

  • The upgrade patch can only be applied on a service instance that was provisioned using the 17.4.1 or higher release of Oracle Java Cloud Service. To find out whether a service instance was created before release 17.4.1, send a GET REST API request to the service instance (described in View a Service Instance). In the data that the API request returns, search for the line, "provisionEngine":"Metadata_x_y" (for example, "provisionEngine":"Metadata_1_0"). If the line exists, the service instance was created using release 17.4.1 or higher. If the line does not exist, the instance was created using a release before 17.4.1.
  • The upgrade patch can only be applied on a service instance that is running WebLogic Server 12.2.1.2, 12.2.1.0, 12.1.3, or 11g (11.1.1.7).
  • The upgrade patch cannot be applied on a service instance that is configured with Oracle Traffic Director as a load balancer.
  • The upgrade patch cannot be applied on a service instance that is provisioned with Oracle SOA Suite.
Upon successfully applying the upgrade patch on the specified service instance, the WebLogic 12.2.1.3 binaries are downloaded to all virtual machines, under:
  • /u01/app/oracle/middleware/jcs/FMW/12.2.1.3.190115/190115/fmiddleware.zip
  • /u01/jdk/jcs/JDK/8.0.201/190115/jdk.zip

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request can contain additional information about the patch to apply, and how you want to handle StatusHA (if applicable).

(Not available on Oracle Cloud at Customer) When applying a WebLogic Server software version upgrade patch, no parameters are required in the request payload.

Root Schema : patch-request
Type: object
Show Source
  • Free-form text to provide additional information about the patch.
  • Note: Only applicable when a service instance has Oracle Coherence enabled.

    Determines how the script will handle checking for StatusHA. Valid values include:

    • REQUIRE_STATUS_HA: Wait for StatusHA to reach the given state. If the given timeout value is reached before reaching the given state, patching fails. This is the default value.
    • PREFER_STATUS_HA: Wait for StatusHA to reach the given state. If the given timeout value is reached before reaching the given state, patching continues with the possibility of data loss.
    • IGNORE_STATUS_HA: Don't check StatusHA.

  • Note: Only applicable when a service instance has Oracle Coherence enabled.

    Target StatusHA state for the Coherence distributed services. Valid values include:

    • NODE-SAFE (this is the default)
    • MACHINE-SAFE

  • Note: Only applicable when a service instance has Oracle Coherence enabled.

    Number of seconds to wait for StatusHA to reach the given state before timing out. This value defaults to 300 seconds.

Back to Top

Response

Supported Media Types

202 Response

Accepted. See Status Codes for information about other possible HTTP status codes.
Body ()
Root Schema : patch-response
Type: object
The response body includes information about the operation.
Show Source
Nested Schema : details
Type: object
Groups the details of the operation.
Show Source
Back to Top

Examples

The following example shows how to apply a patch to an Oracle Java Cloud Service instance by submitting a PUT request on the REST resource using cURL.

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.

cURL Command

curl -i -X PUT -u username:password -d @patch.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/patches/wls_patch_12.2.1.2.0_170308

Example of Request Body

The following shows an example of the request body for applying a PSU or tools patch. There are no required attributes.

{
   "additionalNote": "Applying a patch set update"
}

The following shows an example using attributes for patching an Oracle Java Cloud Service instance that has a Coherence data tier.

{
   "dgStatusHaState":"NODE-SAFE",
   "dgStatusHaPolicy":"REQUIRE_STATUS_HA",
   "dgStatusHaTimeoutSecs":100,
   "additionalNote":"Applying JDK patch",
}

Example of Response Header

The following shows an example of the response header:

HTTP/1.0 200 Connection established

HTTP/1.1 202 Accepted
Location: https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/JaaS/instances/ExampleInstance/patches/applied/job/4953052
Content-Type: application/json
Date: Mon, 10 Apr 2017 21:20:58 GMT

Example of Response Body

The following are examples of the response body in JSON format.

{
   "status":"Completed",
   "details":
   {
      "message":"PATCHING-5068: Patching service with patch [wls_patch_12.2.1.2.0_170308] is
submitted as an asynchronous job.",
      "jobId":"4953052"
   }
}
{
   "status":"Completed",
   "details":{
      "message":"Patching service with patch [wls_upg_12.2.1.3.190115_for_12cRelease212] is submitted as an asynchronous job.",
      "jobId":"107376"
   }
}
Back to Top