nitos_testbed_rc 2.0.2 → 2.0.3

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTY1MzYzMzZlMDc0ZjBkMGJmNDczYTJjNmRmNjJhZDMwZThmZTE0MQ==
4
+ MmJiNmRhODcwNTk1Mzc5YmVjZmZlYWI1NmViYTY4ZDZiOGQ2NjUyNg==
5
5
  data.tar.gz: !binary |-
6
- ODUwMjU1YmI4MGRmOGMyOGJhYjI0OWU0MTM4MGE3MDhlZGFmMzlkMg==
6
+ ZDYzOTU5YjM1MmVjMTNiMzkzZDEzOGE1ZDA0MWMwYjBhZjJhNTAzMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDllMjc5MzAwNTE0ZTNlOTkwY2Q2ODAzYmY5ZjhiOTY2N2E5NzA3NTlhNWE5
10
- ZjliMzZhY2MyOGY5N2M1YWM4ZTZlNjI0NzNmOGNiZDk2NTZlZWYxZGZmMTVj
11
- ZDkzODg0MDJkZjMzODlkMzVjMjg4OGQwMWVhODBlZTEyZWI5NGE=
9
+ ZmNjMDVlZDQ4YTMyZGI4MTg2NDM4MjJiNjIxZTRmMjZiMzlkZjZjMzkwZDlh
10
+ YTQ1OGViMzU3ZjkzYjE2Y2ZiZWUwYjFjYzRlZDE3YjlkZmZlOGY4ZjNjZWI3
11
+ ZGU1ZDlhNjA5MGFkYjZjMjlmZTYyNWUwODlmYzNlNjJiZDViZjc=
12
12
  data.tar.gz: !binary |-
13
- ZTdhM2Y3NDVlMWY1ZTA2NzRhNTczNjRjZGQxYjYzYzM4NTMwMzBmOTk1YjU0
14
- ZjczYjM3YWE1MjIyZTM1NTMxYjhiMmYzMzNlMGIwZjgzZmVjYWZjYmNjNWY3
15
- ODQzODg0MjNjM2M3ZTcyNmQyNDNjOTQ3ZWQ1OWZiZTk4MzMyNDQ=
13
+ NjUzMWZlOWRkMTc1YmJkZmVhYzAzOWRjMTA1ZmIwOWZmYTk1YjRiMjhjZDJk
14
+ NTBiMmM1OTgzYWY5MzdkYzEyZTgwZmE5M2I5MDUyZGVkMjZiMjdjMGEzOTVj
15
+ ZDc3OWVkZGI0M2EwOTEzYzI5NmFiNTFmZmYwNjMyNDNjZDYyMDE=
data/README.md CHANGED
@@ -36,6 +36,10 @@ Then you need to run the install_ntrc script to generate the configuration files
36
36
 
37
37
  $ install_ntrc
38
38
 
39
+ Hint: If you have an installed nitos_testbed_rc gem and want to keep the configuration files, execute install_ntrc script with --no_conf flag.
40
+
41
+ $ install_ntrc --no_conf
42
+
39
43
  Create certificates
40
44
  -------------------
41
45
 
data/bin/install_ntrc CHANGED
@@ -1,5 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'fileutils'
3
+ require 'optparse'
4
+
5
+ options = {}
6
+
7
+ optparse = OptionParser.new do |opts|
8
+ opts.on('-nc', '--no_conf', "Skip installation of configuration files") do |f|
9
+ options[:no_conf] = true
10
+ end
11
+ end
12
+
13
+ optparse.parse!
3
14
 
4
15
  spec = Gem::Specification.find_by_name("nitos_testbed_rc")
5
16
  gem_root = spec.gem_dir
@@ -18,28 +29,32 @@ unless File.directory?(log_path)
18
29
  FileUtils.mkdir_p(log_path)
19
30
  end
20
31
 
21
- puts "Installing configuration files."
22
- conf_files = []
23
- conf_files << "cm_proxy_conf.yaml"
24
- conf_files << "frisbee_proxy_conf.yaml"
25
- conf_files << "user_proxy_conf.yaml"
26
- conf_files << "omf_script_conf.yaml"
27
-
28
- conf_files.each do |file|
29
- puts "Copying configuration file '#{gem_root}/etc/#{file}' to '#{config_path}'."
30
- FileUtils.cp "#{gem_root}/etc/#{file}", "#{config_path}/#{file}"
31
- FileUtils.chmod 0644, "#{config_path}/#{file}"
32
- end
33
- puts "All configuration files have been installed, browse folder '#{config_path}' to alternate them appropriatly."
32
+ if options[:no_conf]
33
+ puts "Skipping installation of configuration files."
34
+ else
35
+ puts "Installing configuration files."
36
+ conf_files = []
37
+ conf_files << "cm_proxy_conf.yaml"
38
+ conf_files << "frisbee_proxy_conf.yaml"
39
+ conf_files << "user_proxy_conf.yaml"
40
+ conf_files << "omf_script_conf.yaml"
34
41
 
