vagrant-skytap 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/vagrant-skytap/cap/host_metadata.rb +24 -24
- data/lib/vagrant-skytap/version.rb +1 -1
- metadata +30 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baf5d3c0b7fd0393c8740ccae53bb5f25265b057
|
4
|
+
data.tar.gz: fa4d72e87ee859399de360dabb0b81431c789005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92bdf1421b8320b29235963ca160804ab6c0890f0965187c4e7a9cecd50e551d8d7257f754057195b9ee40f1daacd8c12991ee11216a4d2e1ddacf714584e5ab
|
7
|
+
data.tar.gz: 7f1d027f8a4909b5da9e3d705f222ec4a2c72f8909f41ae79a3475d74282f106af70a64a95d57b0b9f9f457e9081cf889f05c038451280bd2b3fd2f1e7bc022e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 0.3.5 (January 3, 2017)
|
2
|
+
|
3
|
+
* Increase metadata service timeout, improve logging, handle still more errors (actually
|
4
|
+
rescue all system call errors)
|
5
|
+
|
1
6
|
# 0.3.4 (April 27, 2016)
|
2
7
|
|
3
8
|
* Add handling for additional network errors when fetching Skytap VM metadata.
|
@@ -22,7 +27,7 @@
|
|
22
27
|
* New functionality to support running Vagrant from within a Skytap VM. The connection between host and
|
23
28
|
guest will be made over a network tunnel between the two Skytap environments.
|
24
29
|
* `vagrant ssh` now shows the expected error when the machine is not running.
|
25
|
-
* Support unattended `vagrant up` by automatically choosing the only available connection option.
|
30
|
+
* Support unattended `vagrant up` by automatically choosing the only available connection option.
|
26
31
|
|
27
32
|
# 0.2.10 (March 17, 2016)
|
28
33
|
|
@@ -29,8 +29,8 @@ module VagrantPlugins
|
|
29
29
|
module Cap
|
30
30
|
module HostMetadata
|
31
31
|
METADATA_LINK_LOCAL_ADDRESS = '169.254.169.254'
|
32
|
-
OPEN_TIMEOUT =
|
33
|
-
READ_TIMEOUT =
|
32
|
+
OPEN_TIMEOUT = 5
|
33
|
+
READ_TIMEOUT = 15
|
34
34
|
|
35
35
|
# If Vagrant is running in a Skytap VM, returns metadata from which an
|
36
36
|
# [API::Vm] can be constructed. Otherwise returns nil.
|
@@ -40,10 +40,10 @@ module VagrantPlugins
|
|
40
40
|
def self.host_metadata(machine)
|
41
41
|
logger = Log4r::Logger.new("vagrant_skytap::cap::host_metadata")
|
42
42
|
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# address.
|
43
|
+
# A Skytap VM can request information about itself from the metadata
|
44
|
+
# service at http://gw/skytap. If the network is set to use custom
|
45
|
+
# DNS, 'gw' may resolve to something else, in which case we fall back
|
46
|
+
# to the service's link local address.
|
47
47
|
['gw', METADATA_LINK_LOCAL_ADDRESS].each do |host|
|
48
48
|
begin
|
49
49
|
http = Net::HTTP.new(host)
|
@@ -52,36 +52,36 @@ module VagrantPlugins
|
|
52
52
|
|
53
53
|
# Test for a working web server before actually hitting the
|
54
54
|
# metadata service. The response is expected to be 404.
|
55
|
+
logger.debug("Checking for HTTP service on host '#{host}' ...")
|
55
56
|
http.request(Net::HTTP::Get.new("/"))
|
56
57
|
|
57
58
|
begin
|
59
|
+
logger.debug("Fetching VM metadata from http://#{host}/skytap ...")
|
58
60
|
response = http.request(Net::HTTP::Get.new("/skytap"))
|
59
61
|
rescue Timeout::Error => ex
|
62
|
+
logger.debug("The request timed out.")
|
60
63
|
raise Errors::MetadataServiceUnavailable
|
61
64
|
end
|
62
65
|
|
63
|
-
if response.is_a?(Net::
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
logger.debug(
|
66
|
+
if response.is_a?(Net::HTTPOK)
|
67
|
+
if (attrs = JSON.parse(response.body)) && attrs.key?('configuration_url')
|
68
|
+
logger.debug('Metadata retrieved successfully.')
|
69
|
+
return attrs
|
70
|
+
end
|
71
|
+
logger.debug('The response did not contain VM metadata.')
|
72
|
+
logger.debug("Response body: #{response.body}")
|
73
|
+
else
|
74
|
+
logger.debug("The server responded with status #{response.code}.")
|
75
|
+
logger.debug("Response body: #{response.body}")
|
76
|
+
raise Errors::MetadataServiceUnavailable if response.is_a?(Net::HTTPServerError)
|
69
77
|
end
|
70
|
-
rescue SocketError => ex
|
71
|
-
logger.debug(
|
72
|
-
|
73
|
-
logger.debug("No route exists for '#{host}'.")
|
74
|
-
rescue Errno::EHOSTDOWN => ex
|
75
|
-
logger.debug("The OS reported that '#{host}' is down.")
|
76
|
-
rescue Errno::ECONNREFUSED => ex
|
77
|
-
logger.debug("The connection was refused by '#{host}'.")
|
78
|
-
rescue Timeout::Error => ex
|
79
|
-
logger.debug("Response timed out for '#{host}'.")
|
80
|
-
rescue JSON::ParserError
|
81
|
-
logger.debug("Response from '#{host}' was garbled.")
|
78
|
+
rescue SystemCallError, SocketError, Timeout::Error, JSON::ParserError => ex
|
79
|
+
logger.debug(ex)
|
80
|
+
logger.debug("Response body: #{response.body}") if response.try(:body)
|
82
81
|
end
|
83
82
|
end
|
84
83
|
|
84
|
+
logger.debug("Could not obtain VM metadata. Host is not a Skytap VM.")
|
85
85
|
nil
|
86
86
|
end
|
87
87
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-skytap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric True
|
@@ -9,104 +9,104 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec-core
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 2.14.0
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 2.14.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rspec-expectations
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 2.14.0
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 2.14.0
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rspec-mocks
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - ~>
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 2.14.0
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- - ~>
|
81
|
+
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: 2.14.0
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: vagrant-spec
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: 1.4.0
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: 1.4.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: webmock
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - ~>
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '1.20'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - ~>
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '1.20'
|
112
112
|
description: Enables Vagrant to manage Skytap machines.
|
@@ -117,13 +117,19 @@ executables: []
|
|
117
117
|
extensions: []
|
118
118
|
extra_rdoc_files: []
|
119
119
|
files:
|
120
|
+
- ".gitignore"
|
121
|
+
- CHANGELOG.md
|
122
|
+
- Gemfile
|
123
|
+
- LICENSE
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- boxes/README.md
|
127
|
+
- boxes/Vagrantfile
|
120
128
|
- boxes/empty.box
|
121
129
|
- boxes/metadata.json
|
122
|
-
- boxes/README.md
|
123
130
|
- boxes/ubuntu-1204-x64-us-west.box
|
124
|
-
-
|
125
|
-
-
|
126
|
-
- Gemfile
|
131
|
+
- lib/vagrant-skytap.rb
|
132
|
+
- lib/vagrant-skytap/action.rb
|
127
133
|
- lib/vagrant-skytap/action/action_helpers.rb
|
128
134
|
- lib/vagrant-skytap/action/add_vm_to_environment.rb
|
129
135
|
- lib/vagrant-skytap/action/check_created.rb
|
@@ -167,7 +173,6 @@ files:
|
|
167
173
|
- lib/vagrant-skytap/action/timed_provision.rb
|
168
174
|
- lib/vagrant-skytap/action/update_hardware.rb
|
169
175
|
- lib/vagrant-skytap/action/wait_for_communicator.rb
|
170
|
-
- lib/vagrant-skytap/action.rb
|
171
176
|
- lib/vagrant-skytap/api/client.rb
|
172
177
|
- lib/vagrant-skytap/api/connectable.rb
|
173
178
|
- lib/vagrant-skytap/api/credentials.rb
|
@@ -193,11 +198,11 @@ files:
|
|
193
198
|
- lib/vagrant-skytap/command/publish_url/show.rb
|
194
199
|
- lib/vagrant-skytap/command/up.rb
|
195
200
|
- lib/vagrant-skytap/config.rb
|
201
|
+
- lib/vagrant-skytap/connection.rb
|
196
202
|
- lib/vagrant-skytap/connection/public_ip_choice.rb
|
197
203
|
- lib/vagrant-skytap/connection/published_service_choice.rb
|
198
204
|
- lib/vagrant-skytap/connection/tunnel_choice.rb
|
199
205
|
- lib/vagrant-skytap/connection/vpn_choice.rb
|
200
|
-
- lib/vagrant-skytap/connection.rb
|
201
206
|
- lib/vagrant-skytap/core_ext/object/blank.rb
|
202
207
|
- lib/vagrant-skytap/core_ext/object/tap.rb
|
203
208
|
- lib/vagrant-skytap/core_ext/try.rb
|
@@ -218,11 +223,7 @@ files:
|
|
218
223
|
- lib/vagrant-skytap/util/timer.rb
|
219
224
|
- lib/vagrant-skytap/version.rb
|
220
225
|
- lib/vagrant-skytap/vm_properties.rb
|
221
|
-
- lib/vagrant-skytap.rb
|
222
|
-
- LICENSE
|
223
226
|
- locales/en.yml
|
224
|
-
- Rakefile
|
225
|
-
- README.md
|
226
227
|
- spec/acceptance/base.rb
|
227
228
|
- spec/acceptance/shared/context_skytap.rb
|
228
229
|
- spec/acceptance/skeletons/generic/Vagrantfile
|
@@ -273,7 +274,6 @@ files:
|
|
273
274
|
- tasks/test.rake
|
274
275
|
- vagrant-skytap.gemspec
|
275
276
|
- vagrant-spec.config.rb
|
276
|
-
- .gitignore
|
277
277
|
homepage: http://www.skytap.com
|
278
278
|
licenses:
|
279
279
|
- MIT
|
@@ -284,17 +284,17 @@ require_paths:
|
|
284
284
|
- lib
|
285
285
|
required_ruby_version: !ruby/object:Gem::Requirement
|
286
286
|
requirements:
|
287
|
-
- -
|
287
|
+
- - ">="
|
288
288
|
- !ruby/object:Gem::Version
|
289
289
|
version: '0'
|
290
290
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
291
291
|
requirements:
|
292
|
-
- -
|
292
|
+
- - ">="
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: 1.3.6
|
295
295
|
requirements: []
|
296
296
|
rubyforge_project: vagrant-skytap
|
297
|
-
rubygems_version: 2.
|
297
|
+
rubygems_version: 2.4.5
|
298
298
|
signing_key:
|
299
299
|
specification_version: 4
|
300
300
|
summary: Vagrant provider plugin for Skytap.
|