Does Max_Replicas_Per_Node Affect Parallelism in Update_Config?
Problem So Far My Docker-Compse Looks Like This: Services: Nodejs: Deploy: Replicas: 2 Restart_Policy: Condition: Any Placement: Max_Replicas_Per_Node: 1...
Problem
So far my docker-compse looks like this:
services:
nodejs:
deploy:
replicas: 2
restart_policy:
condition: any
placement:
max_replicas_per_node: 1
update_config:
parallelism: 2
delay: 10s
order: start-first
On the first docker stack deploy st my stack looks like this (docker stack ps st modified to fit in):
ID NAME IMAGE NODE DESIRED CURRENT STATE ERROR PORTS
py st_nodejs.1 :latest dev Running Running 13 seconds ago
hq st_nodejs.2 :latest Running Pending 16 seconds ago "no suitable node (max replica…"
Lets say I moved the latest tag in my registry and want to update my service with docker-compse pull && docker stack deploy st. Now my stack looks like this:
ID NAME IMAGE NODE DESIRED CURRENT STATE ERROR PORTS
qh st_nodejs.1 :latest Running Pending 33 seconds ago "no suitable node (max replica…"
py st_nodejs.1 :latest dev Running Running 16 minutes ago
nw st_nodejs.2 :latest Running Pending 33 seconds ago "no suitable node (max replica…"
hq \_ st_nodejs.2 :latest Running Pending 16 minutes ago "no suitable node (max replica…"
Must Read
Question
I think max_replicas_per_node is limiting the update_config.parallelism entry so the result is it can't start a new node, but I did not find any proof about my theory.
Am I right, and is there a better solution?