omf_ec 6.2.0.pre.2 → 6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/omf_ec.rb +2 -2
- data/lib/omf_ec/experiment.rb +34 -7
- data/lib/omf_ec/runner.rb +0 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjBjOWUzNmRlNTlhOWQ4MDkyODIxNjY4MjU2M2Y2MTQ3MWVhOTY1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDgyZmY5ZTg1NTdlOGM1MWJmYjFmNjA4ZWYzYmQ1YWFmNWUyNTBjNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NzkwODVmYjllNmM3MDZkMzEyMGMwMGRkNTA1YmUwMTYyYjAwNjFmYzQxYzE4
|
10
|
+
M2MxYmVlYjg3NTRiNTExY2ZhNTIyMWY0ZDM3M2U3MDUzNzQyZmU4ZmYyNzI5
|
11
|
+
YjZkZmNhMWMzNDRlY2ZjYWZiMTNkOWYyZjYzYmY5NjIzMjM1MTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmFlNTNkNzk1ZjlhNDJlZjI2NGUxYmM2NjZhMTk3MDYwZDc0NWM0YWQ3MGFj
|
14
|
+
YWZlMTg3ZjJlYzA2MjI0YjE3ODVjN2YxY2FjOGRkN2YzYjE0NjYyOTA1MTky
|
15
|
+
NzRjNGQwMGYyOGM1MGJiMDA1ZDY1YzY5ZTk0MmFlYTI3YjE5ODU=
|
data/lib/omf_ec.rb
CHANGED
@@ -59,11 +59,11 @@ module OmfEc
|
|
59
59
|
warn "RC reports warning: '#{msg[:reason]}'", msg.src
|
60
60
|
debug msg, msg.src
|
61
61
|
when 'CREATION.OK'
|
62
|
-
debug "Resource #{msg[:res_id]}
|
62
|
+
debug "Resource #{msg[:res_id]} created"
|
63
63
|
debug "Received CREATION.OK via #{topic.id}"
|
64
64
|
debug msg, msg.src
|
65
65
|
|
66
|
-
OmfEc.experiment.add_or_update_resource_state(msg.
|
66
|
+
OmfEc.experiment.add_or_update_resource_state(msg.resource_address, msg.properties)
|
67
67
|
OmfEc.experiment.process_events
|
68
68
|
when 'STATUS'
|
69
69
|
props = []
|
data/lib/omf_ec/experiment.rb
CHANGED
@@ -91,7 +91,7 @@ module OmfEc
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
else
|
94
|
-
|
94
|
+
debug "Newly discovered resource >> #{name}"
|
95
95
|
#res = Hashie::Mash.new({ address: name }).merge(opts)
|
96
96
|
opts[:address] = name
|
97
97
|
@state[name] = opts
|
@@ -271,7 +271,6 @@ module OmfEc
|
|
271
271
|
# Disconnect communicator, try to delete any XMPP affiliations
|
272
272
|
def done
|
273
273
|
info "Experiment: #{OmfEc.experiment.id} finished"
|
274
|
-
info "Release applications and network interfaces"
|
275
274
|
info "Exit in 15 seconds..."
|
276
275
|
|
277
276
|
# Make sure that all defined events are removed
|
@@ -279,10 +278,24 @@ module OmfEc
|
|
279
278
|
|
280
279
|
OmfCommon.el.after(10) do
|
281
280
|
allGroups do |g|
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
281
|
+
# Clean up
|
282
|
+
unless g.app_contexts.empty?
|
283
|
+
info "Release applications in #{g.name}"
|
284
|
+
g.resources[type: 'application'].release
|
285
|
+
end
|
286
|
+
unless g.net_ifs.find_all { |v| v.conf[:type] == 'net' }.empty?
|
287
|
+
info "Release wired network interfaces in #{g.name}"
|
288
|
+
g.resources[type: 'net'].release
|
289
|
+
end
|
290
|
+
unless g.net_ifs.find_all { |v| v.conf[:type] == 'wlan' }.empty?
|
291
|
+
info "Release wireless network interfaces in #{g.name}"
|
292
|
+
g.resources[type: 'wlan'].release
|
293
|
+
end
|
294
|
+
# Let release messages go through first
|
295
|
+
OmfCommon.el.after(1) do
|
296
|
+
info "Configure resources to leave #{g.name}"
|
297
|
+
g.resources.membership = { leave: g.address }
|
298
|
+
end
|
286
299
|
end
|
287
300
|
|
288
301
|
OmfCommon.el.after(4) do
|
@@ -311,9 +324,11 @@ module OmfEc
|
|
311
324
|
OmfEc.experiment.log_metadata("state", "running")
|
312
325
|
|
313
326
|
allGroups do |g|
|
327
|
+
info "CONFIGURE #{g.members.size} resources to join group #{g.name}"
|
328
|
+
debug "CONFIGURE #{g.members.keys} to join group #{g.name}"
|
314
329
|
g.members.each do |key, value|
|
315
330
|
OmfEc.subscribe_and_monitor(key) do |res|
|
316
|
-
info "Configure '#{key}' to join '#{g.name}'"
|
331
|
+
#info "Configure '#{key}' to join '#{g.name}'"
|
317
332
|
g.synchronize do
|
318
333
|
g.members[key] = res.address
|
319
334
|
end
|
@@ -321,6 +336,18 @@ module OmfEc
|
|
321
336
|
end
|
322
337
|
end
|
323
338
|
end
|
339
|
+
|
340
|
+
# For every 100 nodes, increase check interval by 1 second
|
341
|
+
count = allGroups.inject(0) { |c, g| c += g.members.size }
|
342
|
+
interval = count / 100
|
343
|
+
interval = 1 if interval < 1
|
344
|
+
info "TOTAL resources: #{count}. Events check interval: #{interval}."
|
345
|
+
|
346
|
+
OmfCommon.el.every(interval) do
|
347
|
+
EM.next_tick do
|
348
|
+
OmfEc.experiment.process_events rescue nil
|
349
|
+
end
|
350
|
+
end
|
324
351
|
end
|
325
352
|
|
326
353
|
# Ask the resources which joined the groups I created to leave
|
data/lib/omf_ec/runner.rb
CHANGED
@@ -301,12 +301,6 @@ module OmfEc
|
|
301
301
|
OmfCommon.init(@config_opts.delete(:environment), @config_opts) do |el|
|
302
302
|
setup_logging
|
303
303
|
OmfCommon.comm.on_connected do |comm|
|
304
|
-
el.every(5) do
|
305
|
-
EM.next_tick do
|
306
|
-
OmfEc.experiment.process_events rescue nil
|
307
|
-
end
|
308
|
-
end
|
309
|
-
|
310
304
|
info "OMF Experiment Controller #{OmfEc::VERSION} - Start"
|
311
305
|
info "Connected using #{comm.conn_info}"
|
312
306
|
info "Execute: #{@oedl_path}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_ec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.0
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NICTA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 6.2.0
|
89
|
+
version: 6.2.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 6.2.0
|
96
|
+
version: 6.2.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: sequel
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,9 +183,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
183
|
version: 1.9.3
|
184
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
185
|
requirements:
|
186
|
-
- - ! '
|
186
|
+
- - ! '>='
|
187
187
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
188
|
+
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubyforge_project: omf_ec
|
191
191
|
rubygems_version: 2.4.2
|