staypuft 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/lib/actions/staypuft/host/wait_until_ready.rb +16 -2
- data/lib/staypuft/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd64239cd0fdf64f05f4ece53506110596323911
|
4
|
+
data.tar.gz: 113d7d8b349b75bb5774503963ac8b17b8d3eb36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c8ceedace14908cc583ebeda720605ab7ac771358d47d914c2325a29307f8aa701ce9a3f931c04d0c11e21936f4a09f57afe3ed93346e0acc246860660cc82b
|
7
|
+
data.tar.gz: 2813a4656231e0517ea90ffc4de30bc7dd742f4756ef9364b244139ef60c3aaf3e5f52d7f741f56cc541889a56dfd663c67d5042765669824e0a2836e2746d4b
|
@@ -16,6 +16,8 @@ module Actions
|
|
16
16
|
|
17
17
|
class WaitUntilReady < Actions::Base
|
18
18
|
|
19
|
+
STARTUP_GRACE_PERIOD = 60
|
20
|
+
|
19
21
|
middleware.use Actions::Staypuft::Middleware::AsCurrentUser
|
20
22
|
include Dynflow::Action::Polling
|
21
23
|
|
@@ -42,14 +44,26 @@ module Actions
|
|
42
44
|
end
|
43
45
|
|
44
46
|
def poll_external_task
|
45
|
-
|
46
|
-
|
47
|
+
if !output[:ssh_port_open_at] && check_ssh_port_open
|
48
|
+
output[:ssh_port_open_at] ||= Time.now.to_i
|
49
|
+
end
|
50
|
+
|
51
|
+
if output[:ssh_port_open_at]
|
52
|
+
Time.now.to_i - output[:ssh_port_open_at] > STARTUP_GRACE_PERIOD
|
53
|
+
else
|
54
|
+
false
|
55
|
+
end
|
47
56
|
end
|
48
57
|
|
49
58
|
def poll_interval
|
50
59
|
5
|
51
60
|
end
|
52
61
|
|
62
|
+
def check_ssh_port_open
|
63
|
+
host = ::Host.find input.fetch(:host_id)
|
64
|
+
host.send :ssh_open?, host.ip
|
65
|
+
end
|
66
|
+
|
53
67
|
end
|
54
68
|
end
|
55
69
|
end
|
data/lib/staypuft/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: staypuft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Staypuft team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|