Is there a way to specify that a normal service (user stack) can be scheduled as a global service (ie, one on each host)? When I had tcp port mappings in place this was the behavior, but when I removed that I’ve seen some cases where a scale of 3 actually landed all of the containers on the same host, which doesn’t help for high availability. (Especially considering that that host is the Rancher server, so if it goes down, there’s no mechanism that will spin it up on another host.) I also noticed that my loadbalancer stack has 2 containers on one host and 1 on another instead of 1 on each of the 3 nodes.
If you’re using compose, use this label;
service_name: labels: io.rancher.scheduler.global: 'true'
More info here: https://docs.rancher.com/rancher/v1.4/en/cattle/scheduling/
Ok, so that needs to be done at service creation, then, it’s not an option available when upgrading?
Correct, you cannot change the global-ness of an existing service (for some technically good reason that I can’t think of right now).