Closed pstadler closed 8 years ago
Also have this problem in MacOS 10.9.4
Are you connecting to an Ubuntu host?
yes, precise64.box
Probably the only good solution is to edit /root/.profile
and replace mesg n
with tty -s && mesg n
. See here: https://github.com/mitchellh/vagrant/issues/1673#issuecomment-24404605
Thanks
FWIW ssh2
supports requesting a pty when executing commands. That may help get around this message.
@mscdex, thanks for the hint and for doing all the hard work that makes this project here possible. I know about the PTY option but I'm a bit afraid that enabling it might leads to unexpected behavior and confusion when multiple hosts are asking for user input at the same time. If you've got the time, let me what you think.
@pstadler I'm not sure what you mean by "confusion when multiple hosts are asking for user input at the same time." Each exec()
has its own stream and would have its own pty on the remote side.
stdin is still shared. That means both processes would print the user input at the same time, things like that.
Requesting a pty on the remote side should not affect the stdin of the local system or anything like that. It's only asking the remote server to request a new pty for that particular command on the remote side.
stream
is still just the same plain old stream as before. The only difference is that whatever command you're executing remotely will think it's being run inside a real terminal, so programs like sudo
will actually prompt you for a password and things like that instead of ordinarily just outright failing when sudo
or whatever program does not detect a tty.
Flightplan executes tasks on remote hosts in parallel which means that multiple hosts might ask for user input at the same time and all the sessions will receive the same input.
Correct me if I'm wrong, but there's no event being triggered when a remote host asks for user input, right? The ultimate solution would be to capture stdin and send it to the first host asking for user input, then the next, and so on.
Anyway, I will look into this as soon as possible and post the results here.
see also mitchellh/vagrant/issues/1673