35
- config_path = File.expand_path("~/.omf/etc")
36
- unless File.directory?(config_path)
37
- puts "Generating directory '#{config_path}'."
38
- FileUtils.mkdir_p(config_path)
39
- end
42
+ conf_files.each do |file|
43
+ puts "Copying configuration file '#{gem_root}/etc/#{file}' to '#{config_path}'."
44
+ FileUtils.cp "#{gem_root}/etc/#{file}", "#{config_path}/#{file}"
45
+ FileUtils.chmod 0644, "#{config_path}/#{file}"
46
+ end
47
+ puts "All configuration files have been installed, browse folder '#{config_path}' to alternate them appropriatly."
40
48
 
41
- FileUtils.cp "#{gem_root}/etc/omf_script_conf.yaml", "#{config_path}/omf_script_conf.yaml"
42
- FileUtils.chmod 0644, "#{config_path}/omf_script_conf.yaml"
49
+ config_path = File.expand_path("~/.omf/etc")
50
+ unless File.directory?(config_path)
51
+ puts "Generating directory '#{config_path}'."
52
+ FileUtils.mkdir_p(config_path)
53
+ end
54
+
55
+ FileUtils.cp "#{gem_root}/etc/omf_script_conf.yaml", "#{config_path}/omf_script_conf.yaml"
56
+ FileUtils.chmod 0644, "#{config_path}/omf_script_conf.yaml"
57
+ end
43
58
 
44
59
  puts "Copying initialization script 'run_ntrc.sh'."
45
60
  FileUtils.cp "#{gem_root}/init/run_ntrc.sh", "/usr/local/bin/run_ntrc.sh"
data/bin/omf6 CHANGED
@@ -63,12 +63,13 @@ def create_frisbeed(comm, fcontroller, port, options)
63
63
  server.on_subscribed do
64
64
  server.on_message do |m|
65
65
  if m.operation == :inform
66
- if m.read_content("event") == "STDOUT"
67
- puts "INFO: #{m.read_content("msg")}"
68
- elsif m.read_content("event") == "EXIT"
69
- puts "INFO: #{m.read_content("msg")}"
70
- elsif m.read_content("event") == "ERROR"
71
- puts "ERROR: #{m.read_content("msg")}"
66
+ if m.read_content("itype") == "STDOUT"
67
+ puts "INFO: #{m.read_property("msg")}"
68
+ elsif m.read_content("itype") == "EXIT"
69
+ puts "INFO: #{m.read_property("msg")}"
70
+ elsif m.read_content("itype") == "ERROR"
71
+ puts "ERROR: #{m.read_property("msg")}"
72
+ stop_loading(comm)
72
73
  end
73
74
  end
74
75
  end
@@ -124,7 +125,7 @@ def create_frisbee(comm, fcontroller, node, port, options, progress_bar)
124
125
  # fcontroller.release(@@server) do |reply_msg|
125
126
  # shut_down(comm)
126
127
  # end
127
- stop_loading(comm, fcontroller)
128
+ stop_loading(comm)
128
129
  end
129
130
  end
130
131
  end
@@ -135,7 +136,7 @@ def create_frisbee(comm, fcontroller, node, port, options, progress_bar)
135
136
  n = cm_msg.read_property("node_name")
136
137
  @nodes_failed_without_pxe << n
137
138
  if (@nodes_up_without_pxe.length + @nodes_failed_without_pxe.length) == options[:target_nodes].length
138
- stop_loading(comm, fcontroller)
139
+ stop_loading(comm)
139
140
  end
140
141
  when "HTTP"
141
142
  puts "ERROR HTTP: #{cm_msg.read_property("msg")}"
@@ -41,11 +41,15 @@ module OmfRc::ResourceProxy::Frisbeed
41
41
  server.property.image = server.property.image.start_with?('/') ? server.property.image : @fconf[:imageDir] + '/' + server.property.image
42
42
  unless File.file?(server.property.image)
43
43
  debug "File '#{server.property.image}' does not exist."
44
- res.inform(:error, {
45
- event_type: 'ERROR',
46
- exit_code: -1,
47
- msg: "File '#{server.property.image}' does not exist."
48
- }, :ALL)
44
+ Thread.new do
45
+ sleep 1
46
+ server.inform(:error, {
47
+ event_type: 'ERROR',
48
+ exit_code: -1,
49
+ msg: "File '#{server.property.image}' does not exist."
50
+ }, :ALL)
51
+ end
52
+ next
49
53
  end
50
54
  debug "Frisbee server is loading image: #{server.property.image}"
51
55
 
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module NITOS
2
2
  module TestbedRc
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nitos_testbed_rc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - NITOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-03 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omf_common