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

synchronize: conditional support of -zz instead of --compress in rsync 3.1.1+ #11910

Closed
tima opened this issue Aug 10, 2015 · 1 comment
Closed

synchronize: conditional support of -zz instead of --compress in rsync 3.1.1+ #11910

tima opened this issue Aug 10, 2015 · 1 comment

Comments

@tima
Copy link
Contributor

@tima tima commented Aug 10, 2015

In a private email Giles Orr reports:

I'm using it to set up OpenWRT. In attempting to use the synchronize module, I got the following error:

failed: [owrt -> 127.0.0.1] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/tmp/owrt_git_repo/\" \"root@owrt:/root/bin\"", "failed": true, "rc": 12} msg: rsync: This rsync lacks old-style --compress due to its external zlib. Try -zz. rsync error: syntax or usage error (code 1) at main.c(1554) [server=3.1.1] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]

So I searched synchronize.py and replaced the only occurrence of
"--compress" with "-zz". And it worked. I note that on github,
ansible-modules-core/files/synchronize.py still includes "--compress".

This message was passed along to @abadger who says:

So I just looked at the man page and it looks like -zz wasn't implemented until 3.1.1 (there's some room for interpretation of whether the option might be accepted earlier but not do anything, we'd have to check if we want to go further into this.) Since rhel6 is on a 3.0 version of rsync, I don't think we can just replace it. Maybe we can detect the error and try the alternation cli argument?

Workaround: Turn off the compress feature in the synchronize module with compress=no and pass -zz using the rsync_opts.

@tima
Copy link
Contributor Author

@tima tima commented Dec 20, 2016

Until the -zz option is more widespread the aforementioned workaround should be used. Will revisit if the issue becomes more widespread.

wontfix

@tima tima closed this Dec 20, 2016
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants