Skip to content

Commit 7ceca23

Browse files
Merge pull request #273627 from ApnaLakshay/prepost-changes-as-per-css
Prepost changes as per css
2 parents 05bbf5d + 1e85b85 commit 7ceca23

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

articles/update-manager/manage-pre-post-events.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,20 @@ For example, if a maintenance schedule is set to start at **3:00 PM**, with the
3333

3434
| **Time**| **Details** |
3535
|----------|-------------|
36-
|2:19 PM | You can edit the machines and/or dynamically scope the machines up to 40 minutes before a scheduled patch run with an associated pre event. After this time, the resources will be included in the subsequent schedule run and not the current run. </br> **Note**</br> If you're creating a new schedule or editing an existing schedule with a pre event, you need at least 40 minutes prior to the maintenance window for the pre event to run. </br></br> In this example, if you have set a schedule at 3:00 PM, you can modify the scope 40 mins before the set time that is at, 2.19 PM. |
37-
|2:30 PM | The pre event has 20 mins to complete before the patch installation begins to run. </br></br> In this example, the pre event is initiated at 2:30 PM. |
38-
|2:50 PM | The pre event has 20 mins to complete before the patch installation begins to run. </br> **Note** </br> - If the pre event continues to run beyond 20 mins, the patch installation goes ahead irrespective of the pre event run status. </br> - If you choose to cancel the current run, you can cancel using the cancelation API 10 mins before the schedule. In this example, by 2:50 PM you can cancel either from your script or Azure function code. </br> If cancelation API fails to get invoked or hasn't been set up, the patch installation proceeds to run. </br> </br> In this example, the pre event should complete the tasks by 2:50 PM. If you choose to cancel the current run, the latest time that you can invoke the cancelation API is by 2:50 PM. |
36+
|2:19 PM | You can edit the machines and/or dynamically scope the machines up to 40 minutes before a scheduled patch run with an associated pre event. If any changes are made to the resources attached to the schedule after this time, the resources will be included in the subsequent schedule run and not the current run. </br> **Note**</br> If you're creating a new schedule or editing an existing schedule with a pre event, you need at least 40 minutes prior to the maintenance window for the pre event to run. </br></br> In this example, if you have set a schedule at 3:00 PM, you can modify the scope 40 mins before the set time that is at, 2.19 PM. |
37+
|Between 2:20 to 2:30 PM | The pre event is triggered giving atleast 20 mins to complete before the patch installation begins to run. </br></br> In this example, the pre event is initiated between 2:20 to 2:30 PM.|
38+
|2:50 PM | The pre event has atleast 20 mins to complete before the patch installation begins to run. </br> **Note** </br> - If the pre event continues to run beyond 20 mins, the patch installation goes ahead irrespective of the pre event run status. </br> - If you choose to cancel the current run, you can cancel using the cancelation API 10 mins before the schedule. In this example, by 2:50 PM you can cancel either from your script or Azure function code. </br> If cancelation API fails to get invoked or hasn't been set up, the patch installation proceeds to run. </br> </br> In this example, the pre event should complete the tasks by 2:50 PM. If you choose to cancel the current run, the latest time that you can invoke the cancelation API is by 2:50 PM. |
3939
|3:00 PM | As defined in the maintenance configuration, the schedule gets triggered at the specified time. </br> In this example, the schedule is triggered at 3:00 PM. |
4040
|6:55 PM | The post event gets triggered after the defined maintenance window completes. If you have defined a shorter maintenance window of 2 hrs, the post maintenance event will trigger after 2 hours and if the maintenance schedule is completed before the stipulated time of 2 hours that is, in 1 hr 50 mins, the post event will start. </br></br> In this example, if the maintenance window is set to the maximum, then by 6:55 PM the patch installation process is complete and if you have a shorter maintenance window, the patch installation process is completed by 5:00 PM. |
4141
|7:15 PM| After the patch installation, the post event runs for 20 mins. </br>In this example, the post event is initiated at 6:55 PM and completed by 7:15 PM and if you have a shorter maintenance window, the post event is triggered at 5:00 PM and completed by 5:20 PM. |
4242

43-
>[!IMPORTANT]
44-
> Make sure to have atleast 40 minutes before the scheduled maintenance run time (3:00 PM in above example) otherwise it might lead to auto-cancellation of that particular scheduled run.
43+
44+
We recommend that you are watchful of the following:
45+
+ If you're creating a new schedule or editing an existing schedule with a pre event, you need at least 40 minutes prior to the start of maintenance window (3PM in the above example) for the pre event to run otherwise it will lead to auto-cancellation of the current scheduled run.
46+
+ Pre event is triggered 30 minutes before the scheduled patch run giving pre event atleast 20 minutes to complete.
47+
+ Post event runs immediately after the patch installation completes.
48+
+ To cancel the current patch run, use the cancellation API atleast 10 minutes before the schedule maintenance time.
49+
4550

4651
## Configure pre and post events on existing schedule
4752

