We have a small swarm with one manager and two worker nodes of which one is DTR. I’m trying to distribute containers on different nodes by setting placement constraints in my yml-file, but I can only start containers on the worker node that is not DTR. When I am setting constraints forcing a container to one of the other nodes, it doesn’t start. If I inspect this container I see that it has a constraint set for “node.labels.com.docker.ucp.collection.system!=true”. Where does it come from, how do I get around this?
The reason for the “node.labels.com.docker.ucp.collection.system!=true” constraint turned out to be a setting in UCP. It is found in the UCP UI under Admin Settings -> Scheduler, there are two checkbox options:
- Allow administrators to deploy containers on UCP managers or nodes running DTR
- Allow Users To Schedule On All Nodes, Including UCP Managers And DTR Nodes.
With both checked the constraint is no longer added.