edit-icon download-icon

FAQs about changing application configurations

Last Updated: Jan 20, 2018

By default, Container Service will restart or recreate the container on the current machine when you change the application configurations. This is to make sure the local data volumes of the service container on the current machine are not lost. Therefore, if you specify to schedule the container to another machine when changing the configurations, Container Service will ignore your scheduling settings.

If you are sure the service has no local data volumes or the container data in local data volumes can be lost, turn on the Force Reschedule switch. Then, Container Service will schedule the container to another machine according to the scheduling settings in the Template.

Note: Turning on the Force Reschedule switch to schedule the container to another machine will cause the container data in the local data volumes on the current machine to become lost. So proceed with caution.

Example

Assume that your container is deployed on node1.

You specify to schedule the container to node2 (constraint:aliyun.node_index==2) when changing the application configurations as follows:

  1. web:
  2. image: 'nginx:latest'
  3. restart: always
  4. environment:
  5. - 'constraint:aliyun.node_index==2'
  6. ports:
  7. - 80
  8. labels:
  9. aliyun.scale: 1

In this situation:

  • If the Force Reschedule switch is turned off, Container Service will ignore your scheduling settings and still deploys the container on node1.
  • If the Force Reschedule switch is turned on, Container Service will schedule the container to node2. The container data in local data volumes on node1 will be lost.
Thank you! We've received your feedback.