privileged container switch
This commit is contained in:
2
play.yml
2
play.yml
@@ -37,4 +37,6 @@
|
|||||||
- name: "setup slurm test environment in docker containers"
|
- name: "setup slurm test environment in docker containers"
|
||||||
import_role:
|
import_role:
|
||||||
name: slurm
|
name: slurm
|
||||||
|
vars:
|
||||||
|
container_privileged: True
|
||||||
tags: slurm
|
tags: slurm
|
||||||
|
1
roles/slurm/defaults/main.yml
Normal file
1
roles/slurm/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
container_privileged: False
|
@@ -39,10 +39,10 @@
|
|||||||
path: /container/volumes/slurm/
|
path: /container/volumes/slurm/
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: copy slurm config
|
- name: upload slurm config
|
||||||
copy:
|
template:
|
||||||
force: true
|
force: true
|
||||||
src: "{{item}}"
|
src: "{{item}}.j2"
|
||||||
dest: "/container/volumes/slurm/{{item}}"
|
dest: "/container/volumes/slurm/{{item}}"
|
||||||
loop:
|
loop:
|
||||||
- slurm.conf
|
- slurm.conf
|
||||||
@@ -70,6 +70,7 @@
|
|||||||
state: started
|
state: started
|
||||||
detach: True
|
detach: True
|
||||||
cleanup: True
|
cleanup: True
|
||||||
|
privileged: "{{ container_privileged | ternary(True,False) }}"
|
||||||
networks_cli_compatible: True
|
networks_cli_compatible: True
|
||||||
vars:
|
vars:
|
||||||
default_mounts:
|
default_mounts:
|
||||||
|
@@ -36,8 +36,13 @@ MpiDefault=pmix
|
|||||||
#PluginDir=
|
#PluginDir=
|
||||||
#PlugStackConfig=
|
#PlugStackConfig=
|
||||||
#PrivateData=jobs
|
#PrivateData=jobs
|
||||||
# ProctrackType=proctrack/cgroup
|
{% if container_privileged -%}
|
||||||
|
ProctrackType=proctrack/cgroup
|
||||||
|
{% else -%}
|
||||||
|
{# when not running privileged docker container, cgroups cannot be used and
|
||||||
|
jobs fail without comment in any log #}
|
||||||
ProctrackType=proctrack/linuxproc
|
ProctrackType=proctrack/linuxproc
|
||||||
|
{% endif %}
|
||||||
#Prolog=
|
#Prolog=
|
||||||
#PrologFlags=
|
#PrologFlags=
|
||||||
#PrologSlurmctld=
|
#PrologSlurmctld=
|
Reference in New Issue
Block a user