Open timurb opened 9 years ago
timurb@macpro777:~$ vagrant --version
Vagrant 1.7.2
timurb@macpro777:~$ uname -a
Darwin macpro777 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
While I see no signs of script working looking from my PC, on the server the script continues to run:
local PC:
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: 0:
==> default: Sun Mar 22 17:50:15 UTC 2015
Remote server:
ubuntu 998 752 0 17:48 ? 00:00:00 sshd: ubuntu@notty
root 1298 998 0 17:50 ? 00:00:00 sudo -E -H bash -l
root 1299 1298 0 17:50 ? 00:00:00 bash -l
root 1308 1299 0 17:50 ? 00:00:00 bash -l
root 1311 615 0 17:50 ? 00:00:00 sshd: ubuntu [priv]
ubuntu 1425 1311 0 17:50 ? 00:00:00 sshd: ubuntu@pts/0
ubuntu 1426 1425 0 17:50 pts/0 00:00:00 -bash
root 1524 1426 0 17:50 pts/0 00:00:00 sudo -i
root 1525 1524 0 17:50 pts/0 00:00:00 -bash
root 1589 1308 0 18:00 ? 00:00:00 sleep 600
If I break the Vagrant run using Ctrl-C twice the script still continues working on the server:
ubuntu 998 752 0 17:48 ? 00:00:00 sshd: ubuntu@notty
root 1298 998 0 17:50 ? 00:00:00 sudo -E -H bash -l
root 1299 1298 0 17:50 ? 00:00:00 bash -l
root 1308 1299 0 17:50 ? 00:00:00 bash -l
root 1311 615 0 17:50 ? 00:00:00 sshd: ubuntu [priv]
ubuntu 1425 1311 0 17:50 ? 00:00:00 sshd: ubuntu@pts/0
ubuntu 1426 1425 0 17:50 pts/0 00:00:00 -bash
root 1524 1426 0 17:50 pts/0 00:00:00 sudo -i
root 1525 1524 0 17:50 pts/0 00:00:00 -bash
root 1595 1308 0 18:10 ? 00:00:00 sleep 600
At the moment I hit Ctrl-C the ssh session created by Vagrant is still seen from server side:
root 1283 1 0 19:41 ? 00:00:00 sudo -E -H bash -l
root 1284 1283 0 19:41 ? 00:00:00 bash -l
root 1293 1284 0 19:41 ? 00:00:00 bash -l
root 1296 597 0 19:44 ? 00:00:00 sshd: ubuntu [priv]
ubuntu 1410 1296 0 19:45 ? 00:00:00 sshd: ubuntu@pts/0
ubuntu 1411 1410 0 19:45 pts/0 00:00:00 -bash
root 1513 1293 0 20:01 ? 00:00:00 sleep 600
root 1514 2 0 20:08 ? 00:00:00 [flush-202:1]
root 1515 597 0 20:09 ? 00:00:00 sshd: ubuntu [priv]
ubuntu 1629 1515 0 20:09 ? 00:00:00 sshd: ubuntu@pts/1
ubuntu 1630 1629 2 20:09 pts/1 00:00:00 -bash
ubuntu 1728 1630 0 20:09 pts/1 00:00:00 ps -ef
ubuntu@ip-10-21-147-148:~$ sudo netstat -lapn | grep 22
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 597/sshd
tcp 0 144 10.21.147.148:22 188.162.39.11:52400 ESTABLISHED 1515/sshd: ubuntu [
tcp 0 0 10.21.147.148:22 188.162.39.11:51768 ESTABLISHED 1296/sshd: ubuntu [
tcp6 0 0 :::22 :::* LISTEN 597/sshd
On my PC side when I hit Ctrl-C the output changes not much and is going to be the following:
DEBUG ssh: Sending SSH keep-alive...
^C INFO interface: warn: Waiting for cleanup before exiting...
INFO interface: warn: ==> default: Waiting for cleanup before exiting...
==> default: Waiting for cleanup before exiting...
DEBUG ssh: Sending SSH keep-alive...
DEBUG ssh: Sending SSH keep-alive...
...
Hi,
When I use the following Vagrantfile the provisioning freezes when I use provider AWS (but works ok when I use provider Virtualbox):
If I set sleep interval as low as ~120 seconds I see 10 "echo" lines which I'd expect but when I set it large enough I see only the first "echo" line. I think I've seen that for as low as 300 seconds but I could not reproduce that. With 600 seconds reproduces reliably.
Here is the output of
vagrant up --debug --provider=aws
(stripped):The
DEBUG ssh: Sending SSH keep-alive...
lines repeat indefinitely each 5 seconds but after 10 minutes I see no new "echo" lines. If I reduce the interval or select virtualbox provider I'll see the output like the following: