vagrant halt exploding when VM's sshd/networking disappears too quickly #1505

Closed
aszeszo opened this Issue Mar 26, 2013 · 1 comment

Projects

None yet

2 participants

@aszeszo

I suspect halt is failing because ssh session is terminating before Vagrant is able to get exit code from the command that's been run over ssh (/usr/bin/pfexec /usr/sbin/poweroff).

Sample log below:
DEBUG ssh: == Net-SSH connection debug-level log END ==
INFO ssh: SSH is ready!
INFO machine: Loading guest: solaris
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: /usr/bin/pfexec /usr/sbin/poweroff (sudo=false)
ERROR warden: Error occurred: closed stream
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: closed stream
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x00000101ab9828
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: closed stream
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x00000101ac54e8
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO lock: Unlocking: /Users/aszeszo/vagrant3/.vagrant/machines/default/vmware_fusion/lock
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Running hook: environment_unload
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: #Vagrant::Action::Builder:0x00000101970200
INFO warden: Calling action: #HashiCorp::Activation::BackgroundCheckEnd:0x0000010196deb0
INFO logger: Cleaning up background activation thread...
/Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/ruby_compat.rb:22:in select': closed stream (IOError)
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/ruby_compat.rb:22:in
io_select'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/packet_stream.rb:73:in available_for_read?'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/packet_stream.rb:85:in
next_packet'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:171:in block in poll_message'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:166:in
loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/transport/session.rb:166:in poll_message'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:451:in
dispatch_incoming_packets'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:213:in preprocess'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:197:in
process'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in block in loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in
loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/session.rb:161:in loop'
from /Applications/Vagrant/embedded/gems/gems/net-ssh-2.2.2/lib/net/ssh/connection/channel.rb:269:in
wait'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/communicators/ssh/communicator.rb:294:in shell_execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/communicators/ssh/communicator.rb:61:in
block in execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/communicators/ssh/communicator.rb:138:in connect'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/communicators/ssh/communicator.rb:60:in
execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/guests/solaris/guest.rb:48:in halt'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/graceful_halt.rb:47:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builder.rb:109:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/util/busy.rb:19:in
busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/call.rb:43:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in call'
from /Users/aszeszo/.vagrant.d/gems/gems/vagrant-vmware-fusion-0.4.0/lib/vagrant-vmware-fusion/action_farm.rb:211:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in
block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/util/busy.rb:19:in busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in
run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/call.rb:51:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/lock.rb:42:in block in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/lock.rb:27:in
open'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/lock.rb:27:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in
call'
from /Users/aszeszo/.vagrant.d/gems/gems/vagrant-vmware-fusion-0.4.0/lib/vagrant-vmware-fusion/action_farm.rb:986:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in
call'
from /Users/aszeszo/.vagrant.d/gems/gems/vagrant-vmware-fusion-0.4.0/lib/vagrant-vmware-fusion/action_farm.rb:108:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builtin/config_validate.rb:25:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/warden.rb:34:in
call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/builder.rb:109:in call'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in
block in run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/util/busy.rb:19:in busy'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/action/runner.rb:61:in
run'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/machine.rb:129:in action'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/halt/command.rb:25:in
block in execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/plugin/v2/command.rb:182:in block in with_target_vms'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/plugin/v2/command.rb:180:in
each'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/plugin/v2/command.rb:180:in with_target_vms'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/plugins/commands/halt/command.rb:24:in
execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/cli.rb:46:in execute'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/lib/vagrant/environment.rb:406:in
cli'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.1.0/bin/vagrant:60:in <top (required)>'
from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in
load'
from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `

'

@mitchellh
Owner

Fixed!

@mitchellh mitchellh closed this Mar 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment