If an error occurs when you update an application or the application cannot work properly after an update, you can roll back the application, solve the problem, and then update the application again.

Background information

  • Rollback during update: If an error occurs when you perform a single-batch release, phased release, or canary release, you can stop and roll back the application.
  • Rollback after an update: If the application cannot work properly after a single-batch release, phased release, or canary release is completed, you can roll back the application by deploying a historical version.

Rollback during update

If an error occurs when you perform a single-batch release, phased release, or canary release, you can stop and roll back the application. To update applications, you can perform a single-batch release, phased release, or canary release. The following sections describe how to roll back an application during the update process.

  • Roll back an application during a single-batch release

    For information about how to perform a single-batch release, see Use the EDAS console to update an application deployed in an ECS cluster.

    After the single-batch release is enabled, the Change Details page appears. In the upper-right corner of the Change Details page, click Stop Change.

  • Roll back an application during a phased release

    For information about how to perform a phased release, see Release an application in phases in the EDAS console.

    After the phased release is enabled, the Change Details page appears. Rollback methods vary based on phased release modes.
    • Roll back an application during an automatic phased release

      In this scenario, you do not need to manually trigger the release of the next batch. The next batch is automatically released after a specified interval. You can verify the new version of the application during the interval. If you find a problem or exception, you may want to stop the update and roll back the application. In this case, click Stop Change in the upper-right corner of the Change Details page.

    • Roll back an application during a manual phased release

      In this scenario, you must manually start the release of the next batch. Before you start the release of the next batch, you can verify the new version of the application. If you find a problem or exception, you can click Stop Change in the upper-right corner of the Change Details page.

  • Roll back an application during a canary release

    For more information about how to perform a canary release, see Release an application in canary mode in an ECS cluster in the EDAS console.

    After the canary release is enabled, the Change Details page appears. During a canary release, you must manually trigger the release of the next batch. If you find a problem or exception when you verify the new version, you can click Stop Change in the upper-right corner of the Change Details page.

Rollback after an update

If the application cannot work properly after an update, you can roll back the application by deploying a historical version.

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications.
  3. On the Applications page, select a region in the top navigation bar and an option from the Microservice Namespace drop-down list. Select ECS Clusters from the Cluster Type drop-down list. Then, click the name of the required application in the application list.
  4. On the Basic Information page, click Roll Back Application in the upper-right corner.
  5. In the Roll Back Application dialog box, select a historical version from the Deployment Package Version drop-down list, set the parameters, and then click Roll Back Application.
    Rollback after release
    Parameter Description
    Group The group of the application to be rolled back.
    • If the current application has only one group, select All Groups in the drop-down list. The maximum number of instances of the current application is displayed in the bracket after the group. The drop-down list includes Default Group, which is the same as All Groups.
    • If the current application has multiple groups, select a group as needed.
      Note If you select All Groups, the rollback is performed based on the Batches Per Group settings.
    Batches Per Group The number of batches in the group. The minimum number of instances in a single batch is 1. The default number of instances in a single batch is 2. You can specify this parameter based on your business requirements.
    Batch Mode The method that is used to perform the release of the next batch. Valid values: Automatic and Manual.
    • Automatic: The next batch is automatically released based on the Wait Time Before Next Batch parameter.
    • Manual: The next batch is manually released.
    Wait Time Before Next Batch The interval between the release of two batches. Unit: minutes. You can select an interval from the drop-down list based on your business requirements.

Verify results

  1. View change records.
    1. On the application details page, click Change Records in the left-side navigation pane.
    2. On the Change Records page, check whether the value in the Change Status column is Executed.
      • The value Executed indicates that the application is rolled back.
      • The value Executed failed indicates that the application fails to be rolled back. You can click View in the Actions column to view the change details and troubleshoot the problem.
  2. View application details.
    1. On the application details page, click Basic Information in the left-side navigation pane.
    2. On the Basic Information page, click the Basic Information tab. In the Application Information section of the Basic Information tab, check whether the Deployment Package parameter indicates a historical deployment package.
    3. On the Basic Information page, click the Instance Information tab. On the Instance Information tab, check whether the value of the Running Status parameter is Normal.