Commit Graph

80 Commits

Author SHA1 Message Date
Brian Cain cc14b43a96
Ensure `tmpdir` is loaded for rsync helper class 2018-10-11 09:57:20 -07:00
Brian Cain cb0bd89ae1
Fixes #10289: Create proper tmp dir for ControlPath
Prior to this commit, when creating the ControlPath tmp dir for
socket path, Vagrant would simply rely on `rand(1000)` for making unique
dirs for rsyncing files which could result in collisions. This commit
updates that be properly using `Dir.mktmpdir` with a `vagrant-rsync-`
prefix.
2018-10-11 09:51:03 -07:00
Chris Roberts d48b95ffaf Check :verify_host_key value for :never or if falsey 2018-08-24 14:11:30 -07:00
Chris Roberts 2667de163b Enable rsync synced folders for non-DrvFs file systems within WSL 2018-07-06 16:58:12 -07:00
Brian Cain c9e5a22bff (#9062) Deprecate :paranoid in favor of :verify_host_key
As of `net-ssh` version 4.2.0, the key :paranoid has been deprecated in
favor of using :verify_host_key. This commit updates Vagrants ssh config
to use the new key, and deprecates the use of :paranoid.
2018-01-05 10:02:45 -08:00
Chris Roberts 139a65e555 Format host address for rsync when IPv6 2017-07-31 15:44:37 -07:00
Brian Cain 4440056fff (#8770) rsync-auto relative dirs from vagrantfile
Prior to this commit, rsync-auto would not properly rsync realtive dirs
outside the cwd if defined in the Vagrantfile. This commit updates that
to ensure that the command looks at the Vagrant config to ensure that
folder was intended to be rsync'd to the machine even if outside the
current working dir.
2017-07-14 09:26:10 -07:00
Brian Cain b1548a2eb6 (#5160) Only rsync-auto current working dir with docker provider
Prior to this commit, when users invoked the `rsync-auto` command using
the docker provider with boot2docker, vagrant would rsync all known
containers using the boot2docker vm rather than the current working dir.
This commit updates that behavior to ensure that only the current
working dirs vagrant machines will be rsynced.
2017-07-06 15:05:42 -07:00
Chris Roberts 05c5aab92a synced_folders/rsync: Escape exclude paths 2016-10-25 13:59:03 -07:00
Chris Roberts 185a7dfc2e guests/rsync do not chown files excluded from sync 2016-08-16 15:13:19 -07:00
Chris Roberts 9e26e31a6b Add generated private key options to rsync command 2016-08-11 13:00:37 -07:00
Chris Roberts 7ba4f2087b Include LogLevel option within ssh command setup 2016-08-11 12:12:45 -07:00
Zack Train cb70749bd8 redux of pr 7398 for ssh-agent key fix 2016-08-11 11:48:10 -07:00
Seth Vargo 571747be5e
Ensure space after last arg 2016-07-18 23:39:08 -04:00
Seth Vargo 8a5cf3b81a Merge pull request #7012 from penguincoder/rsync-command-quoting
translate windows path
2016-07-18 22:05:39 -04:00
Seth Vargo 7f1947fec2
folders/rsync: Shellescape guest paths
This allows users to have spaces or other special characters in
destination paths on the guest.
2016-07-18 21:13:00 -04:00
Seth Vargo 43538f68a4
Simpler 2016-06-06 19:47:25 -04:00
Andrew Coleman 95ab29b3db only use controlmaster for non-windows platforms, resolves #6702 2016-02-10 22:44:54 -05:00
Andreas Reischuck 5647de8ba4 Add shell quotes to the reported rsync command line to make it readable. 2016-01-09 22:27:54 +01:00
Mitchell Hashimoto 45a8a5907f synced_folders/rsync: SSH control for faster rsync 2015-11-20 10:48:59 -08:00
Lonnie VanZandt b897fd7365 Scrub Guest Paths for Windows Rsync leaving Dirty Paths for Winrm Mkdir
Windows offers no out-of-the-box rsync utility. By far, the most
commonly used external utilities for Windows rsync are built with the
GNU Cygwin libraries. The cost for this convenience is that rsync on
Windows has to be provided paths that begin “/cygdrive/c” rather than
“c:/“ like other Windows-API utilities. Compounding the situation,
rsync doesn’t create paths/to/sub/targets and so the vagrant plugin
code, when performing an rsync, is responsible for creating
intermediate directories in guest paths if there are any. Furthermore,
the mkdir utility in Windows is not another Cygwin utility like rsync
but the routine mkdir of Windows command.com. Therefore, while rsync
needs the /cygwin paths, mkdir uses the Windows paths. Later, the
chef_solo.rp provisioner running within the guest will expect to find
Windows-style paths in its solo.rb configuration file. Due to all this,
vagrant has to keep track of both the original, possibly dirty Windows
guest path and the cygwin-scrubbed guest path.
2015-08-18 10:56:13 -06:00
Mitchell Hashimoto d5458247c7 update to latest listen 2015-07-09 11:18:36 -06:00
Mitchell Hashimoto 9596b7a46c synced_folders/rsync-auto: don't crash if rsync command fails [GH-4991] 2015-07-09 11:11:58 -06:00
Mitchell Hashimoto d95dad9a79 synced_folders/rsync: command help [GH-5868] 2015-07-09 10:58:45 -06:00
Mitchell Hashimoto 31448d126b synced_folders/rsync: can set rsync_path [GH-3966] 2015-07-09 10:02:38 -06:00
Seth Vargo f9816d89d9 Merge pull request #4867 from malonecm/GH4201-ShowRSyncOutput
GH-4201: Added rsync__showoutput to display rsync output to console
2015-05-30 21:21:26 -07:00
Hubert 7e5391c0f5 synced/folders/rsync Add 'IdentitiesOnly=yes'
Added IdentiesOnly=yes to avoid "Too Many Authentication Failures" error
2015-01-12 15:19:43 +01:00
Seth Vargo d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Chad Maloney d2e1500c74 Review comments applied. Removed changelog. Changed showoutput to verbose. 2015-01-05 14:36:00 -06:00
Chad Maloney 1ed31afeba GH-4201: Cleaned up some leftover junk I missed removing 2014-11-25 14:39:56 -06:00
Chad Maloney cf784d5d3c GH-4201: Split process output by line so prefix shows on each line. Also fixed localization reference. 2014-11-25 14:37:59 -06:00
Chad Maloney 5de3f30bb0 GH-4201: Added rsync__showoutput to display rsync output to console 2014-11-25 12:38:41 -06:00
Mitchell Hashimoto 59ebef7b4b command/rsync-auto: proxy VMs work [GH-4067] 2014-10-22 16:25:59 -07:00
Mitchell Hashimoto 0e29dd5668 commands/rsync: handle proxy machines [GH-4066] 2014-10-22 16:17:39 -07:00
Mitchell Hashimoto 0d6cf9e25f commands/rsync-auto: fix typo 2014-08-31 10:50:33 -07:00
Mitchell Hashimoto a54f2dc539 command/rsync-auto: add --poll flag [GH-4392] 2014-08-31 09:54:37 -07:00
Mitchell Hashimoto a08d9078da commands/rsync-auto: check machine ID prior to sync [GH-4031] 2014-08-06 16:56:09 -07:00
Mitchell Hashimoto 3c4e129fb8 synced_folders/rsync: dup arg list [GH-3864] 2014-05-20 19:24:06 -07:00
Mitchell Hashimoto 2a973df440 synced_folders/rsync: copy symlinks as real files [GH-3734] 2014-05-09 09:31:31 -07:00
Mitchell Hashimoto 90234dc32f synced_folders/rsync: fix oddness on Windows 2014-04-28 14:49:33 -07:00
Mitchell Hashimoto ac040102f9 Merge pull request #3544 from benesch/rsync-conservative-chown
synced_folders/rsync: only chown when necessary
2014-04-27 15:59:40 -07:00
Mitchell Hashimoto 77fb6d73b8 Merge pull request #3552 from benesch/rsync-auto-handle-interrupt
command/rsync-auto: properly exit on interrupt
2014-04-27 15:54:22 -07:00
Mitchell Hashimoto df86b18263 Update CHANGELOG, fix tests 2014-04-27 15:53:31 -07:00
Nikhil Benesch 8fb49f10cc command/rsync-auto: properly exit on interrupt
Currently, interrupting 'vagrant rsync-auto' once it's waiting for
filesystem events has no effect. Appears to be a deadlock related to
signal handlers in Ruby 2.0 [0].

Remove call to `thread.join` in signal handler. The handler doesn't
need to wait for `true` to be added to the queue; it just needs to
launch the thread.

[0]: https://bugs.ruby-lang.org/issues/7917
2014-04-26 16:24:25 -04:00
Brian.Clark fb509ac8b7 Add ssh ProxyCommand functionality to rsync 2014-04-26 13:52:39 -04:00
Nikhil Benesch 2df36892dd synced_folders/rsync: only chown when necessary [GH-3525]
Run remote rsync as root to guarantee that rsync can write to guestpath.
This obviates the need to chown the guestpath to the SSH user prior to
sync.

This brings a substantial speedup (2x on a moderately-sized shared
folder) and properly triggers filesystem notifications on only the files
changed by a given sync.
2014-04-25 15:00:12 -04:00
Mitchell Hashimoto a47b85c8c4 synced_folders/rsync: add UserKnownHostsFile to /dev/null [GH-3511] 2014-04-21 20:39:48 -07:00
Mitchell Hashimoto 53017bccc8 command/rsync-auto: work with provisioner synced folders 2014-04-21 13:55:57 -07:00
Mitchell Hashimoto ceb90c5aac command/rsync-auto: proper require 2014-04-18 21:17:08 -07:00
Mitchell Hashimoto 88683221f4 synced_folders/rsync: force NIO4R_PURE 2014-04-14 10:18:50 -07:00