communicators/ssh: clean error on max session [GH-4044]

This commit is contained in:
Mitchell Hashimoto 2014-08-08 09:11:25 -07:00
parent 0597344af4
commit 0da5d7b650
4 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,7 @@ BUG FIXES:
- commands/package: base package won't crash with exception [GH-4017]
- commands/rsync-auto: Destroyed machines won't raise exceptions. [GH-4031]
- communicators/ssh: Nicer error if remote unexpectedly disconects. [GH-4038]
- communicators/ssh: Clean error when max sessions is hit. [GH-4044]
- communicators/winrm: Support `mkdir` [GH-4271]
- guests/centos: Fix issues when NFS client is installed by restarting
NFS [GH-4088]

View File

@ -576,6 +576,10 @@ module Vagrant
error_key(:ssh_authentication_failed)
end
class SSHChannelOpenFail < VagrantError
error_key(:ssh_channel_open_fail)
end
class SSHConnectEACCES < VagrantError
error_key(:ssh_connect_eacces)
end

View File

@ -520,6 +520,8 @@ module VagrantPlugins
@logger.info(
"SSH connection unexpected closed. Assuming reboot or something.")
exit_status = 0
rescue Net::SSH::ChannelOpenFailed
raise Vagrant::Errors::SSHChannelOpenFail
rescue Net::SSH::Disconnect
raise Vagrant::Errors::SSHDisconnected
end

View File

@ -973,6 +973,11 @@ en:
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
ssh_channel_open_fail: |-
Failed to open an SSH channel on the remote end! This typically
means that the maximum number of active sessions was hit on the
SSH server. Please configure your remote SSH server to resolve
this issue.
ssh_connect_eacces: |-
SSH is getting permission denied errors when attempting to connect
to the IP for SSH. This is usually caused by network rules and not being