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

Fix rsync failures with several targets #28

Merged
merged 1 commit into from
Jul 19, 2017
Merged

Fix rsync failures with several targets #28

merged 1 commit into from
Jul 19, 2017

Conversation

cyb3rd4d
Copy link

Hello

I encountered an issue with a project installed on 3 servers. With the function "on", the rsync to the remote cache always fails:

00:02 rsync
      01 rsync -e 'ssh -p 225' -e 'ssh -p 222' --recursive --delete --delete-excluded --exclude .git* --exclude .arc* . user…
      01 file has vanished: "/home/user/project/shared/deploy/some-file…
      01 file has vanished: "/home/user/project/shared/deploy/another-file…
    ✔ 01 user@localhost 4.263s
      01 rsync warning: some files vanished before they could be transferred (code 24) at main.c(1183) [sender=3.1.0]

Without the "on" function, iterating over the roles just work:

00:02 rsync
      01 rsync -e 'ssh -p 222' --recursive --delete --delete-excluded --exclude .git* --exclude .arc* . user@server…
    ✔ 01 user@localhost 2.993s
      02 rsync -e 'ssh -p 225' -e 'ssh -p 222' --recursive --delete --delete-excluded --exclude .git* --exclude .arc* . us…
    ✔ 02 kraken@localhost 3.427s
      03 rsync -e 'ssh -p 222' -e 'ssh -p 225' -e 'ssh -p 222' --recursive --delete --delete-excluded --exclude .git* --ex…
    ✔ 03 kraken@localhost 3.290s
      04 rsync -e 'ssh -p 225' -e 'ssh -p 222' -e 'ssh -p 225' -e 'ssh -p 222' --recursive --delete --delete-excluded --ex…

As you can see, the command is built and built again and each time an option "-e 'ssh -p #{port}'" is appended... but it's work.

My stage look like this:

server 'some-ip', port: 222, user: 'user', roles: %w{app nginx}
server 'another-ip', port: 225, user: 'user', roles: %w{app apache}

@Bladrak
Copy link
Owner

Bladrak commented Jul 19, 2017

Thanks for this contribution @MartialGeek seems that is the new capistrano recommended way indeed :)

@Bladrak Bladrak merged commit 2223440 into Bladrak:master Jul 19, 2017
@cyb3rd4d cyb3rd4d deleted the fix-multiple-targets branch July 19, 2017 09:20
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

Successfully merging this pull request may close these issues.

2 participants