GithubHelp home page GithubHelp logo

smerrill / vagrant-gatling-rsync Goto Github PK

View Code? Open in Web Editor NEW
242.0 13.0 17.0 74 KB

An rsync watcher for Vagrant 1.5.1+ that uses fewer host resources.

Home Page: http://rubygems.org/gems/vagrant-gatling-rsync

License: MIT License

Ruby 91.90% Dockerfile 8.10%

vagrant-gatling-rsync's Introduction

vagrant-gatling-rsync

An rsync watcher for Vagrant 1.5.1+ that uses fewer host resources at the potential cost of more rsync actions.

Getting started

To get started, you need to have Vagrant 1.5.1 installed on your Linux, Mac, or Windows host machine. To install the plugin, use the following command.

vagrant plugin install vagrant-gatling-rsync

Working with this plugin

Add the following information to the Vagrantfile to set the coalescing threshold in seconds. If you do not set it, it will default to 1.5.

You may also specify what Time.strftime options the plugin will use when it reports on completed rsyncs. The default is "%I:%M:%S %p".

You will also need to have at least one synced folder set to type "rsync" to use the plugin.

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "hashicorp/precise64"

  config.vm.synced_folder "../files", "/opt/vagrant/rsynced_folder", type: "rsync",
    rsync__exclude: [".git/", ".idea/"]

  # Configure the window for gatling to coalesce writes.
  if Vagrant.has_plugin?("vagrant-gatling-rsync")
    config.gatling.latency = 2.5
    config.gatling.time_format = "%H:%M:%S"
  end

  # Automatically sync when machines with rsync folders come up.
  config.gatling.rsync_on_startup = true
end

With the Vagrantfile configured in this fashion, you can run the following command to sync files.

vagrant gatling-rsync-auto

As of version 0.9.0, vagrant-gatling-rsync will automatically start the sync engine on vagrant up or vagrant reload when the machines that you bring up have one or more rsync folders defined. You can disable this behavior by setting config.gatling.rsync_on_startup to false.

Why "gatling"?

The gatling gun was the first gun capable of firing continuously.

This plugin

The built-in rsync-auto plugin sometimes uses a lot of CPU and disk I/O when it starts up on very large rsynced directories. This plugin is designed to work well with such large rsynced folders.

The rsync-auto command that ships with Vagrant 1.5 uses the listen gem. The Listen gem is quite thorough - it uses Celluloid to spin up an actor system and it checks file contents on OS X to ensure that running "touch" on a file (to do a write but not update its content) will not fire the rsync command.

The downside of using Listen is that it takes a large amount of host resources to monitor large directory structures. This gem works well with to monitor directories hierarchies with 10,000-100,000 files.

This gem's implementation is much closer to the underlying fsevent or inotify APIs, which allows for higher performance.

Event coalescing

This plugin also coalesces events for you. The default latency is 1.5 seconds. It is configurable through the config.gatling.latency parameter. If you specify a latency of two seconds, this plugin will not fire a vagrant rsync until two contiguous seconds without file events have passed. This will delay rsyncs from happening if many writes are happening on the host (during a make or a git clone, for example) until the activity has leveled off.

Authors

Steven Merrill (@stevenmerrill) originally had the idea to tap into rb-fsevent and rb-inotify to more efficiently rsync files.

Doug Marcey (@dougmarcey) provided considerable guidance in the implementation of the coalescing functionality and wrote the initial sketch of the Linux and Windows adapters.

vagrant-gatling-rsync's People

Contributors

smerrill avatar mattchannelgrabber avatar leejo avatar snpy avatar sdboyer avatar

Stargazers

tknr avatar Ruslan Yussupov avatar  avatar  avatar Steven Briscoe avatar Manuele avatar JFSchiller avatar Nabil Karous avatar Mitchell Gu avatar Erik Love avatar Benoit GALATI avatar Nikolas Evers avatar Ike Devolder avatar Sebastiaan Luca avatar  avatar Hoat Le avatar Philipp Michael avatar Anthony Scalisi avatar  avatar Kohei Tani avatar Walter Purvis avatar Alexander Fuhr avatar Amr Tj. Wallas avatar Bater.Makhabel avatar Daniel Holmes avatar Martin Ant avatar Jordi Dosne avatar makeneko avatar Jonathan avatar Octavian Tabuci avatar Alexey Vasilyev avatar Dilip K avatar fukata avatar benzoh avatar Max avatar Yingliang Zhang avatar Armando Ibarra avatar Rob avatar jians avatar Todd Roseman avatar Lon avatar 田宏宇 avatar Martin Lofaj avatar Dave Snijder avatar Bohdan Yurov avatar Martin Sherbondy avatar Keith Swett avatar Fabio Brunelli avatar hienbv avatar Jonathan Halterman avatar James Robertson avatar Nico Oelgart avatar Hasan Kara avatar Samy RANAVELA avatar Striker007 avatar Ricardo Luz avatar  avatar Rustam avatar Jevgeni Sillar avatar  avatar Rootrl avatar Patrick Peng avatar Oleksii Bobyriev avatar Manol Kalinov avatar Sean Johnson avatar Paul Williams avatar Babatunde Adeyemi avatar  avatar Albert Zheng avatar Matthew avatar Alfredo Infante avatar Michael Chen avatar Fredrick Galoso avatar Zakharov Roman avatar Brian avatar Egon Hyszczak avatar NASA avatar DJ avatar Naoto Yokoyama avatar  avatar Gabriel avatar Milan Simek avatar Rick van de Loo avatar Denis Babineau avatar Tom Hensel avatar Andrew Kurin avatar Anton Gilgur avatar Andreas Kießling avatar Jarvis avatar Lin He avatar Yvan Volochine avatar Sam Winterton avatar Exequiel Ceasar Navarrete avatar Raas Ahsan avatar Andrey Subbotin avatar Vlad Moyseenko avatar Felix Erkinger avatar Corey McClelland avatar Robert Witchell avatar Izaak "Zaak" Beekman avatar

Watchers

Kevin Edwards avatar Wolfgang Ziegler avatar  avatar Yusuke Nakamura avatar Gilles Cornu avatar Steve Klingele avatar Krzysztof Daniel avatar  avatar  avatar Monty Lennie avatar gaupoit avatar  avatar  avatar

vagrant-gatling-rsync's Issues

undefined method `exclude_to_regexp'

Getting this error on vagrant gatling-rsync-auto

.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.1/lib/vagrant-gatling-rsync/command/rsync_auto.rb:54:in `block (3 levels) in execute': undefined method `exclude_to_regexp' for VagrantPlugins::SyncedFolderRSync::RsyncHelper:Class (NoMethodError)
        from /home/devin/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.1/lib/vagrant-gatling-rsync/command/rsync_auto.rb:53:in `each'
        from /home/devin/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.1/lib/vagrant-gatling-rsync/command/rsync_auto.rb:53:in `block (2 levels) in execute'
        from /home/devin/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.1/lib/vagrant-gatling-rsync/command/rsync_auto.rb:38:in `each'
        from /home/devin/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.1/lib/vagrant-gatling-rsync/command/rsync_auto.rb:38:in `block in execute'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:200:in `block in with_target_vms'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `each'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `with_target_vms'
        from /home/devin/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.1/lib/vagrant-gatling-rsync/command/rsync_auto.rb:32:in `execute'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/cli.rb:42:in `execute'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/environment.rb:244:in `cli'
        from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.0/bin/vagrant:147:in `<main>'

rb-inotify does not add a trailing slash

The rsync plugin assumes that all directories' paths will end with a slash. Therefore, given the following Vagrantfile, it will come up with these regular expressions:

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "centos65"
  config.vm.network :private_network, ip: "192.168.33.10"

  config.vm.synced_folder "../drupal", "/opt/drupal", type: "rsync",
    rsync__exclude: [".git/", ".idea/"]

  config.gatling.latency = 3.0
end
 INFO gatling-rsync-auto: Listening to paths: ["/home/smerrill/Projects/centos-vagrant/drupal"]
 INFO gatling-rsync-auto: Ignoring 2 paths:
 INFO gatling-rsync-auto:   -- (?-mix:^\/home\/smerrill\/Projects\/centos\-vagrant\/drupal\/.*.git\/)
 INFO gatling-rsync-auto:   -- (?-mix:^\/home\/smerrill\/Projects\/centos\-vagrant\/drupal\/.*.idea\/)
 INFO gatling-rsync-auto: Listening via: rb-inotify on Linux.

However, the rb-inotify backend does not report directory names with a trailing slash, like so:

 INFO gatling-rsync-auto:   - Modified: #<Set: {"/home/smerrill/Projects/centos-vagrant/drupal/.git"}>

We need to figure out if we can detect if the items that are reported as changed by rb-inotify are files or directories, and if so, append a trailing slash.

Is it possible to make it even faster?

I'm using your plugin and it works great.

The plugin pics up the changes really fast but the bottleneck is now in the SSH connection to execute the rsync command. Is there a way to keep 1 ssh connection open (in the background) and use that for executing commands?

works for 2 file changes and then crashes

It looks like there is a problem with the tmp folder in my ember app, I tried adding it to the vagrant exclude files command and tried adding -a as a vagrant option but it still doesn't work. I would appreciate it if you could help me out. thank you.

montylennie@montys-macbook-pro ~/D/beautyhunt> vagrant gatling-rsync-auto

==> boot2docker: Doing an initial rsync...
==> boot2docker: Rsyncing folder: /Users/montylennie/Documents/beautyhunt/ => /Users/montylennie/Documents/beautyhunt
==> boot2docker:   - Exclude: [".vagrant/", ".git/"]
==> boot2docker: Watching: /Users/montylennie/Documents/beautyhunt
==> boot2docker: Rsyncing folder: /Users/montylennie/Documents/beautyhunt/ => /Users/montylennie/Documents/beautyhunt
==> boot2docker:   - Exclude: [".vagrant/", ".git/"]
==> boot2docker: 12:31:47: The rsync operation completed in 774.462 milliseconds.
==> boot2docker: Rsyncing folder: /Users/montylennie/Documents/beautyhunt/ => /Users/montylennie/Documents/beautyhunt
==> boot2docker:   - Exclude: [".vagrant/", ".git/"]
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

find '/Users/montylennie/Documents/beautyhunt' '!' -type l -a '(' ! -user docker -or ! -group docker ')' -print0 | xargs -0 -r chown docker:docker

Stdout from the command:



Stderr from the command:

find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/tests/unit: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/tests/test-helper.js: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/tests/helpers: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/config: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/templates: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/views: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/routes: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/router.js: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/models: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/initializers: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/index.html: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/helpers: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/controllers: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/components: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/app.js: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/.gitkeep: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/bower_components: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Bc95DPq9.tmp: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-qdFuzT24.tmp: No such file or directory
find: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-DAFN6rdj.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/class-tmp_cache_dir-zJKgi9R0.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/class-tmp_cache_dir-zJKgi9R0.tmp/assets: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/class-tmp_cache_dir-zJKgi9R0.tmp/assets/vendor.map: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/class-tmp_cache_dir-zJKgi9R0.tmp/assets/vendor.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/test-support-suffix.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/test-support-prefix.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/app-boot.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/app-suffix.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/app-prefix.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/vendor-suffix.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/custom_replace-tmp_dest_dir-UicfT5vF.tmp/vendor-prefix.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/unit: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/unit/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/test-helper.jshint.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/index.html: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/helpers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/helpers/start-app.jshint.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/helpers/resolver.jshint.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-3uvS92BW.tmp/.jshintrc: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-4utXRd98.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/views: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/views/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/routes: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/routes/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/router.jshint.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/models: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/models/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/index.html: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/helpers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/helpers/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/controllers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/controllers/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/components: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/components/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/jshinter-tmp_dest_dir-SrC1pLRb.tmp/app.jshint.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-0BhTM4At.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-RSsqRf8D.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-jszYR1hM.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-XN7su7P3.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-AipeHVfg.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-U7MFMf54.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-MBeEHKD9.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-cKgGmgLe.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-U5PW28l8.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-5OZCepVM.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-RcNjaFDL.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/unit: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/unit/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/test-helper.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/index.html: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/helpers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/helpers/start-app.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/helpers/resolver.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-qelMLxPU.tmp/beauty-ember/tests/.jshintrc: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-oSTBapfD.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-owh0IU15.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-CgE1ju5V.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-xBWZXzxS.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-RtsoJOzO.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-7y9nZCJx.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-V2OyuXqs.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-OVhTzms8.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Sr3T46Tn.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Hhk1FiB9.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-7BVJ6ARS.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/template_compiler-tmp_dest_dir-gChBfgn7.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/template_compiler-tmp_dest_dir-gChBfgn7.tmp/beauty-ember: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/template_compiler-tmp_dest_dir-gChBfgn7.tmp/beauty-ember/templates: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/template_compiler-tmp_dest_dir-gChBfgn7.tmp/beauty-ember/templates/components: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/template_compiler-tmp_dest_dir-gChBfgn7.tmp/beauty-ember/templates/components/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/template_compiler-tmp_dest_dir-gChBfgn7.tmp/beauty-ember/templates/application.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-SsU5dGD3.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-1fdbdfzM.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-1MVdzdR9.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-4Ro9pKab.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Q3K8AoI2.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-gsveZ46I.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-77py46AW.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-fzKT0uTs.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-p4hrvfKy.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-ngSEIrra.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-ngSEIrra.tmp/initializers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/views: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/views/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/routes: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/routes/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/router.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/models: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/models/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/initializers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/initializers/export-application-global.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/initializers/app-version.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/index.html: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/helpers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/helpers/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/controllers: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/controllers/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/components: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/components/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/app.js: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/babel-tmp_dest_dir-eMWyoSqx.tmp/beauty-ember/.gitkeep: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Vyoi1Ci1.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-VvANG4Lk.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-J3iKghJz.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Vm2oPWmQ.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-iYvNvNSL.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-J0vmuHXS.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-oQfJIvnT.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-iIuS7KYj.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-zyNq2PBR.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-uQn8OQzH.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-XL9FEYKz.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-7j0iS3qF.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-QLIebsDN.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-w6fqfWZX.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Sx4kya6U.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-QDHC3Glj.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-Oe8cAMMs.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-852tYCAV.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-gyN1kVWj.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-MGuTteGC.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-wlc49lEF.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-FKuFE4VC.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-YNlMwbQ5.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-YNlMwbQ5.tmp/ember-data: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-YNlMwbQ5.tmp/ember-qunit-notifications: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-YNlMwbQ5.tmp/qunit: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-YNlMwbQ5.tmp/qunit/qunit: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-YNlMwbQ5.tmp/ember: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-OYE1t5io.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/tests: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/beauty-ember/tests/unit: No such file or directory
chown: /Users/montylennie/Documents/beautyhunt/ember/tmp/tree_merger-tmp_dest_dir-JUarCRTM.tmp/vendor: No such file or directory

Running 'vagrant plugin install gatling-rsync-auto' produces 'Could not find gem' Bundler error

When running 'vagrant plugin install gatling-rsync-auto' Vagrant returns the error:

Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

Could not find gem 'gatling-rsync-auto (>= 0) ruby' in the gems available on this machine.

OS: Ubuntu 14.04.3 LTS
Vagrant 1.7.2

bidirectional sync: Gatling + rsync-back?

Awesome work! I just tested this on my setup with a couple of Drupal sites (+- 30.000 files). It works fast!

I was thinking that it would be really cool to have your plugin vagrant-rsync-back merged in with this one. Is that a viable feature request?

Failed to sync if gatling-rsync is started after making changes

gatling-rsync not able to pick/sync up file changes if it's started after making changes to a file that's being watched and which is already in sync using gatling-rsync mentioned in VagrantFile.
Here's the sequence I'm using

  1. vagrant up --provider=aws ec2
  2. Save a file that's being watched
  3. Start gatling-rsync to watch that file
    But it fails to pick up the changes to that file

I've to touch that file in order to make gatling-rsync pick it up.

Light resource use on new Mac Pro, but heavier resource use on older Mac Pro

My work machine is a 2013 Mac Pro (the tube thing). As stated by the project description, when gatling is running, it really has little CPU impact on that machine. It is great

On my 2008 Mac Pro at home, the CPU is generally stuck no lower than 20% utilization when gatling is running. I am guessing that this might have something to do with higher CPU overhead for older disk controllers? Or other inefficiencies?

The older Mac Pro at home has conventional magnetic disk drives, and the one at work uses SSD storage.

The older Mac Pro at home has less RAM (10gb) compared to the 16gb I have at work.

Aside from the hardware, the software versions are the same... same OS level, same VMWare Fusion, same Vagrant, same Git, etc. I disable antivirus before enabling any of these auto-rsync types of things, so it shouldn't factor in, either. That said, same AV software and version at work and home.

If I understand event coalescing, it is not the same as simply turning down the frequency with which gatling runs... I don't mind it triggering 1 second after a file change is event is raised, but I would be interested in being able to turn down the overall frequency from checking constantly to, say, every 5 seconds or so. I am wondering if it currently just runs too fast for my old home system to keep up with painlessly.

Rsync include support

There seems to lack support for rsync include option
I tried to add the include the option

rsync__exclude: [
        ".git/", ".idea/", ".settings/"      ],
      rsync__include: [
        ".settings/foo" #something i expect to be passed to rsync but nothing changes 
      ]

How can i achive that with the latest build?
Thank you !

Rsync error on vagrant up with Big Sur

After updating my mac to BigSur, vagrant to 2.2.14 and VB to 6.1 we have now the problem that rsync is failing on startup with the error:

Bildschirmfoto 2021-01-25 um 12 34 34

Before the update to BigSur everything was working fine

Undefined method called when sync folder is being synced with a vagrant machine which is not active

Whenever any synced folders are changed which are being synced with a machine which is not running the below undefined method happens. Noticeable when a synced folder is synced with more than one machine, one is running and the rest are not.

/Users/matthewking/.rvm/gems/ruby-2.0.0-p195/gems/vagrant-1.6.0.dev/plugins/synced_folders/rsync/helper.rb:57:in rsync_single': undefined method[]' for nil:NilClass (NoMethodError)
from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/command/rsync_auto.rb:123:in block (2 levels) in callback' from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/command/rsync_auto.rb:121:ineach'
from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/command/rsync_auto.rb:121:in block in callback' from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/command/rsync_auto.rb:120:ineach'
from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/command/rsync_auto.rb:120:in callback' from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/listen/listenosx.rb:47:incall'
from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/listen/listenosx.rb:47:in block in run' from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/listen/listenosx.rb:31:inloop'
from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/listen/listenosx.rb:31:in run' from /Users/matthewking/.vagrant.d/gems/gems/vagrant-gatling-rsync-0.0.2/lib/vagrant-gatling-rsync/command/rsync_auto.rb:77:inexecute'
from /Users/matthewking/.rvm/gems/ruby-2.0.0-p195/gems/vagrant-1.6.0.dev/lib/vagrant/cli.rb:42:in execute' from /Users/matthewking/.rvm/gems/ruby-2.0.0-p195/gems/vagrant-1.6.0.dev/lib/vagrant/environment.rb:248:incli'
from /Users/matthewking/.rvm/gems/ruby-2.0.0-p195/gems/vagrant-1.6.0.dev/bin/vagrant:166:in <top (required)>' from /Users/matthewking/.rvm/gems/ruby-2.0.0-p195/bin/vagrant:23:inload'
from /Users/matthewking/.rvm/gems/ruby-2.0.0-p195/bin/vagrant:23:in `

