Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e178cddf authored by Cyril Rohr's avatar Cyril Rohr
Browse files

[admin] Added --auto-offset and maintenance=yes when generating oaradmin...

[admin] Added --auto-offset and maintenance=yes when generating oaradmin commands. Fixed bug (missing /).
parent 6d869637
No related branches found
No related tags found
No related merge requests found
......@@ -85,13 +85,18 @@ namespace :oar do
if action == "M" # modification of a file
command.concat(" -s node=#{host} ")
else # new file
command.concat(" -a node=#{host}/cpu={#{node.properties['architecture']['smp_size']}}/core={#{export['cpucore']}} ")
command.concat(" -a /node=#{host}/cpu={#{node.properties['architecture']['smp_size']}}/core={#{export['cpucore']}}")
command.concat(" --auto-offset")
if ENV['MAINTENANCE'] && ENV['MAINTENANCE']=='NO'
command.concat(' -p maintenance="NO"')
else
# by default, maintenance is YES when creating new resources
command.concat(' -p maintenance="YES"')
end
end
command.concat(" -p ").concat( export.to_a.map{|(k,v)|
if v.nil?
nil
elsif v.kind_of?(String) && v =~ / / # to remove after oaradmin correctly parses options
[k, v.inspect.inspect].join("=")
else
[k, v.inspect].join("=")
end
......@@ -102,6 +107,11 @@ namespace :oar do
@logger.warn "Don't know what to do with #{line.inspect}. Ignoring."
next
end
if ENV['COMMIT'] && ENV['COMMIT']=='YES'
command.concat(' -c')
end
commands << command
end
commands.each do |command|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment