forked from giovtorres/slurm-docker-cluster
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathslurm-slurmctld.service
64 lines (54 loc) · 2.63 KB
/
slurm-slurmctld.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[Unit]
Description=Podman slurm-slurmctld.service
Wants=network.target
After=network-online.target
Wants=slurm-copy-default-slurm-configuration.service
After=slurm-copy-default-slurm-configuration.service
Wants=slurm-create-datadir.service
After=slurm-create-datadir.service
Wants=slurm-create-munge-key.service
After=slurm-create-munge-key.service
Wants=slurm-mysql.service
After=slurm-mysql.service
#Wants=slurm-container-cluster-network-create.service
#After=slurm-container-cluster-network-create.service
Wants=slurm-slurmdbd.service
After=slurm-slurmdbd.service
# AssertFileNotEmpty=%S/slurm-container-cluster/etc_munge/munge.key (other subuid UID)
AssertFileNotEmpty=%S/slurm-container-cluster/etc_slurm/slurm.conf
AssertFileNotEmpty=%S/slurm-container-cluster/etc_slurm/slurmdbd.conf
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
StateDirectory=slurm-container-cluster
StateDirectoryMode=0700
ExecStartPre=/bin/rm -f %t/slurm-slurmctld.pid %t/slurm-slurmctld.ctr-id
ExecStart=/usr/bin/podman run \
--cgroups=no-conmon \
--cidfile %t/slurm-slurmctld.ctr-id \
--conmon-pidfile %t/slurm-slurmctld.pid \
--detach \
--hostname slurmctld \
--name slurmctld \
--privileged \
--replace \
--ulimit host \
--volume /dev/fuse:/dev/fuse:rw \
--volume=%S/slurm-container-cluster/adjusting_ports_for_norouter/slurmctld:/etc/slurm/adjusting_ports_for_norouter:z \
--volume=%S/slurm-container-cluster/etc_munge:/etc/munge:z \
--volume=%S/slurm-container-cluster/etc_slurm:/etc/slurm:z \
--volume=%S/slurm-container-cluster/extra-containerimages:/var/lib/shared:ro \
--volume=%S/slurm-container-cluster/slurm_jobdir:/data:z \
--volume=%S/slurm-container-cluster/var_log_slurmctld:/var/log/slurm:Z \
localhost/slurm-with-norouter slurmctld
ExecStop=/usr/bin/podman stop --cidfile %t/slurm-slurmctld.ctr-id \
--ignore \
--time 10
ExecStopPost=/usr/bin/podman rm --cidfile %t/slurm-slurmctld.ctr-id \
--force \
--ignore
PIDFile=%t/slurm-slurmctld.pid
KillMode=control-group
Type=forking
[Install]
WantedBy=multi-user.target default.target