forked from giovtorres/slurm-docker-cluster
-
Notifications
You must be signed in to change notification settings - Fork 3
/
slurm-slurmdbd.service
49 lines (43 loc) · 2.07 KB
/
slurm-slurmdbd.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
[Unit]
Description=Podman slurm-slurmdbd.service
Wants=network.target
After=network-online.target
Wants=slurm-create-datadir.service
After=slurm-create-datadir.service
Wants=slurm-mysql.service
After=slurm-mysql.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
#BindsTo=slurm-pod.service
#After=slurm-pod.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
StateDirectory=slurm-container-cluster
StateDirectoryMode=0700
ExecStartPre=/bin/rm -f %t/slurm-slurmdbd.pid %t/slurm-slurmdbd.ctr-id
ExecStart=/usr/bin/podman run --cgroups=no-conmon \
--cidfile %t/slurm-slurmdbd.ctr-id \
--conmon-pidfile %t/slurm-slurmdbd.pid \
--detach \
--name slurmdbd \
--replace \
--volume=%S/slurm-container-cluster/adjusting_ports_for_norouter/slurmdbd:/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/var_log_slurmdbd:/var/log/slurm:Z \
--volume=%S/slurm-container-cluster/var_run_mysqld:/var/run/mysqld:z \
--env MYSQL_UNIX_PORT=/var/run/mysqld/mysqld.sock \
localhost/slurm-with-norouter slurmdbd
ExecStop=/usr/bin/podman stop --cidfile %t/slurm-slurmdbd.ctr-id \
--ignore \
--time 10
ExecStopPost=/usr/bin/podman rm --cidfile %t/slurm-slurmdbd.ctr-id \
--force \
--ignore
PIDFile=%t/slurm-slurmdbd.pid
KillMode=control-group
Type=forking
[Install]
WantedBy=multi-user.target default.target