If a host has a potential risk or fails, Alibaba Cloud notifies you with a system event. When you respond to the event, the ECS instance restarts by default. If you do not want the instance to restart automatically, change its maintenance attributes.
Background information
Instance maintenance attributes specify the default behavior of an ECS instance after unexpected or scheduled O&M events. Modify the instance maintenance attributes to define this default behavior. For example, configure whether to automatically restart or stop an instance after an unexpected O&M event. The following table describes the supported maintenance attributes.
You can customize instance maintenance attributes, but this does not affect processes that are in progress. For example, if an instance is in an automatic restart and recovery process, modifying its maintenance attributes cannot stop the restart or change the action.
Instance maintenance attribute | Related system events | Applicable instance types | Description |
Automatic restart for recovery (Default) |
| All instances that support system events. | The instance returns to its state before the O&M task was executed:
|
Restart recovery is disabled. |
| All instances that support system events. | The instance enters the Stopped state. This attribute is suitable when you have implemented disaster recovery mechanisms, such as failover or node failover, at the application layer. This avoids conflicts that can occur when multiple nodes provide services at the same time. |
Automatic redeployment |
| Only instances that depend on host hardware, such as instances that have local disks attached or support Software Guard Extensions (SGX) encrypted computing. For information about the related instance families, see Instance family. Note After an instance is redeployed, data on its local disks is cleared, and the SGX feature is reset. | The instance is automatically redeployed to another host and then continues to provide services. |
To take full advantage of instance maintenance attributes, use multiple methods to improve business fault tolerance and reduce the impact of O&M operations. For example:
Add your core applications, such as SAP HANA, to the startup list to avoid business interruptions.
Enable the automatic reconnection feature for your applications. For example, allow applications to automatically connect to MySQL, SQL Server, or Apache Tomcat.
If you use Server Load Balancer (SLB), deploy multiple ECS instances in a cluster. When one ECS instance is being automatically recovered, the other ECS instances can continue to provide access to your services.
Regularly back up data on local disks for data redundancy and to provide the data files required for instance redeployment.
Procedure
Go to ECS console - Instances.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Click the ID of the target instance. On the instance details page, click All Actions. Then, search for and click .
In the Modify Instance Maintenance Attribute dialog box, change the attributes as needed. Then, click OK.
If the instance has only cloud disks attached, select one of the following options:
Automatic restart for recovery
Prevent Resuming After Restart
If the instance has local disks attached, select one of the following options:
Automatic restart for recovery
Disable recovery on restart
Automatic redeployment
On the Instance Details page, in the Other Information section, verify the updated Maintenance Attribute.