'

Shorten `vagrant gatling-rsync-auto` command?

Honestly, I have trouble remembering what exactly I have to type in order auto-rsync to start. May be, it would be better to shorten the command to something like vagrant grsync?

More verbose reporting in terminal

It would be great if the terminal this runs in reported a bit more about what changed and when. Currently I just get a terminal that looks like:

==> project01: Rsyncing folder: /Users/rjmunro/project/ => /vagrant
==> project01:   - Exclude: [".vagrant/", ".git/", "vendor/"]
==> project01: Rsyncing folder: /Users/rjmunro/project/ => /vagrant
==> project01:   - Exclude: [".vagrant/", ".git/", "vendor/"]
==> project01: Rsyncing folder: /Users/rjmunro/project/ => /vagrant
==> project01:   - Exclude: [".vagrant/", ".git/", "vendor/"]
==> project01: Rsyncing folder: /Users/rjmunro/project/ => /vagrant
==> project01:   - Exclude: [".vagrant/", ".git/", "vendor/"]

Once the screen is full, it no longer appears to even move. I'd like to get a better feeling of what is going on, e.g.

==> project01: Gatling: 2014-07-02 12:34:56 file foo/bar changed 
==> project01: Rsyncing folder: /Users/rjmunro/project/ => /vagrant
==> project01:   - Exclude: [".vagrant/", ".git/", "vendor/"]
==> project01: Gatling: 2014-07-02 13:57:11 file foo/baz changed 
==> project01: Rsyncing folder: /Users/rjmunro/project/ => /vagrant
==> project01:   - Exclude: [".vagrant/", ".git/", "vendor/"]

