big_brother 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,11 @@
1
1
  module BigBrother
2
2
  class Cluster
3
- attr_reader :fwmark, :scheduler, :check_interval, :nodes, :name, :persistent, :ramp_up_time, :nagios
3
+ attr_reader :fwmark, :scheduler, :check_interval, :nodes, :name, :ramp_up_time, :nagios
4
4
 
5
5
  def initialize(name, attributes = {})
6
6
  @name = name
7
7
  @fwmark = attributes[:fwmark]
8
8
  @scheduler = attributes[:scheduler]
9
- @persistent = attributes.fetch(:persistent, 300)
10
9
  @check_interval = attributes.fetch(:check_interval, 1)
11
10
  @monitored = false
12
11
  @nodes = attributes.fetch(:nodes, []).map { |node_config| _coerce_node(node_config) }
@@ -44,7 +43,7 @@ module BigBrother
44
43
 
45
44
  def start_monitoring!
46
45
  BigBrother.logger.info "starting monitoring on cluster #{to_s}"
47
- BigBrother.ipvs.start_cluster(@fwmark, @scheduler, @persistent)
46
+ BigBrother.ipvs.start_cluster(@fwmark, @scheduler)
48
47
  @nodes.each do |node|
49
48
  BigBrother.ipvs.start_node(@fwmark, node.address, 100)
50
49
  end
@@ -4,8 +4,8 @@ module BigBrother
4
4
  @executor = executor
5
5
  end
6
6
 
7
- def start_cluster(fwmark, scheduler, persistent)
8
- @executor.invoke("ipvsadm --add-service --fwmark-service #{fwmark} --scheduler #{scheduler} --persistent #{persistent}")
7
+ def start_cluster(fwmark, scheduler)
8
+ @executor.invoke("ipvsadm --add-service --fwmark-service #{fwmark} --scheduler #{scheduler}")
9
9
  end
10
10
 
11
11
  def stop_cluster(fwmark)
@@ -1,3 +1,3 @@
1
1
  module BigBrother
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
@@ -168,7 +168,7 @@ CombinedWeight: 60
168
168
  last_response.status.should == 200
169
169
  last_response.body.should == "OK"
170
170
  BigBrother.clusters['test'].should be_monitored
171
- @stub_executor.commands.should include("ipvsadm --add-service --fwmark-service 100 --scheduler wrr --persistent 300")
171
+ @stub_executor.commands.should include("ipvsadm --add-service --fwmark-service 100 --scheduler wrr")
172
172
  @stub_executor.commands.should include("ipvsadm --add-server --fwmark-service 100 --real-server 127.0.0.1 --ipip --weight 100")
173
173
  @stub_executor.commands.should include("ipvsadm --add-server --fwmark-service 100 --real-server 127.0.0.2 --ipip --weight 100")
174
174
  end
@@ -13,7 +13,7 @@ describe BigBrother::Cluster do
13
13
  cluster = Factory.cluster(:fwmark => 100, :scheduler => 'wrr')
14
14
 
15
15
  cluster.start_monitoring!
16
- @stub_executor.commands.should include('ipvsadm --add-service --fwmark-service 100 --scheduler wrr --persistent 300')
16
+ @stub_executor.commands.should include('ipvsadm --add-service --fwmark-service 100 --scheduler wrr')
17
17
  end
18
18
  end
19
19
 
@@ -8,7 +8,6 @@ describe BigBrother::Configuration do
8
8
  clusters['test1'].check_interval.should == 1
9
9
  clusters['test1'].scheduler.should == 'wrr'
10
10
  clusters['test1'].fwmark.should == 1
11
- clusters['test1'].persistent.should == 20
12
11
  clusters['test1'].ramp_up_time.should == 120
13
12
  clusters['test1'].has_downpage?.should == true
14
13
  clusters['test1'].nagios[:check].should == 'test1_status'
@@ -3,7 +3,6 @@ test1:
3
3
  check_interval: 1
4
4
  scheduler: wrr
5
5
  fwmark: 1
6
- persistent: 20
7
6
  ramp_up_time: 120
8
7
  has_downpage: true
9
8
  nagios:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_brother
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-17 00:00:00.000000000 Z
12
+ date: 2012-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70140402245100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 1.3.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 1.3.1
24
+ version_requirements: *70140402245100
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: async-rack
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70140402244360 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 0.5.1
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.5.1
35
+ version_requirements: *70140402244360
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: sinatra
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70140402243120 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ~>
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '1.0'
54
44
  type: :runtime
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
46
+ version_requirements: *70140402243120
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: rack-fiber_pool
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70140402242640 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ~>
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: '0.9'
70
55
  type: :runtime
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: '0.9'
57
+ version_requirements: *70140402242640
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: eventmachine
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70140402242100 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ~>
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: 1.0.0
86
66
  type: :runtime
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 1.0.0
68
+ version_requirements: *70140402242100
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: em-http-request
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70140402257780 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ~>
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: '1.0'
102
77
  type: :runtime
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: '1.0'
79
+ version_requirements: *70140402257780
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: em-synchrony
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &70140402256860 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ~>
@@ -117,15 +87,10 @@ dependencies:
117
87
  version: '1.0'
