patch Commands

Use commands with the patch keyword to apply or rollback one-off patches to the specified working copy using the in-place patching method.

rhpctl apply patch

Applies one-off patches to the specified working copy using in-place patching method.

Syntax

rhpctl apply patch -workingcopy workingcopy_name
  [-image image_name | -patchloc patch_location_on_target] [-online [-dbname unique_db_name]]
  [-eval] [-targetnode target_node_name {-root | -cred cred_name | -sudouser sudo_username
  -sudopath path_to_sudo_binary | -auth plugin_name [-arg1 name1:value1
  [-arg2 name2:value2 ...]]}] [-schedule timer_value] [-jobtag tag_name]

Parameters

Table A-52 rhpctl apply patch Command Parameters

Parameter Description
-workingcopy workingcopy_name

Specify a name for the working copy that you want to patch.

-image image_name

Specify the name of a configured image that you want to patch.

-patchloc patch_location_on_target

Specify the absolute path for the unzipped patch directory on the target.

-online Specify this parameter to indicate that the patch type is online.
-dbname unique_db_name

Specify the unique name of the database (DB_UNIQUE_NAME without DB_DOMAIN) that you are patching.

–eval

Optionally, you can use this parameter to evaluate the impact of this command on the system without actually running the command.

-targetnode target_node_name

Specify the name of an rhpclient-less target.

-root | -cred cred_name | -sudouser sudo_user_name -sudopath sudo_binary_location | -auth plugin_name plugin_args

If you choose to use the -targetnode parameter, then you must choose either root, a credential name, sudo, or an authentication plugin to access the remote node.

Choose -root to perform super user operations as root. Alternatively, you can choose either to specify a credential name to associate the user name and password credentials to access a remote node, to perform super user operations as a sudo user by specifying a sudo user name and the path to the sudo binary, or to use an authentication plugin to access the remote node.

-schedule timer_value
Optionally, you can use this parameter to schedule a time to run this operation, in ISO-8601 format, as in the following example:
2024-04-15T19:13:17+05

If NOW is specified or the option is omitted, then the job is scheduled immediately.

If PAUSE is specified, then the job starts in the paused state and you need to resume the job using the rhpctl resume job -jobid job_id command.

-jobtag tag_name

Optionally, you can associate a user-defined tag with the scheduled jobs.

Examples

To patch a working copy on a client cluster:

rhpctl apply patch -workingcopy workingcopy_name -image image_name -online

rhpctl rollback patch

Rolls back the specified patch in the specified working copy.

Syntax

rhpctl rollback patch -patchid patch_id -workingcopy workingcopy_name
  [-online [-dbname unique_db_name]] [-targetnode target_node_name {-root | -cred cred_name 
  | -sudouser sudo_username -sudopath path_to_sudo_binary | -auth plugin_name 
  [-arg1 name1:value1 [-arg2 name2:value2 ...]]}] 
  [-schedule timer_value] [-jobtag tag_name]

Parameters

Table A-53 rhpctl rollback patch Command Parameters

Parameter Description
-patchid patch_id

Specify the patch ID for the patch that you want to roll back.

-workingcopy workingcopy_name

Specify a name for the working copy from which you want to rollback the patch.

-online Specify this parameter to indicate that the patch type is online.
-dbname unique_db_name

Specify the unique name of the database (DB_UNIQUE_NAME without DB_DOMAIN) from which you want to rollback the patch.

-targetnode target_node_name

Specify the name of an rhpclient-less target.

-root | -cred cred_name | -sudouser sudo_user_name -sudopath sudo_binary_location | -auth plugin_name plugin_args

If you choose to use the -targetnode parameter, then you must choose either root, a credential name, sudo, or an authentication plugin to access the remote node.

Choose -root to perform super user operations as root. Alternatively, you can choose either to specify a credential name to associate the user name and password credentials to access a remote node, to perform super user operations as a sudo user by specifying a sudo user name and the path to the sudo binary, or to use an authentication plugin to access the remote node.

-schedule timer_value
Optionally, you can use this parameter to schedule a time to run this operation, in ISO-8601 format, as in the following example:
2024-04-15T19:13:17+05

If NOW is specified or the option is omitted, then the job is scheduled immediately.

If PAUSE is specified, then the job starts in the paused state and you need to resume the job using the rhpctl resume job -jobid job_id command.

-jobtag tag_name

Optionally, you can associate a user-defined tag with the scheduled jobs.

Examples

To rollback a patch from a working copy on a client cluster:

rhpctl rollback patch -patchid patch_id -workingcopy workingcopy_name -online