Rsync triggered on git status command

I noticed rsync process is being triggered on git status when watching for changes with vagrant gatling-rsync-auto (.git dir is excluded and not synchronized, so it's not --exclude misconfiguration).
If I use the original vagrant rsync-auto, then git status does not trigger rsync.
Windows host here.

Does this plugin support Windows?

Hi everybody! I install vagrant-gatling-rsync plugin without any problems to Win 7 x64, but seems it doesn't work here. When typing vagrant gatling-rsync-auto or vagrant rsync nothing happens. Command vagrant provision works fine, by the way.
My Vagrantfile looks like this (and works on Ubuntu, MacOS X too):

Vagrant.configure("2") do |config|
  config.vm.box = "dummy"
  config.vm.synced_folder "files", "/home/ec2", type: "rsync"

  if Vagrant.has_plugin?("vagrant-gatling-rsync")
    config.gatling.latency = 2.5
  end

  config.vm.provider :aws do |aws, override|
    aws.access_key_id = "xxx"
    aws.secret_access_key = "yyyy"
    aws.keypair_name = "zzzz"

    aws.ami = "ami-05ebd06c"

    override.ssh.username = "root"
    override.ssh.private_key_path = "pempem.pem"
  end
end

So, the question is, does plugin work on Windows? Thanks!

Run gatling-rsync-auto on resume from suspend

The auto rsync is only triggered after the synced folders have been mounted, which Vagrant only does when the machine is started from a halted state or restarted. When calling 'vagrant up' after a suspend, auto rsync does not get run.

Vagrant version: 1.8.1
Plugin version: 0.9.0

Should do an initial rsync as `rsync-auto` does

When rsync-auto runs, it does an initial sync to make sure any changes you've made locally are copied across.

$ vagrant rsync-auto
==> default: Doing an initial rsync...
==> default: Rsyncing folder: /Users/craiga/my-source-code/ => /var/my-source-code
==> default:   - Exclude: [".vagrant/", ".git*"]
==> default: Watching: /Users/craiga/my-source-code

This is handy when you make a change, see that your change hasn't been applied, and then remember that you forgot to start vagrant rsync-auto.

gatling-rsync-auto doesn't do this, and it's a little annoying.

$ vagrant gatling-rsync-auto
==> default: Watching: /Users/craiga/my-source-code

I can run vagrant rsync; vagrant gatling-rsync-auto to get around this, but if gatling-rsync-auto is meant as a drop-in replacement for rsync-auto it should replicate this behaviour.

Owner/Group changed on files inside excluded folder

Hi,

I've got a strange effect when using synced folders of type rsync. Configuration looks like this:

type: "rsync", owner: "www-data", group: "www-data", rsync__auto: true, rsync__exclude: [ ".git/", "foo/*" ], rsync__args: ["--verbose", "--archive", "--delete", "-z"]

foo/ is my excluded folder. /foo itself is synced but not it's content.

Everytime I change a file outside of /foo and gatling-rsync-auto syncs the change, all files inside /foo get www-data as owner and group as well. That's not what I intended. It seems the chown is done recursively ignoring any excludes.

Cheers
Etienne

Meaningless error when run on older Vagrant versions.

Having installed this plugin, I would only get the following red text every time I ran Vagrant:

error: Failed to load the "vagrant-gatling-rsync" plugin. View logs for more details.

No information on what logs, where they're stored… anyway, I googled and found I can run vagrant --debug, which resulted in me finding the following error:

ERROR root:  -- Error: #<NameError: uninitialized constant Errors>

This isn't useful either. Digging into the backtrace and looking at the offending line:

if Vagrant::VERSION < "1.5.1"
  raise Errors::Vagrant15RequiredError
end

Ah, Errors doesn't exist, so there's an error when trying to report an error.

😦 🌴

rsync just the modified files?!

I have a shared directory which takes 82 seconds for rsync (with no changes, just to checkout both trees are equal) to run.

Why not capture which files were changed when watching and only updating those? That would speed up absurdly in my use case.

If you wish, I could try to make a PR. Could you direct me where I should change the code to do that?

confirmation

==> default: Rsyncing folder: /home/devin/vagrant/ => /vagrant
==> default:   - Exclude: [".vagrant/", ".git", ".svn", "*.sql", "*.sql.gz", "files/*"]

Would be great if there was some sort of confirmation that the rsync completed.

Gatling does not run when vagrant is started

I believe this is expected, however I would prefer for this to run (in the background) when the machine is upped. My alternative is to run a watcher script on the actual vagrant machine that handles this

Verbose mode to list files

Hi,

Is there a verbose mode that I can run this on, so that it lists the files that are synced everytime it does a sync?

Recover from Rsync error

For a variety of reasons, a transient error can cause rsync to temporarily fail. It would be nice if the plugin could detect the failure better, and retry indefinitely

Fedora 23 issue with libffi

Hello there!

I'm having an issue with using vagrant-gatling-rsync on Fedora 23 -- when running it, it crashes with the following error:

/opt/vagrant/embedded/gems/gems/ffi-1.9.10/lib/ffi.rb:6:in `require': libffi.so.5: cannot open shared object file: No such file or directory - /opt/vagrant/embedded/gems/extensions/x86_64-linux/2.2.0/ffi-1.9.10/ffi_c.so (LoadError)

The libffi package is installed, but provides libffi.so.6:

root@host# rpm -ql libffi
/usr/lib64/libffi.so.6
/usr/lib64/libffi.so.6.0.2
/usr/share/doc/libffi
/usr/share/doc/libffi/README
/usr/share/licenses/libffi
/usr/share/licenses/libffi/LICENSE

I am on the latest version of the plugin vagrant-gatling-rsync (0.9.0)

Thanks,

Tim

how to use this plugin in Windows with cwRsync

I try to play vagrant in windows 10 and I vagrant up a centos6.6

I saw the plugin said:
_## 0.9.0 (June 28, 2015)
This release adds two big features: Windows support and automatic sync on startup.
_

Short version:
But how to use this plugin in windows?

  1. is cwRsync supported by this plugin
  2. If yes, would you please enhance this plugin?
    • _transform windows path into valid cygwin format before calling rsync in windows_

sorry for a long story...

First I add a related path synced folder like this:

   config.vm.synced_folder '../tmcas/storedirect', '/opt/o365/storedirect', type: 'rsync'

I run "vagrant up", then it said could't find rsync command, of course there's no this command under windows.
So I install cwRsync (https://www.itefix.net/content/cwrsync-free-edition)

I run again, this time it complains path is wrong:

   Host path: /e/Study/vagrant/docker-test/tmcas/storedirect/

As you can see, cwRsync based cygwin, and the default windows path format e:\Study\xxx is invalid.
So change the format - a full cygwin path format:

   config.vm.synced_folder '/cygwin/e/Study/...../tmcas/storedirect', '/opt/o365/storedirect', type: 'rsync'

This time, it complains: "host share folder is missing", yes it's not a valid windows format path:

e:\Study\vagrant\docker-test>vagrant up
Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
    default: Vagrant will now create or start a local VM to act as the Docker
    default: host. You'll see the output of the `vagrant up` for this VM below.
    default:
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The host path of the shared folder is missing: /cygdrive/e/Study/vagrant/docker-test/drupal/profiles/myprofile

Detailed error output:

Bringing machine 'default' up with 'docker' provider...
==> default: Docker host is required. One will be created if necessary...
    default: Vagrant will now create or start a local VM to act as the Docker
    default: host. You'll see the output of the `vagrant up` for this VM below.
    default:
    default: Clearing any previously set network interfaces...
    default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Forwarding ports...
    default: 80 (guest) => 4567 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
    default: Booting VM...
    default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Machine booted and ready!
GuestAdditions 5.0.12 running --- OK.
    default: Checking for guest additions in VM...
    default: Setting hostname...
    default: Installing rsync to the VM...
    default: Rsyncing folder: /e/Study/vagrant/docker-test/tmcas/storedirect/ => /opt/o365/storedirect
There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /e/Study/vagrant/docker-test/tmcas/storedirect/
Guest path: /opt/o365/storedirect
Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o ControlMaster=auto -o ControlPath=C:/Users/karlzhou/AppData/Local/Temp/ssh.116 -o ControlPersist=10m -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'C:/Users/karlzhou/.vagrant.d/boxes/centos6.6-karl/0/virtualbox/vagrant_private_key' --exclude .vagrant/ /e/Study/vagrant/docker-test/tmcas/storedirect/ [email protected]:/opt/o365/storedirect
Error: Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.
mm_receive_fd: no message header
process_mux_new_session: failed to receive fd 0 from slave
mux_client_request_session: read from master failed: Connection reset by peer
Failed to connect to new control master
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.2]
    default: The previous process exited with exit code 1.

Excluded folders

I have defined excluded folders, but gatling rsync ignoring this rules when I doing rsync-back, I think before installing this plugin https://github.com/smerrill/vagrant-rsync-back was working fine

rsync__exclude:"/assets/*"

Correct me if wrong, but I it seems that gatling plugin overrides behaviour of other rsync plugins.
Also, can gatling do rsync back to host?

Two-way sync?

This is a great plug-in, thanks!

Is there a way to configure two-way syncing like the default rsync for Vagrant?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.