anadimisra / biztalk-provisioner

Automated provisioner for BizTalk Server.
MIT License
0 stars 2 forks source link

provisioning via puppet requires rsync, which fails #2

Closed vishagilityroots closed 7 years ago

vishagilityroots commented 7 years ago

During provisioning phase, the Vagrant box needs to rsync several folders to the remote machine. The remote directory does appear to get created but it fails unexpectedly.

DEBUG winrmshell: Output: #<WinRM::Output:0x0000000408c600 @data=[{:stdout=>"\r\n"}, {:stdout=>"\r\n"}, {:stdout=>"    Directory: C:\\tmp\\vagrant-puppet\r\n"}, {:stdout=>"\r\n"}, {:stdout=>"\r\n"}, {:stdout=>"Mode                LastWriteTime     Length Name                                                                                                                                                                                                        \r\n"}, {:stdout=>"----                -------------     ------ ----                                                                                                                                                                                                        \r\n"}, {:stdout=>"d----         7/24/2017   8:18 AM            manifests-aa0e7a61aebfb30adf6effefa1b25cdc                                                                                                                                                                  \r\n"}, {:stdout=>"\r\n"}, {:stdout=>"\r\n"}], @exitcode=0>
 INFO subprocess: Starting process: ["/usr/bin/rsync", "--verbose", "--archive", "--delete", "-z", "--copy-links", "--no-owner", "--no-group", "-e", "ssh -p 22 -o LogLevel=FATAL  -o ControlMaster=auto -o ControlPath=/tmp/ssh.248 -o ControlPersist=10m  -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/home/vagrant/.vagrant.d/insecure_private_key'", "--exclude", ".vagrant/", "/work/agilityroots/biztalk-provisioner/provisioning/environments/production/manifests/", "vagrant@ec2-13-126-91-144.ap-south-1.compute.amazonaws.com:/tmp/vagrant-puppet/manifests-aa0e7a61aebfb30adf6effefa1b25cdc"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31872
DEBUG subprocess: Exit status: 255
ERROR warden: Error occurred: There was an error when attempting to rsync a synced folder.
Please inspect the error message below for more info.

Host path: /work/agilityroots/biztalk-provisioner/provisioning/environments/production/manifests/
Guest path: /tmp/vagrant-puppet/manifests-aa0e7a61aebfb30adf6effefa1b25cdc
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--no-owner" "--no-group" "-e" "ssh -p 22 -o LogLevel=FATAL  -o ControlMaster=auto -o ControlPath=/tmp/ssh.248 -o ControlPersist=10m  -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/home/vagrant/.vagrant.d/insecure_private_key'" "--exclude" ".vagrant/" "/work/agilityroots/biztalk-provisioner/provisioning/environments/production/manifests/" "vagrant@ec2-13-126-91-144.ap-south-1.compute.amazonaws.com:/tmp/vagrant-puppet/manifests-aa0e7a61aebfb30adf6effefa1b25cdc"
Error: rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0]
vishagilityroots commented 7 years ago

If you look at the error

Guest path: /tmp/vagrant-puppet/manifests-aa0e7a61aebfb30adf6effefa1b25cdc
Command: "rsync" "--verbose" "--archive" "--delete" "-z" "--copy-links" "--no-owner" "--no-group" "-e" "ssh -p 22 -o LogLevel=FATAL  -o ControlMaster=auto -o ControlPath=/tmp/ssh.248 -o ControlPersist=10m  -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/home/vagrant/.vagrant.d/insecure_private_key'" "--exclude" ".vagrant/" "/work/agilityroots/biztalk-provisioner/provisioning/environments/production/manifests/" "vagrant@ec2-13-126-91-144.ap-south-1.compute.amazonaws.com:/tmp/vagrant-puppet/manifests-aa0e7a61aebfb30adf6effefa1b25cdc"
Error: rsync: connection unexpectedly closed (0 bytes received so far) [sender]

This error occurred on Cygwin; the paths are cygwin-specific and will not work on the Windows host. It appears I may have encountered https://github.com/mitchellh/vagrant/issues/6702.

There are lots of comments in that issue that say Cygwin is not a good choice for Windows provisioning. I tried moving to cmd.exe.

vishagilityroots commented 7 years ago

This should already be fixed by #5 .