You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using docker-compose scale prevents --x-smart-recreate from skipping service #1804
I have the same problem, it seems to be caused by the container_options['environment']['affinity:container'] changing between scaled containers of the same service, which changes the config_hash that triggers a recreate (in service.py):
if previous_container:
container_options['environment']['affinity:container'] = ('=' + previous_container.id)
When you scale with 2, the second container is created with an affinity to the first one, so their config_hash diverge.
I think that's a red herring. The config hash is based solely on the image ID and the service config defined in the YAML file, and shouldn't be affected by the affinity variable.
I think there might be a legit bug here. I was debugging an unrelated issue and I started to see that self.options was being polluted with config-hash when scale is run. Working on a fix.
Activity
lphuberdeau commentedon Aug 3, 2015
In fact, rebuilding all images, even without modifications, worker_b recreates when scale > 1, but not when scale == 1.
thunderk commentedon Aug 26, 2015
I have the same problem, it seems to be caused by the container_options['environment']['affinity:container'] changing between scaled containers of the same service, which changes the config_hash that triggers a recreate (in service.py):
When you scale with 2, the second container is created with an affinity to the first one, so their config_hash diverge.
aanand commentedon Aug 27, 2015
I think that's a red herring. The config hash is based solely on the image ID and the service config defined in the YAML file, and shouldn't be affected by the affinity variable.
dnephin commentedon Aug 27, 2015
I think there might be a legit bug here. I was debugging an unrelated issue and I started to see that
self.optionswas being polluted withconfig-hashwhen scale is run. Working on a fix.Resolves docker#1804
Resolves docker#1804
Resolves docker#1804