core: don't lock machines on SSH access
This commit is contained in:
parent
c724130a4d
commit
86aef2249b
|
@ -10,6 +10,7 @@ IMPROVEMENTS:
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
- core: Hostnames can be one character. [GH-3713]
|
- core: Hostnames can be one character. [GH-3713]
|
||||||
|
- core: Don't lock machines on SSH actions. [GH-3664]
|
||||||
|
|
||||||
## 1.6.1 (May 7, 2014)
|
## 1.6.1 (May 7, 2014)
|
||||||
|
|
||||||
|
|
|
@ -151,8 +151,14 @@ module Vagrant
|
||||||
# Create a deterministic ID for this machine
|
# Create a deterministic ID for this machine
|
||||||
id = Digest::MD5.hexdigest("#{@env.root_path}#{@name}")
|
id = Digest::MD5.hexdigest("#{@env.root_path}#{@name}")
|
||||||
|
|
||||||
|
# We only lock if we're not executing an SSH action. In the future
|
||||||
|
# we will want to do more fine-grained unlocking in actions themselves
|
||||||
|
# but for a 1.6.2 release this will work.
|
||||||
|
locker = Proc.new { |*args| yield }
|
||||||
|
locker = @env.method(:lock) if !name.to_s.start_with?("ssh")
|
||||||
|
|
||||||
# Lock this machine for the duration of this action
|
# Lock this machine for the duration of this action
|
||||||
@env.lock("machine-action-#{id}") do
|
locker.call("machine-action-#{id}") do
|
||||||
# Get the callable from the provider.
|
# Get the callable from the provider.
|
||||||
callable = @provider.action(name)
|
callable = @provider.action(name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue