edit-icon download-icon

Container rescheduling

Last Updated: Nov 14, 2017

Container Service supports rescheduling Docker containers. When a node is invalid, the container can be automatically scheduled to other available node for operation.

By default, container rescheduling is disabled. If needed, you can enable the container rescheduling.

Container Service provides a container rescheduling policy that is compatible with Docker Swarm. You can enable container rescheduling by using environment variable or label.

Environment variable:

  1. redis:
  2. image: redis
  3. environment:
  4. - reschedule:on-node-failure

Label:

  1. web:
  2. image: nginx
  3. restart: always
  4. environment:
  5. - aaaaa=aaaaa
  6. labels:
  7. aliyun.scale: "3"
  8. com.docker.swarm.reschedule-policies: "[\"on-node-failure\"]"

Note: After the container is rescheduled, use the Docker file volume that supports data migration or sharing if you need to recover the persistent status required by the Docker container.

Thank you! We've received your feedback.