118
88
  type: :runtime
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- version: '1.0'
90
+ version_requirements: *70140402256860
126
91
  - !ruby/object:Gem::Dependency
127
92
  name: em-resolv-replace
128
- requirement: !ruby/object:Gem::Requirement
93
+ requirement: &70140402255780 !ruby/object:Gem::Requirement
129
94
  none: false
130
95
  requirements:
131
96
  - - ~>
@@ -133,15 +98,10 @@ dependencies:
133
98
  version: '1.1'
134
99
  type: :runtime
135
100
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ~>
140
- - !ruby/object:Gem::Version
141
- version: '1.1'
101
+ version_requirements: *70140402255780
142
102
  - !ruby/object:Gem::Dependency
143
103
  name: em-syslog
144
- requirement: !ruby/object:Gem::Requirement
104
+ requirement: &70140402254800 !ruby/object:Gem::Requirement
145
105
  none: false
146
106
  requirements:
147
107
  - - ~>
@@ -149,15 +109,10 @@ dependencies:
149
109
  version: 0.0.2
150
110
  type: :runtime
151
111
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ~>
156
- - !ruby/object:Gem::Version
157
- version: 0.0.2
112
+ version_requirements: *70140402254800
158
113
  - !ruby/object:Gem::Dependency
159
114
  name: rspec
160
- requirement: !ruby/object:Gem::Requirement
115
+ requirement: &70140402254220 !ruby/object:Gem::Requirement
161
116
  none: false
162
117
  requirements:
163
118
  - - ~>
@@ -165,15 +120,10 @@ dependencies:
165
120
  version: 2.9.0
166
121
  type: :development
167
122
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ~>
172
- - !ruby/object:Gem::Version
173
- version: 2.9.0
123
+ version_requirements: *70140402254220
174
124
  - !ruby/object:Gem::Dependency
175
125
  name: rack-test
176
- requirement: !ruby/object:Gem::Requirement
126
+ requirement: &70140402253600 !ruby/object:Gem::Requirement
177
127
  none: false
178
128
  requirements:
179
129
  - - ~>
@@ -181,15 +131,10 @@ dependencies:
181
131
  version: 0.6.1
182
132
  type: :development
183
133
  prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ~>
188
- - !ruby/object:Gem::Version
189
- version: 0.6.1
134
+ version_requirements: *70140402253600
190
135
  - !ruby/object:Gem::Dependency
191
136
  name: rake
192
- requirement: !ruby/object:Gem::Requirement
137
+ requirement: &70140402253060 !ruby/object:Gem::Requirement
193
138
  none: false
194
139
  requirements:
195
140
  - - ! '>='
@@ -197,15 +142,10 @@ dependencies:
197
142
  version: '0'
198
143
  type: :development
199
144
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ! '>='
204
- - !ruby/object:Gem::Version
205
- version: '0'
145
+ version_requirements: *70140402253060
206
146
  - !ruby/object:Gem::Dependency
207
147
  name: rake_commit
208
- requirement: !ruby/object:Gem::Requirement
148
+ requirement: &70140402252280 !ruby/object:Gem::Requirement
209
149
  none: false
210
150
  requirements:
211
151
  - - ~>
@@ -213,15 +153,10 @@ dependencies:
213
153
  version: '0.13'
214
154
  type: :development
215
155
  prerelease: false
216
- version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
- requirements:
219
- - - ~>
220
- - !ruby/object:Gem::Version
221
- version: '0.13'
156
+ version_requirements: *70140402252280
222
157
  - !ruby/object:Gem::Dependency
223
158
  name: vagrant
224
- requirement: !ruby/object:Gem::Requirement
159
+ requirement: &70140402251660 !ruby/object:Gem::Requirement
225
160
  none: false
226
161
  requirements:
227
162
  - - ! '>='
@@ -229,12 +164,7 @@ dependencies:
229
164
  version: '0'
230
165
  type: :development
231
166
  prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
- requirements:
235
- - - ! '>='
236
- - !ruby/object:Gem::Version
237
- version: '0'
167
+ version_requirements: *70140402251660
238
168
  description: IPVS backend supervisor
239
169
  email:
240
170
  - code@getbraintree.com
@@ -307,21 +237,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
307
237
  - - ! '>='
308
238
  - !ruby/object:Gem::Version
309
239
  version: '0'
310
- segments:
311
- - 0
312
- hash: -4040566039052582220
313
240
  required_rubygems_version: !ruby/object:Gem::Requirement
314
241
  none: false
315
242
  requirements:
316
243
  - - ! '>='
317
244
  - !ruby/object:Gem::Version
318
245
  version: '0'
319
- segments:
320
- - 0
321
- hash: -4040566039052582220
322
246
  requirements: []
323
247
  rubyforge_project:
324
- rubygems_version: 1.8.24
248
+ rubygems_version: 1.8.10
325
249
  signing_key:
326
250
  specification_version: 3
327
251
  summary: Process to monitor and update weights for servers in an IPVS pool