title: Multiple label placement constraints in docker swarm
body: <p>When I give multiple label placement constraints and deploy the stack, the services are not running in either of the mentioned constraints.</p>
  
  <p>Ex:</p>
  
  <pre><code>deploy:
      mode: global
      placement: 
          constraints: 
              - node.labels.type == test  
              - node.labels.type == prod
      restart_policy:
          condition: on-failure
  </code></pre>
  
  <p>But if I give only one constraint (any one) then it is working in that label node.</p>
  
  <p>I have seen the same <a href="https://docs.docker.com/compose/compose-file/#placement" rel="nofollow noreferrer">here</a>. The difference is there are two kinds of constraints (node type and label) are used. But I used only one kind (label).</p>
  
  <p>Is it allowed to use same kind of constraints. If it is how to use it.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Ex:</p>
  
  <pre><code>deploy:
      mode: global
      placement: 
          constraints: 
              - node.hostname == server1  
              - node.hostname == server2
      restart_policy:
          condition: on-failure
  </code></pre>
  
  <p>Now this should run the service on both servers. But the service is not at all starting.</p>