If a host on which your Elastic Compute Service (ECS) instance resides fails or has potential risks, Alibaba Cloud sends a system event to notify you of the situation. When you handle the event, the system restarts the instance by default. If you do not want the instance to automatically restart, you can change the maintenance action for the instance by modifying its maintenance attributes.
Background information
Instance maintenance attributes specify the default actions to take on ECS instances after unexpected or scheduled O&M events occur. You can define the default maintenance action for an instance by modifying its maintenance attributes. For example, you can configure whether to automatically restart or stop an instance in case of an unexpected O&M event. The following table describes the maintenance attributes supported by instances.
You can modify instance maintenance attributes to change the default maintenance action for future operations, but the modified maintenance attributes do not affect operations that are already underway. For example, if you modify the maintenance attributes of an instance that is undergoing an automatic restart, the new maintenance attributes cannot stop the restart operation or change it into a different operation.
Instance maintenance attribute | System event | Supported instance | Description |
Automatically Restart (Default) |
| All instances that support system events. | Restores the instance to the state that it was in before the O&M task related to a system event is executed.
|
Stop |
| All instances that support system events. | Puts the instance into the Stopped state. This maintenance attribute is suitable for scenarios in which failovers or switchovers are performed at the application layer for disaster recovery purposes and to prevent conflicts between multiple nodes in service. |
Automatically Re-deploy |
| Instances that depend on host hardware, such as instances that have local disks attached or that support Software Guard Extensions (SGX) encrypted computing. For information about the instance families in which instances depend on host hardware, see Overview of instance families. Note After an instance is redeployed, the data on its local disks is deleted and SGX is reset. | Redeploys the instance to another host to continue providing services. |
To make better use of instance maintenance attributes, we recommend that you use a variety of methods to improve fault tolerance for your business and reduce the impacts of O&M. Examples:
Configure core applications, such as SAP HANA, to automatically start on system startup to prevent business interruptions.
Enable the automatic reconnection feature for your applications. For example, you can allow applications to automatically connect to MySQL, SQL Server, or Apache Tomcat.
Deploy multiple ECS instances in a cluster if you use Server Load Balancer (SLB). When an ECS instance is being automatically restarted, other ECS instances can continue to provide access to your services.
Back up data on local disks on a regular basis to ensure that redundant data copies are available for you to redeploy instances.
Procedure
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Find the instance whose maintenance attributes you want to modify. Then, use one of the following methods to open the Modify Instance Maintenance Attribute dialog box for the instance.
Method 1: Choose
in the Actions column.Method 2: Click the ID of the instance to go to the Instance Details page. In the upper-right corner of the page, choose
.
In the Modify Instance Maintenance Attribute dialog box, set the Maintenance Action parameter and click OK.
If the instance has only cloud disks attached, you can select one of the following options for Maintenance Action:
Automatically Restart
Stop
If the instance has local disks attached, you can select one of the following options for Maintenance Action:
Automatically Restart
Stop
Automatically Re-deploy
In the Other Information section of the Instance Details tab, view the new Maintenance Attribute settings.