Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit ff0fea02 authored by Samir Noir's avatar Samir Noir 🧀
Browse files

Add missing workdir parameter when calling OAR's API

OAR's API use the workdir parameter to define where to put the
oarapi.subscript file.
parent 9d0adc42
Pipeline #189792 passed with stages
in 22 minutes
......@@ -27,7 +27,7 @@ module Grid5000
# OAR expects these as import-job-key-from-file
READ_ONLY_UNDERSCORE_ATTRIBUTES = [:import_job_key_from_file].freeze
READ_WRITE_ATTRIBUTES = %i[name project].freeze
READ_WRITE_ATTRIBUTES = %i[name project workdir].freeze
attr_reader(*READ_ONLY_ATTRIBUTES)
attr_reader(*READ_ONLY_UNDERSCORE_ATTRIBUTES)
attr_accessor(*READ_WRITE_ATTRIBUTES)
......@@ -61,6 +61,7 @@ module Grid5000
value = instance_variable_get "@#{integer_field}"
instance_variable_set "@#{integer_field}", value.to_i unless value.nil?
end
@workdir = @directory
@on_launch = {} if @on_launch.nil?
end
......@@ -75,7 +76,7 @@ module Grid5000
h['property'] = properties unless properties.nil? || properties.empty?
h['type'] = types unless types.nil? || types.empty?
%w[walltime queue directory name project signal checkpoint stderr stdout].each do |prop|
%w[walltime queue directory name project signal checkpoint stderr stdout workdir].each do |prop|
value = instance_variable_get "@#{prop}"
h[prop] = value unless value.nil?
end
......
......@@ -82,7 +82,8 @@ describe Grid5000::Job do
'command' => '',
'project' => 'default',
'properties' => "(deploy = 'YES') AND desktop_computing = 'NO'",
'state' => 'running'
'state' => 'running',
'workdir' => '/home/grenoble/rchakode'
})
end
it 'should export to a hash structure valid for submitting a job to the oarapi' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment