autostacker24 1.0.45 → 1.0.46
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/lib/autostacker24/stacker.rb +4 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4655029e5cf19a37d70d631446ce05ee30a1ee60
|
4
|
+
data.tar.gz: 1f76539af6d34ab3cedadb20788227b7cd1cb99c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c868b8f9a15d8178a5c4a4470b9087319024f1c680282789f07c4a461e324d2e03fbff7844957592efb0ec006398059b77701db7217c0c2f46f0ef68d8cb49
|
7
|
+
data.tar.gz: a8d88569888862f9888254fc2209104dfb67244d5b53aee21a0e47da5b30baf384665e2e4f1030a3c2d5ea12f119a88c5e780a3c33aaa865e4bec19177887a48
|
@@ -41,6 +41,7 @@ module Stacker
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def update_stack(stack_name, template, parameters, parent_stack_name = nil)
|
44
|
+
seen_events = get_stack_events(stack_name).map {|e| e[:event_id] }
|
44
45
|
begin
|
45
46
|
merge_and_validate(template, parameters, parent_stack_name)
|
46
47
|
cloud_formation.update_stack(stack_name: stack_name,
|
@@ -51,7 +52,7 @@ module Stacker
|
|
51
52
|
raise error unless error.message =~ /No updates are to be performed/i # may be flaky, do more research in API
|
52
53
|
find_stack(stack_name)
|
53
54
|
else
|
54
|
-
wait_for_stack(stack_name, :update)
|
55
|
+
wait_for_stack(stack_name, :update, seen_events)
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
@@ -82,15 +83,12 @@ module Stacker
|
|
82
83
|
wait_for_stack(stack_name, :delete)
|
83
84
|
end
|
84
85
|
|
85
|
-
def wait_for_stack(stack_name, operation,
|
86
|
+
def wait_for_stack(stack_name, operation, seen_events = Set.new)
|
87
|
+
timeout_in_minutes = 60 # for now
|
86
88
|
stop_time = Time.now + timeout_in_minutes * 60
|
87
89
|
finished = /(CREATE_COMPLETE|UPDATE_COMPLETE|DELETE_COMPLETE|ROLLBACK_COMPLETE|ROLLBACK_FAILED|CREATE_FAILED|DELETE_FAILED)$/
|
88
|
-
seen_events = Set.new
|
89
|
-
|
90
90
|
puts "waiting for #{operation} stack #{stack_name}"
|
91
91
|
|
92
|
-
get_stack_events(stack_name).each {|e| seen_events << e[:event_id] }
|
93
|
-
|
94
92
|
while Time.now < stop_time
|
95
93
|
stack = find_stack(stack_name)
|
96
94
|
status = stack ? stack.stack_status : 'DELETE_COMPLETE'
|