psm analytics patch

Use this command to apply a patch a service created with Oracle Analytics Cloud - Classic.

Syntax

In the following syntax, line breaks have been added for clarity. Don’t include them when entering the command.

psm analytics patch -s|--service-name serviceName 
  -p|--patch-id patchId  
    [-n|--additional-note free form note text]  
    [-h|--dg-status-ha-policy REQUIRE_STATUS_HA | PREFER_STATUS_HA | IGNORE_STATUS_HA] 
    [-g|--dg-status-ha-state NODE-SAFE | MACHINE-SAFE]
    [-t|--dg-status-ha-timeout-secs nnn]
    [-of|--output-format json|html|short]

Parameters

All parameters are required unless otherwise noted.

Parameter Description
-s|--service-name Specifies the name of the service.
-p|--patch-id String that identifies the patch. To retrieve the patch ID, use the analytics available—patches command.
-n|--additional-note (Optional) Free-form text to provide additional information about the patch.
-h|--dg-status-ha-policy (Optional) Determines how the script handles checking for StatusHA. Accepted values are:
  • 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.

  • 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.

Default: REQUIRE_STATUS_HA

This command is applicable only for a service running with Oracle Coherence enabled.

-g|--dg-status-ha-state (Optional) Applicable only for a service that has Oracle Coherence enabled. Target StatusHA state for the Coherence distributed services. Accepted values are:
  • NODE-SAFE

  • MACHINE-SAFE

Default:: NODE-SAFE

-t|--dg-status-ha-timeout-secs (Optional) Number of seconds to wait for StatusHA to reach the given state before timing out.

Default: 300 seconds

This command is applicable only for a service running with Oracle Coherence enabled.

-of|--output-format (Optional) Desired output format.

Accepted values: json, html, short

Example

$ psm analytics patch -s Example1Instance -p Test_Patch_12.2.1.0.160119 -n Patch-cli-test 
{
    "details":{
        "jobId":"34184",
        "message":"ANALYTICS-PATCHING-5068: Patching service with patch [Test_Patch_12.2.1.0.160119] is submitted as an asynchronous job."
    },
    "status":"Completed"
}
Job ID : 34184

Note that this command returned a job ID. To see the status of your patch operation, use this ID with the psm analytics operation-status command:

$ psm analytics operation-status -j 34184

When you see the message:

 "operationId":364,
 "operationType":"PATCH",
 "serviceId":364,
 "serviceName":"Example1Service",
 "serviceType":"analytics",
 "startDate":"2016-04-28T17:39:41.618+0000",
 "status":"SUCCEED",
 "summaryMessage":"PATCH"

the service was successfully patched.