vagrant-mos 0.8.51 → 0.8.52
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36b4e3462904aee8e2fc8a3dd6f742ad1c8100f9
|
4
|
+
data.tar.gz: d227cc8c001846eef4c5f3d5df7043c2a54576fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d29f70e17783f251af7d3ddc5baef0950249c710498b47eeb61f4e7afd02543e34d0a0878b1492c0d405a8cd7599c284829e5599c7a3517d7f3a412444d12505
|
7
|
+
data.tar.gz: 86d9b7a9fd6839d829a405517f082622a19ac3588c29b5588928519ec41d0a10f6ed422d11645371bfe1512f406ee521a05f52c49d7904729d63b5a1652632e1
|
@@ -123,7 +123,7 @@ module VagrantPlugins
|
|
123
123
|
rescue Fog::Compute::MOS::Error => e
|
124
124
|
raise Errors::FogError, :message => e.message
|
125
125
|
rescue Excon::Errors::HTTPStatusError => e
|
126
|
-
raise Errors::
|
126
|
+
raise Errors::InternalMosError,
|
127
127
|
:error => e.message,
|
128
128
|
:response => e.response.body
|
129
129
|
|
@@ -36,22 +36,27 @@ module VagrantPlugins
|
|
36
36
|
tries = region_config.instance_ready_timeout / 2
|
37
37
|
|
38
38
|
env[:ui].info(I18n.t("vagrant_mos.waiting_for_ready"))
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
39
|
+
begin
|
40
|
+
retryable(:on => Errors::InstanceReadyTimeout, :tries => tries) do
|
41
|
+
# If we're interrupted don't worry about waiting
|
42
|
+
next if env[:interrupted]
|
43
|
+
|
44
|
+
# Wait for the server to be ready
|
45
|
+
#server.wait_for(2) { ready? }
|
46
|
+
if(server["status"] == "running")
|
47
|
+
break
|
48
|
+
else
|
49
|
+
sleep(2)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
rescue Errors::InstanceReadyTimeout
|
53
|
+
# Notify the user
|
54
|
+
raise Errors::InstanceReadyTimeout,
|
55
|
+
timeout: region_config.instance_ready_timeout
|
56
|
+
end
|
52
57
|
end
|
53
|
-
rescue
|
54
|
-
raise Errors::
|
58
|
+
rescue MOS::Error => e
|
59
|
+
raise Errors::MosError, :message => e.message
|
55
60
|
end
|
56
61
|
|
57
62
|
@logger.info("Time to instance ready: #{env[:metrics]["instance_ready_time"]}")
|
data/lib/vagrant-mos/errors.rb
CHANGED
@@ -7,12 +7,12 @@ module VagrantPlugins
|
|
7
7
|
error_namespace("vagrant_mos.errors")
|
8
8
|
end
|
9
9
|
|
10
|
-
class
|
11
|
-
error_key(:
|
10
|
+
class MosError < VagrantMOSError
|
11
|
+
error_key(:mos_error)
|
12
12
|
end
|
13
13
|
|
14
|
-
class
|
15
|
-
error_key(:
|
14
|
+
class InternalMosError < VagrantMOSError
|
15
|
+
error_key(:internal_mos_error)
|
16
16
|
end
|
17
17
|
|
18
18
|
class InstanceReadyTimeout < VagrantMOSError
|
data/lib/vagrant-mos/version.rb
CHANGED