-
Notifications
You must be signed in to change notification settings - Fork 155
Rsync tty issues #115
Comments
I just noticed this in the README:
I have that in the config, still no dice 👎 |
@petems I think rsync should be requesting the pty and it's not. So we should fix that, but in the meantime you might be able to work around this by using config.ssh.proxy_command. Can you confirm your vagrant and vagrant-rackspace versions? There's legacy code in this project for older versions, but if you're running recent versions then the rsync code is actually in vagrant itself. Also, the proxy_command workaround might not work for older versions. |
for the proxy command, can I do |
I think you need to give it a full command, but I haven't tested or fully read the ssh docs on ProxyCommands. Vagrant will pass it as "ssh -o ProxyCommand=#{proxy_command}". If you want to understand it better or submit a PR directly to vagrant, here's the relevant chunk of code: |
Yeah, I'm looking over the code now. Looks like theres not an easy fix, and the proxy command stuff doesnt seem to help it seems. I'm thinking about adding a config option to this plugin to use this rsync provider, then I could add the -t option to this plugin, as I'm assuming it'll probably be easier and faster to get a PR merged into this codebase than Vagrant. Sound good? |
Made a post on the vagrant google group: https://groups.google.com/forum/#!topic/vagrant-up/138eMq_v8Os 👍 |
Not to me. I'd vote against the merge. I want to remove the legacy rsync code as soon as possible (i.e. as soon as we feel everyone is on Vagrant 1.5+) because having two different rsync implementations causes confusion (they don't have compatible configuration) and means bugs need to be fixed at least twice (vagrant and rackspace), and sometimes more (aws, openstack, digitalocean, etc). A solution for "Remove requiretty from the sudoers file" is possible. My original tty workaround used Server Personalities to inject a cloud-init style script that removed the requiretty. It wasn't merged because In the meantime, if |
Ok cool, I'd be interested in resurrecting either the personality change or the fog upload, both would be awesome additions made pretty general. I'm trying to refactor https://github.com/mitchellh/vagrant-rackspace/pull/48/files a bit to make it so you can give a general pre-req script that can be run (so we could sed the sudoers file) and seeing if I can make the personality one generic enough to take two parameters, so you can use it for lots of different uses! 👍 |
The script was just: Unfortunately, a general pre-req script for "lots of different uses" probably won't work. There are three issues:
So it's best to limit the scripts to the bare minimum to allow Vagrant to create usable connections, and let provisioners do the rest. |
Ok, I see what you're saying. What if I just resurrect that old pull-request and get it working, would that be ok? So it's just the tty fix for RedHat flavour stuff so rsync will work. I've found most of the code works fine, it's just a slight code change for the Fog SCP settings. Related: do you know how to change the order that tasks are run in? I found even when running the script from your change script doesn't fix the RedHat issue, as it always runs the rsync folder regardless of the order in |
Is there any update on the vagrant-rackspace rsync/tty issue. I am unable to vagrant provision without this working. I am running vagrant 1.6.5 and vagrant-rackspace 0.1.9 via cygwin and seeing the following: Host path: /cygdrive/c/Vagrant/work/rackspace_test/ I can run the slightly modified cmd(changed key to a cyg path) manually without the error, but it prompts for a PW and doesn't use key auth(for reasons I don't know): #rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i '/cygwin64/home/XXX/.ssh/key' --exclude .vagrant/ /cygdrive/c/Vagrant/work/rackspace_test/ root@XXX.XXX.XXX.XXX:/vagrant |
I was having this same problem and the config.ssh.pty = true wasn't fixing anything. Like you I was using vagrant-rackspace 0.1.9. On a whim I decided to try downgrading to vagrant-rackspace 0.1.6 and suddenly everything started working. So try downgrading to a previous version. |
+1 on version 0.1.6 working correctly for RHEL/CentOS images. I tried using the latest version available from If a fix has been merged, please produce a new version of the plugin installer. If a fix has not been merged, please compare the tty code from 0.1.6 with 0.1.9 and provide an updated installer. FYI, for anyone needing to install the older version of the plugin, here is the command: |
Hello!
So, trying to kick up a new Rackspace server. Config looks a little like this:
Everythings all dandy, until it tries to rsync the current folder to /vagrant (the default option):
Side note: Would it be better to surround the -e argument in quotes to make it a bit more readable? Might make a separate issue for that...
This then works fine if I do a sed on the /etc/sudoers and remove the require tty line. But that's an extra step I'd rather avoid.
Could we an an extra step to either:
The text was updated successfully, but these errors were encountered: