vector 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vector.rb +5 -1
- data/lib/vector/functions/flexible_down_scaling.rb +3 -2
- data/lib/vector/functions/predictive_scaling.rb +17 -3
- data/lib/vector/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: 07a60786d7b8111e9a6d00a5a316477e385e5066
|
4
|
+
data.tar.gz: 355b002c3f11ae3ac4eb6dc440c06f2ac5a80730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9902bc75ba6da80cf50325d6ea68e0b1ce0be41ffcbd83de825e3690bcd7212a38ca52e8153016c31c4110f48536b98a7812b9ccb75dd947d77b593c52839581
|
7
|
+
data.tar.gz: d69df377f6ed4eb40bf47b805c6392c5dd1a6cdbadfd395dc694da6fa9d37bcc454bbf5f12aaf0da08bfb146118b7db31539bdad9ad9317d00661a4f695ae566
|
data/lib/vector.rb
CHANGED
@@ -48,7 +48,7 @@ module Vector
|
|
48
48
|
if policy.adjustment_type == "ChangeInCapacity" &&
|
49
49
|
ps_check_procs &&
|
50
50
|
ps_check_procs.any? {|ps_check_proc|
|
51
|
-
ps_check_proc.call(group.desired_capacity + policy.scaling_adjustment) }
|
51
|
+
ps_check_proc.call(group.desired_capacity + policy.scaling_adjustment, self) }
|
52
52
|
hlog("Predictive scaleup would trigger a scaleup if group were shrunk")
|
53
53
|
next
|
54
54
|
end
|
@@ -130,9 +130,10 @@ module Vector
|
|
130
130
|
hlog("Not all datapoints are beneath the variable threshold #{(threshold * 100).to_i}: #{stats.datapoints}")
|
131
131
|
next
|
132
132
|
end
|
133
|
+
|
134
|
+
hlog("Variable threshold: #{(threshold * 100).to_i}, #{group.desired_capacity} nodes")
|
133
135
|
end
|
134
136
|
|
135
|
-
outside_cooldown = outside_cooldown_period(group)
|
136
137
|
unless outside_cooldown_period(group)
|
137
138
|
hlog("Group is not outside the specified cooldown periods")
|
138
139
|
next
|
@@ -75,15 +75,29 @@ module Vector
|
|
75
75
|
|
76
76
|
# now take the past total load and divide it by the
|
77
77
|
# current number of instances to get the predicted value
|
78
|
-
|
78
|
+
|
79
|
+
# (we capture our original log context here in order to display
|
80
|
+
# the source of these checks later when this proc is called by
|
81
|
+
# scaledown stuff).
|
82
|
+
orig_ctx = hlog_ctx_string
|
83
|
+
check_proc = Proc.new do |num_nodes, logger|
|
79
84
|
predicted_value = past_load.to_f / num_nodes
|
80
|
-
|
85
|
+
|
86
|
+
log_str = "Predicted #{alarm.metric.name}: #{predicted_value} (#{num_nodes} nodes)"
|
87
|
+
|
88
|
+
# Tack on the original context if we're in a different logger
|
89
|
+
# (for the case where this is called during scaledown checks).
|
90
|
+
if orig_ctx != logger.hlog_ctx_string
|
91
|
+
log_str += " (from #{orig_ctx})"
|
92
|
+
end
|
93
|
+
|
94
|
+
logger.hlog log_str
|
81
95
|
|
82
96
|
check_alarm_threshold(alarm, predicted_value)
|
83
97
|
end
|
84
98
|
result[:check_procs] << check_proc
|
85
99
|
|
86
|
-
if check_proc.call(now_num)
|
100
|
+
if check_proc.call(now_num, self)
|
87
101
|
if @dry_run
|
88
102
|
hlog "Executing policy (DRY RUN)"
|
89
103
|
else
|
data/lib/vector/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Wily
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|