mitchellh / vagrant-aws

Use Vagrant to manage your EC2 and VPC instances.
MIT License
2.61k stars 574 forks source link

Vagrant provision doesn't continue on interruption #474

Open kenorb opened 8 years ago

kenorb commented 8 years ago

I've Vagrantfile where I've 4 provision scripts and I run few vagrant provision scripts in parallel from my laptop.

Since the process is lengthy (couple of hours), I had to hibernate my machine to continue the provisioning somewhere else.

The structure is like:

  1. config.vm.provision "shell", path: "scripts/run1.sh"
  2. config.vm.provision "shell", path: "scripts/run2.sh"
  3. config.vm.provision "shell", path: "scripts/run3.sh"
  4. config.vm.provision "shell", path: "scripts/run4.sh"

and while running for example run3.sh, I decided to temporary suspend my machine.

I'm redirecting all the output into the log file, so I'm aware whether the process is continuing or not.

The problem is that when I've my laptop running again, the processes seems to be stuck. The log doesn't print anything (I'm printing ping message every 20 seconds) and I see all these ruby/vagrant processes in the background, e.g.

$ sudo dtruss -fp 65475
    PID/THRD  SYSCALL(args)          = return
65475/0x43478f:  sigprocmask(0x1, 0x0, 0x7000001046B0)       = 0x0 0
65475/0x43478f:  sigaltstack(0x0, 0x7000001046A0, 0x7000001046B0)        = 0 0
65475/0x43478f:  gettimeofday(0x700000104640, 0x0, 0x7000001046B0)       = 1467019041 0
65475/0x43478f:  psynch_cvwait(0x107D34570, 0x22B1010022B200, 0x0)       = -1 Err#316
65475/0x43478f:  sigprocmask(0x1, 0x0, 0x7000001046B0)       = 0x0 0
65475/0x43478f:  sigaltstack(0x0, 0x7000001046A0, 0x7000001046B0)        = 0 0
65475/0x43478f:  gettimeofday(0x700000104640, 0x0, 0x7000001046B0)       = 1467019046 0
65475/0x43478f:  psynch_cvwait(0x107D34570, 0x22B2010022B300, 0x0)       = -1 Err#316
65475/0x43478f:  sigprocmask(0x1, 0x0, 0x7000001046B0)       = 0x0 0

Is there any way to fix that problem, so since the process is still running, shouldn't be able to re-connect back to EC2 instance? Currently psynch_cvwait is giving 316 error.