Creating Patch Repair Tasks
Scenarios
After patch scanning is performed on an instance, the scanning result displays the non-compliance status of the instance patch. If there are non-compliant patches, you can repair the patches on the target instance.
Multiple OSs, such as EulerOS and CentOS, are supported. You can scan and repair patches based on the default patch baseline that matches the OS of the selected instance. Before repairing patches, ensure that the corresponding default patch baseline has been created. For details about how to create a patch baseline, see Managing Patch Baselines.
Creating a Patch Repair Task
- Log in to COC.
- In the navigation pane on the left, choose Resource O&M > Automated O&M.
- In the Routine O&M area, click Patch Management.
- On the Patch Scanning tab page, select the resource type of the instance whose patch needs to be repaired.
By default, ECS is selected.
- Locate the target instance and click Repair in the Operation column.
- Set parameters in the Execution Account & Region area.
- Execution Type: Single or Cross Account.
- Single: Execute this job only under the current account.
- Cross Account: Execute this job using multiple organization member accounts.
- To use this function, you need to add the account to the organization, configure the agency permissions, and enter the agency name in advance. For details, see Cross-Account Management.
- Execution Type: Single or Cross Account.
- Set parameters in the Scheduled Task area.
- Execution Mode: Execute immediately or Scheduled execution.
- Execute immediately: Execute the scanning task immediately after it is created.
- Scheduled execution: Configure the scheduled task details.
Table 1 Scheduled task parameters Parameter
Description
Time Zone
Select the time zone where the scheduled task is executed from the drop-down list.
Timing Type
Select a timing type.
- Single execution: A scheduled task is executed once at a specified time.
- Periodic execution: A task is periodically executed based on the specified rule until the rule expires.
Execution Time
It is used together with the timing type.
- For a single execution, set this parameter to the execution time.
- For periodic execution, select either of the following options:
- Simple: Select the execution time by week.
- Cron: Set the execution time using a cron expression. For details, see Using Cron Expressions.
Rule Expired
This parameter needs to be set when Timing Type is set to Periodic execution.
Enter the end time of the periodic execution rule.
Notification Policy
Select Start of execution, Execution failed, or Execution succeeded. Multiple options can be selected.
Recipient
Select Shift or Individual.- Shift: Select a scenario and role from the drop-down lists based on the configured values. For details about how to configure a shift, see Shift Schedule Management.
- Individual: Select a reviewer. For details about how to configure a reviewer, see O&M Engineer Management.
Notification Mode
Select a notification channel from the drop-down list box.- Default: Same as that selected in the reviewer subscription function. For details about how to set the default notification mode, see Selecting a Notification Method.
- SMS, WeCom, DingTalk, Lark, and Email: Notifications are sent based on the information reserved by the reviewer. For details about how to set the reviewer information, see Modifying Personnel Information.
- Execution Mode: Execute immediately or Scheduled execution.
- Configure the basic information.
If Execution Mode is set to Execute immediately, set the parameters by referring to Table 2. If Execution Mode is set to Scheduled execution, set the parameters by referring to Table 3.
Table 2 Basic information for immediate execution Parameter
Description
Executed By
The preset value is root and cannot be changed.
Timeout Interval
Maximum duration for scanning. The value is 1,800 seconds by default
Table 3 Basic information for scheduled execution Parameter
Description
Task Name
You are advised to name the task based on the application scenario.
The value can contain 3 to 100 characters, including letters, digits, hyphens (-), and underscores (_).
Enterprise Project
Select an enterprise project from the drop-down list.
Version
Enter a version. The default version is 1.0.0.
IAM Agency
Select an agency from the drop-down list. If the selected agency does not have required permissions, task execution will fail and you need to select another agency or create one.
- Set Repair Resources.
- Resources: Click Add. On the displayed page, select the target instances.
- Batch Policy: Select Automatic, Manual, or No Batch.
- Automatic: The selected instances to be executed are automatically divided into multiple batches based on the preset rule.
- Manual: You can manually create multiple batches (the selected target instances should be more than the batch number) and add the selected instances to each batch as required.
- No Batch: All instances will be executed in the same batch.
- Suspension Policy:
- You can set the execution success rate. When the number of failed hosts reaches the number failed ones that are calculated based on the execution success rate, the service ticket status becomes abnormal and the service ticket stops being executed.
- The success rate ranges from 0 to 100 and supports accuracy up to one decimal place.
- Allow Restart: Some patches require a restart to take effect. If you choose not to restart, you will need to schedule a restart at a later time.
- Click OK to go to the Confirm Execution page. Click OK to start the execution.
- Perform the following operations to check whether a service ticket execution is complete.
- For the service tickets that are being executed:
- If you want to pause the next batch when the current batch is executed, click Pause in the upper right corner.
- If you want to continue the paused batch, click Continue in the upper right corner.
- If you want to stop the service ticket that is about to be executed or is abnormal, click Forcibly End.
- For the service tickets that are executed:
- If some or all instance tasks in the service tickets are executed abnormally:
- Click the Abnormal tab in the Execution Information area. Locate an abnormal batch and click Retry in the Operation column.
- Click the Abnormal tab in the Execution Information area. Locate an abnormal batch and click Cancel in the Operation column.
- If all instance tasks are successfully executed, click Compliance Report in the upper right corner to view the patch repair result.
- If some or all instance tasks in the service tickets are executed abnormally:
- For the service tickets that are being executed:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot