Skip to content
Snippets Groups Projects
Commit a0573701 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed bug in stopping containers on SSH-based, standalone computing resources...

Fixed bug in stopping containers on SSH-based, standalone computing resources with Docker and Podman.
parent e1deef9e
No related branches found
No related tags found
No related merge requests found
......@@ -375,7 +375,7 @@ class SSHStandaloneComputingManager(StandaloneComputingManager, SSHComputingMana
# TODO: remove this hardcoding
prefix = 'sudo' if (computing_host == 'slurmclusterworker' and container_engine=='docker') else ''
internal_stop_command = 'export CONTAINER_ID=$('+prefix+' '+container_engine+' ps -a --filter name=task-'+task.short_uuid+' --format {{.ID}}) &&'
internal_stop_command += 'if [ "x$CONTAINER_ID" != "x" ]; then {} {} stop $CONTAINER_ID && {} {} rm $CONTAINER_ID; fi'.format(prefix,container_engine,prefix,container_engine)
internal_stop_command += 'if [ "x\$CONTAINER_ID" != "x" ]; then {} {} stop \$CONTAINER_ID && {} {} rm \$CONTAINER_ID; fi'.format(prefix,container_engine,prefix,container_engine)
else:
raise NotImplementedError('Container engine {} not supported'.format(container_engine))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment