Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
csbase-dev
sgarest-daemon
Commits
ed38088f
Commit
ed38088f
authored
5 years ago
by
gabrielmanhaes
Browse files
Options
Download
Patches
Plain Diff
Adaptar SGA Slurm para mudanças do branch [SOMA-2598][SOMA-1327]
parent
25f1a306
master
maia/4208/FixInvalidPropTestInCiCd
maia/9022/SgaCygwinInstall
maia/9564/DisableKubernetesDeploy
newfeature/SOMA-3699_IdentificarVersaoSGA
newfeature/SOMA-4444_AddSgaToK8s
1.7.9
1.7.8
1.7.7
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
1.6.1
1.6.0
1 merge request
!36
Improvement/soma 1327 merge branch ws
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sga/driver/slurm.lua
+8
-11
sga/driver/slurm.lua
with
8 additions
and
11 deletions
+8
-11
sga/driver/slurm.lua
+
8
−
11
View file @
ed38088f
...
...
@@ -4,7 +4,6 @@ local safer = require("safer")
local
util
=
require
(
"sga.util"
)
local
exec
=
require
(
"sga.exec"
)
local
schema
=
require
(
"schema"
)
local
posix
=
require
(
"posix"
)
local
cmds
=
{
sbatch
=
"sbatch "
,
...
...
@@ -35,14 +34,13 @@ function slurm.execute_command(self, job, cmd_string)
local
err_filename
=
self
.
config
.
runtime_data_dir
..
"/sbatch_"
..
job
.
jid
..
".err"
for
_
,
sandbox_path
in
ipairs
(
job
.
sandboxes
)
do
local
ok
,
err
=
lfs
.
mk
dir
(
sandbox_path
)
local
ok
,
err
=
self
.
exec
:
create_
dir
(
sandbox_path
)
if
not
ok
then
local
attr
=
lfs
.
attributes
(
sandbox_path
)
if
not
(
attr
and
attr
.
mode
==
"directory"
)
then
if
not
self
.
exec
:
is_dir
(
sandbox_path
)
then
return
nil
,
"Failed creating job's sandbox "
..
sandbox_path
end
end
posix
.
chmod
(
sandbox_path
,
"rwxrwxrwx"
)
self
.
exec
:
chmod
(
sandbox_path
,
"rwxrwxrwx"
)
end
local
optional_params
=
""
...
...
@@ -78,14 +76,13 @@ function slurm.execute_command(self, job, cmd_string)
end
function
slurm
.
cleanup_job
(
self
,
job
)
self
.
exec
:
remove
(
job
.
data
.
script_filename
)
self
.
exec
:
remove
(
job
.
data
.
out_filename
)
self
.
exec
:
remove
(
job
.
data
.
err_filename
)
self
.
exec
:
remove
_file
(
job
.
data
.
script_filename
)
self
.
exec
:
remove
_file
(
job
.
data
.
out_filename
)
self
.
exec
:
remove
_file
(
job
.
data
.
err_filename
)
for
_
,
sandbox_path
in
ipairs
(
job
.
sandboxes
)
do
local
attr
=
lfs
.
attributes
(
sandbox_path
)
if
(
attr
and
attr
.
mode
==
"directory"
)
then
local
ok
,
err
=
util
.
removedir
(
sandbox_path
)
if
self
.
exec
:
is_dir
(
sandbox_path
)
then
local
ok
,
err
=
self
.
exec
:
remove_dir
(
sandbox_path
)
if
not
ok
then
self
.
logger
:
error
(
"Failed removing job's sandbox "
..
sandbox_path
)
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets