Configure how your ECS instance responds to system events, such as automatic restart or stop.
Background
The maintenance attribute defines how an ECS instance behaves during scheduled maintenance and unexpected system events, for example, automatically restart or remain stopped. The following table describes the supported attributes.
Changing a maintenance attribute does not affect an ongoing maintenance process. For example, if an instance is already undergoing automatic restart for recovery, modifying its attribute will not stop the restart.
|
Instance maintenance attribute |
Related system events |
Applicable instance types |
Description |
|
Automatically Restart (Default) |
|
All instances that support system events |
The instance returns to its pre-event state:
|
|
Stop |
|
All instances that support system events |
The instance enters the Stopped state. Use this if you have application-level disaster recovery, such as failover or Node Failover, to prevent conflicts from multiple active nodes. |
|
Automatic Redeployment |
|
Only instances that depend on host hardware, such as instances with local disks or SGX encrypted computing. See Instance family. Note
After redeployment, data on local disks is cleared and the SGX feature is reset. |
The instance is automatically redeployed to another host and continues to run. |
To minimize maintenance impact, increase fault tolerance. For example:
-
Add core applications, such as SAP HANA, to the startup list to prevent service interruptions.
-
Enable automatic reconnection in your applications, for example, to MySQL, SQL Server, or Apache Tomcat.
-
If you use SLB, deploy multiple ECS instances in a cluster so that other instances handle requests while one recovers.
-
Regularly back up local disk data to ensure redundancy in case of redeployment.
Procedure
Go to ECS console - Instances.
In the upper-left corner of the page, select a region and resource group.
-
Click the instance ID. On the instance details page, click All Operations, then search for and click .
-
In the Modify Instance Maintenance Attributes dialog box, change the attributes as needed and click OK.
-
If the instance has only cloud disks, select one of the following options:
-
Automatically Restart
-
Stop
-
-
If the instance has local disks, select one of the following options:
-
Automatically Restart
-
Stop
-
Automatic Redeployment
-
-
-
On the Instance Details page, verify the updated Maintenance Attribute in the Other Information section.
