Skip to content

Commit

Permalink
Fix IP address for docker swarm, cut v1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljb committed Apr 20, 2017
1 parent 11eced2 commit 05eafb8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.12.0
current_version = 1.12.1
tag = true
commit = true

Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.12.1 (2017-03-07)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.12.1)

- If no valid adapters can be found on a host when using the `real_nic_ip`
option, fall back to the value of `vm.guest.ipAddress`. This resolves an
issue where the network changes made by Docker Swarm prevent vagrant-vsphere
from acquiring the VM's IP address.

## [1.12.0 (2017-03-07)](https://github.com/nsidc/vagrant-vsphere/releases/tag/v1.12.0)

- Make `wait_for_sysprep` functionality configurable (see README.md for
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ This provider is built on top of the
* libxml2, libxml2-dev, libxslt, libxslt-dev

## Current Version
**version: 1.12.0**
**version: 1.12.1**

vagrant-vsphere (**version: 1.12.0**) is available from
vagrant-vsphere (**version: 1.12.1**) is available from
[RubyGems.org](https://rubygems.org/gems/vagrant-vsphere)

## Installation
Expand Down
3 changes: 2 additions & 1 deletion lib/vSphere/action/get_ssh_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def filter_guest_nic(vm, machine)
interfaces = vm.guest.net.select { |g| g.deviceConfigId > 0 }
ip_addresses = interfaces.map { |i| i.ipConfig.ipAddress.select { |a| a.state == 'preferred' } }.flatten

return nil if ip_addresses.empty?
return (vm.guest.ipAddress || nil) if ip_addresses.empty?

fail Errors::VSphereError.new, :'multiple_interface_with_real_nic_ip_set' if ip_addresses.size > 1
ip_addresses.first.ipAddress
end
Expand Down
2 changes: 1 addition & 1 deletion lib/vSphere/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module VSphere
VERSION = '1.12.0'
VERSION = '1.12.1'
end
end

0 comments on commit 05eafb8

Please sign in to comment.