add placement pref note about null labels (#5250)

This commit is contained in:
Bret Fisher 2017-11-10 17:05:34 -05:00 committed by Misty Stanley-Jones
parent 8f87edefb3
commit 06e64aaefe
1 changed files with 10 additions and 0 deletions

View File

@ -646,6 +646,16 @@ $ docker service create \
redis:3.0.6
```
> Missing or null labels
>
> Nodes which are missing the label used to spread will still receive
> task assignments. As a group, these nodes will receive tasks in equal
> proportion to any of the other groups identified by a specific label
> value. In a sense, a missing label is the same as having the label with
> a null value attached to it. If the service should **only** run on
> nodes with the label being used for the the spread preference, the
> preference should be combined with a constraint.
You can specify multiple placement preferences, and they are processed in the
order they are encountered. The following example sets up a service with
multiple placement preferences. Tasks are spread first over the various