Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose Reschedule problems #3378

Closed
vfarcic opened this issue Apr 26, 2016 · 5 comments
Closed

Docker Compose Reschedule problems #3378

vfarcic opened this issue Apr 26, 2016 · 5 comments

Comments

@vfarcic
Copy link

vfarcic commented Apr 26, 2016

Is the new Swarm reschedule feature working with Docker Compose? If it is, what should be the syntax?

I tried the following:

docker-compose \
    -f docker-compose-demo.yml \
    -p books-ms \
    up -d app

docker-compose \
    -f docker-compose-demo.yml \
    -p books-ms \
    scale app=3

docker-machine rm -f swarm-node-2

docker logs swarm-agent-master

The logs output is:

time="2016-04-26T01:50:41Z" level=info msg="Removed Engine swarm-node-2" 
time="2016-04-26T01:50:41Z" level=info msg="Rescheduled container 25384fd14b052c67066c4073ca990205c402c3c6450cae642a624b78c0f1eb62 from swarm-node-2 to swarm-node-1 as 554576586a25ed1e1cb2282e9139e84e38b8d8b9704db92c7fd7d9d53a200f78" 
time="2016-04-26T01:50:41Z" level=info msg="Container 25384fd14b052c67066c4073ca990205c402c3c6450cae642a624b78c0f1eb62 was running, starting container 554576586a25ed1e1cb2282e9139e84e38b8d8b9704db92c7fd7d9d53a200f78" 
time="2016-04-26T01:50:41Z" level=error msg="Failed to start rescheduled container 554576586a25ed1e1cb2282e9139e84e38b8d8b9704db92c7fd7d9d53a200f78: 500 Internal Server Error: service endpoint with name booksms_app_3 already exists\n" 
time="2016-04-26T01:51:02Z" level=error msg="HTTP error: No such container booksms_app_4" status=404 

The compose file is in https://gist.github.com/vfarcic/02cf5809efe84b82c9ca73180b50c66f .

@vfarcic
Copy link
Author

vfarcic commented Apr 26, 2016

This is probably the same problem as docker-archive/classicswarm#2133.

@dnephin dnephin added the swarm label Apr 29, 2016
@igrcic
Copy link

igrcic commented May 23, 2016

Hi Viktor,

i was just testing the same feature here. I have copied the config snippet from your dockerfile

    environment:                                                                                                                                                                                                                                                                                                                                                            
      - reschedule=on-node-failure                                                                                                                                                                                                                                                                                                                                          
    labels:                                                                                                                                                                                                                                                                                               
      com.docker.swarm.reschedule-policies: "[\"on-node-failure\"]

It is working as it should for me:

time="2016-05-23T09:40:13Z" level=error msg="Flagging engine as unhealthy. Connect failed 3 times" id="..." name=host1
time="2016-05-23T09:40:13Z" level=info msg="Rescheduled container ...from host1 to host2 as new_id" 
time="2016-05-23T09:40:18Z" level=info msg="Removed Engine host1" 
l$ docker --version                                                                                                                                                                                                                                                                                                                      
Docker version 1.11.1, build 5604cbe

Server Version: swarm/1.2.2

@igrcic
Copy link

igrcic commented May 23, 2016

Hmm, for some reason container was started but in docker ps STATUS was left in "create". I had to do docker start in order for a container to change the status to "up".

@igrcic
Copy link

igrcic commented May 23, 2016

Ah didnt see you have already linked it with #2133 - problem with overlay network.

@ijc
Copy link

ijc commented May 21, 2019

Issue grooming: I'm sorry this issue didn't garner more attention at the time. I think after nearly 3 years it is likely to be obsolete so I am going to close.

@ijc ijc closed this as completed May 21, 2019
milas pushed a commit to milas/compose that referenced this issue Feb 24, 2023
KDE's text editor, kate, uses a file similar to Vim's .swp files. Ignore
these files so we don't rebuild on every keypress.

Fixes docker#3378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants