Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ExaCT
Rosetta
Commits
3f2fa624
Commit
3f2fa624
authored
4 years ago
by
Stefano Alberto Russo
Browse files
Options
Downloads
Patches
Plain Diff
Added support for viewing Slurm task logs.
parent
5538403f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
services/webapp/code/rosetta/base_app/computing_managers.py
+19
-1
19 additions, 1 deletion
services/webapp/code/rosetta/base_app/computing_managers.py
services/webapp/code/rosetta/base_app/templates/components/task.html
+3
-2
3 additions, 2 deletions
...bapp/code/rosetta/base_app/templates/components/task.html
with
22 additions
and
3 deletions
services/webapp/code/rosetta/base_app/computing_managers.py
+
19
−
1
View file @
3f2fa624
...
...
@@ -412,7 +412,25 @@ class SlurmComputingManager(ComputingManager):
def
_get_task_log
(
self
,
task
,
**
kwargs
):
raise
NotImplementedError
(
'
Not implemented
'
)
# Get user keys
if
task
.
computing
.
require_user_auth_keys
:
user_keys
=
Keys
.
objects
.
get
(
user
=
task
.
user
,
default
=
True
)
else
:
raise
NotImplementedError
(
'
Remote tasks not requiring keys are not yet supported
'
)
# Get computing host
host
=
task
.
computing
.
get_conf_param
(
'
master
'
)
user
=
task
.
computing
.
get_conf_param
(
'
user
'
)
# Stop the task remotely
view_log_command
=
'
ssh -i {} -4 -o StrictHostKeyChecking=no {}@{}
\'
/bin/bash -c
"
cat \$HOME/{}.log
"
\'
'
.
format
(
user_keys
.
private_key_file
,
user
,
host
,
task
.
uuid
)
out
=
os_shell
(
view_log_command
,
capture
=
True
)
if
out
.
exit_code
!=
0
:
raise
Exception
(
out
.
stderr
)
else
:
return
out
.
stdout
...
...
This diff is collapsed.
Click to expand it.
services/webapp/code/rosetta/base_app/templates/components/task.html
+
3
−
2
View file @
3f2fa624
...
...
@@ -74,11 +74,12 @@
<a
href=
"?uuid={{task.uuid}}&action=delete&details=False"
>
Delete
</a>
{% if task.status == "running" %}
|
<a
href=
"?uuid={{task.uuid}}&action=connect"
>
Connect
</a>
|
<a
href=
"/task_log/?uuid={{task.uuid}}&action=viewlog"
>
View Log
</a>
{% else %}
|
<font
color=
"#c0c0c0"
>
Connect
</font>
|
<font
color=
"#c0c0c0"
>
View Log
</font>
{% endif%}
|
<a
href=
"/task_log/?uuid={{task.uuid}}&action=viewlog"
>
View Log
</a>
</td>
</tr>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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