This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Victor Vieux <[email protected]>
- Loading branch information
Showing
2 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!--[metadata]> | ||
+++ | ||
title = "Docker Swarm recheduling" | ||
description = "Swarm rescheduling" | ||
keywords = ["docker, swarm, clustering, rescheduling"] | ||
[menu.main] | ||
parent="smn_workw_swarm" | ||
weight=5 | ||
+++ | ||
<![end-metadata]--> | ||
|
||
# Rescheduling | ||
|
||
The Docker Swarm scheduler is able to detect node failure and | ||
restart it's container on another node. | ||
|
||
## Rescheduling policies | ||
|
||
The rescheduling policies are: | ||
|
||
* `on-node-faillure` | ||
* `off` (default if not specified) | ||
|
||
|
||
When you start a container, use the env var `reschedule` or the | ||
label `com.docker.swarm.reschedule-policy` to specify the policy to | ||
apply to the container. | ||
|
||
``` | ||
# do not reschedule (default) | ||
$ docker run -d -e reschedule:off redis | ||
# or | ||
$ docker run -d -l com.docker.swarm.reschedule-policy=off redis | ||
``` | ||
|
||
``` | ||
# rechedule on node failure | ||
$ docker run -d -e reschedule:on-node-failure redis | ||
# or | ||
$ docker run -d -l com.docker.swarm.reschedule-policy=on-node-failure redis | ||
``` | ||
|
||
- [Docker Swarm overview](../index.md) | ||
- [Discovery options](../discovery.md) | ||
- [Scheduler filters](filter.md) | ||
- [Swarm API](../api/swarm-api.md) |