Use this method to run a script on all or some of the Linux-based nodes with an optional reboot and an optional verification script.
CAUTION:PowerFlex Manager is required to perform run script on host operation. A target script is run without validation or verification.
The script files must be stored in the folder node folder:
/opt/emc/scaleio/lia/bin. The script file used to run script on host operation must be named as
patch_script.
If verification is required, a script to verify the work can be written and named
verification_script.
The filenames are hard-coded and cannot be changed:
patch_script and
verification_script. The scripts are required to have these names. Alternatively, they can be uploaded by PowerFlex Manager to the PowerFlex node.
To copy the script file onto the block-legacy-gateway pods, use the kubectl cp command from any of the PowerFlex management platform hosts or VMs.
The scripts can be either taken from a gateway local folder or downloaded from HTTP or HTTPS share.
A list of SdsIds or mdmIds can be provided to explicitly choose the PowerFlex nodes to run on.
API command
Required parameters
Optional parameters
/im/types/Configuration/actions/liaRunOsPatching
NOTE:Before running the liaRunOsPatching command, log in to PowerFlex and get the system configuration. For more information, see the example workflow below.
Either one of the following parameters is mandatory:
pdIds: Run on all PowerFlex nodes that are part of the following protection domains (PD Ids), in decimal format
fsIds: Run on all PowerFlex nodes that are part of the following fault sets (FS Ids), in decimal format
sdsIds: Run on all SDSs listed by Ids, in decimal format
mdmIds: Run on all MDMs listed by Ids, in decimal format
executeOnAllSdss: Run on all SDSs (true/false)
executeOnAllMdms: Run on all MDMs (true/false)
isRebootRequired: Indicates if each node reboot required after running the patch script (values: true/false)
NOTE:In earlier PowerFlex 4.x versions, all nodes running PowerFlex management platform processes will be skipped for reboots. The action must be performed manually.
isVerificationScriptRequired: Indicates if the verification script is run on each node (values: true/false)
isRunningInParallelOnPds: Indicates if the operation is run in a parallel way on nodes that belong to different PDs (values: true/false)
isStopProcessingOnScriptFailure: Indicates if the entire operation must be stopped if there is a script failure (values: true/false
TimeoutMs: Indicates timeout value for running the patch script in milliseconds
isUploadFileNeeded: Indicates if the gateway upload scripts to the PowerFlex nodes (values: true/false)
The following fields are relevant when isUploadFileNeeded is true:
patchScriptFilePath: Either the local folder name or an http/https URL of the patch script
verificationScriptFilePath: Either the local folder name or an http/https URL of the verification script
maintenanceModeType: Maintenance Mode type (values: IMM/PMM)
verificationScriptTimeoutSec: Verification script timeout in seconds
rebootTimeoutSec: Node reboot timeout in seconds
The following are the example commands used during run script on host process:
Obtain an access token from the PowerFlex Manager instance. The easiest method is to create a shell script that can be sourced to add the proper variables to the user environment
NOTE:The expiration time for access token is five minutes. If required, the above file can be sourced to refresh all variables.
Get the JSON of a system configuration, which will be the payload of the patch command (need to replace liaPassword and mdmPassword manually from null to some string).
Create and save a JSON file like the following, replacing MDM addresses, MDM user, and MDM password with the appropriate values.