If an error occurs when you update an application or the application cannot work properly after 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 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 Upgrade an application hosted on ECS clusters in the EDAS console.

    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 Use the EDAS console to release an application hosted on ECS clusters in stages.

    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 Canary release for ECS clusters.

    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 update

If the application cannot work properly after 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 select a namespace from the Namespace drop-down list. From the Cluster Type drop-down list, select ECS Cluster. Then, click the required application name 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: automatically performs the release of the next batch based on the Wait Time Before Next Batch parameter.
    • Manual: manually triggers the release of the next batch.
    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 the result

  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.