@@ -61,6 +66,7 @@ You can configure pre and post events on an existing schedule and can add multip
6166
1. On the **Create Event Subscription** page, enter the following details:
6267
- In the **Event Subscription Details** section, provide an appropriate name.
6368
- Keep the schema as **Event Grid Schema**.
69+
- In the **Topic Details** section, provide an appropriate name to the **System Topic Name**.
6470
- In the **Event Types** section, **Filter to Event Types**, select the event types that you want to get pushed to the endpoint or destination. You can select between **Pre Maintenance Event** and **Post Maintenance Event**.
6571
- In the **Endpoint details** section, select the endpoint where you want to receive the response from. It would help customers to trigger their pre or post event.
6672

@@ -70,6 +76,7 @@ You can configure pre and post events on an existing schedule and can add multip
7076

7177
> [!NOTE]
7278
> - The pre and post event can only be created at a scheduled maintenance configuration level.
79+
> - System Topic gets automatically created per maintenance configuration and all event subscription are linked to the System Topic in the EventGrid.
7380
> - The pre and post event run falls outside of the schedule maintenance window.
7481
7582
## View pre and post events
@@ -100,6 +107,9 @@ To delete pre and post events, follow these steps:
100107

101108
:::image type="content" source="./media/manage-pre-post-events/delete-event-inline.png" alt-text="Screenshot that shows how to delete the pre and post events." lightbox="./media/manage-pre-post-events/delete-event-expanded.png":::
102109

110+
> [!NOTE]
111+
> - If all the pre and post events are deleted from the maintenance configuration, System Topic gets automatically deleted from the EventGrid.
112+
> - We recommend that you avoid deleting the System Topic manually from the EventGrid service.
103113
104114
## Cancel a schedule from a pre event
105115

@@ -131,13 +141,17 @@ The following query allows you to view the list of VMs for a given schedule or a
131141
```kusto
132142
maintenanceresources
133143
| where type =~ "microsoft.maintenance/maintenanceconfigurations/applyupdates"
134-
| where properties.correlationId has "/subscriptions/<your-s-id> /resourcegroups/<your-rg-id> /providers/microsoft.maintenance/maintenanceconfigurations/<mc-name> /providers/microsoft.maintenance/applyupdates/"
144+
| where properties.correlationId has "/subscriptions/your-s-id/resourcegroups/your-rg-id/providers/microsoft.maintenance/maintenanceconfigurations/mc-name/providers/microsoft.maintenance/applyupdates/"
135145
| order by name desc
136146
```
137147

138-
:::image type="content" source="./media/manage-pre-post-events/cancelation-api-user-inline.png" alt-text="Screenshot for cancelation done by the user." lightbox="./media/manage-pre-post-events/cancelation-api-user-expanded.png" :::
148+
:::image type="content" source="./media/manage-pre-post-events/cancelation-api-user-inline.png" alt-text="Screenshot for cancelation done by the user." lightbox="./media/manage-pre-post-events/cancelation-api-user-expanded.png" :::
149+
150+
+ `your-s-id` : Subscription ID in which maintenance configuration with Pre or post event is created
151+
+ `your-rg-id` : Resource Group Name in which maintenance configuration is created
152+
+ `mc-name` : Name of maintenance configuration in pre event is created
139153

140-
If the maintenance job is canceled by the system due to any reason, the error message in the JSON is obtained from the Azure Resource Graph for the corresponding maintenance configuration would be **Maintenance schedule canceled due to internal platform failure**.
154+
If the maintenance job is canceled by the system due to any reason, the error message in the JSON is obtained from the Azure Resource Graph for the corresponding maintenance configuration would be **Maintenance schedule canceled due to internal platform failure**.
141155

142156
#### Invoke the Cancelation API
143157

articles/update-manager/pre-post-scripts-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The pre and post events in Azure Update Manager allow you to perform certain tas
1919

2020
The pre-events run before the patch installation begins and the post-events run after the patch installation ends. If the VM requires a reboot, it happens before the post-event begins.
2121

22-
Update Manager uses [Event Grid](../event-grid/overview.md) to create and manage pre and post events on scheduled maintenance configurations. In the Event Grid, you can choose from Azure Webhooks, Azure Functions, Storage accounts, and Event hub to trigger your pre and post activity. If you're using pre and post events in Azure Automation Update management and plan to move to Azure Update Manager, we recommend that you use Azure Webhooks linked to Automation Runbooks.
22+
Update Manager uses [Event Grid](../event-grid/overview.md) to create and manage pre and post events on scheduled maintenance configurations. In the Event Grid, you can choose from Azure Webhooks, Azure Functions, Storage accounts, and Event hub to trigger your pre and post activity. **If you're using pre and post events in Azure Automation Update management and plan to move to Azure Update Manager, we recommend that you use Azure Webhooks linked to Automation Runbooks.**
2323

2424
## User scenarios
2525

@@ -55,6 +55,6 @@ The following are the scenarios where you can define pre and post events:
5555

5656
## Next steps
5757

58-
- Troubleshoot issues, see [Troubleshoot Update Manager](troubleshoot.md).
5958
- Manage the [pre and post maintenance configuration events](manage-pre-post-events.md)
59+
- Troubleshoot issues, see [Troubleshoot Update Manager](troubleshoot.md).
6060
- Learn on the [common scenarios of pre and post events](pre-post-events-common-scenarios.md)

0 commit comments

Comments
 (0)