]> git.pld-linux.org Git - packages/ganeti.git/blame - systemd.patch
- require network target for ganeti systemd services
[packages/ganeti.git] / systemd.patch
CommitLineData
bc935a7a
JR
1http://code.google.com/p/ganeti/issues/detail?id=444
2
3--- ganeti-2.6.2/Makefile.am~ 2012-12-21 15:38:52.000000000 +0100
4+++ ganeti-2.6.2/Makefile.am 2013-06-01 16:01:46.594026366 +0200
5@@ -149,6 +149,7 @@
bc935a7a
JR
6 $(BUILT_EXAMPLES) \
7 doc/examples/bash_completion \
86f7b894 8 doc/examples/bash_completion-debug \
bc935a7a 9+ doc/examples/ganeti.target \
2b0c5c25 10 $(userspecs) \
bc935a7a
JR
11 lib/_generated_rpc.py \
12 $(man_MANS) \
dbf830ed 13@@ -190,7 +190,14 @@
bc935a7a
JR
14 doc/examples/ganeti.cron \
15 doc/examples/ganeti.initd \
16 doc/examples/gnt-config-backup \
17- doc/examples/hooks/ipsec
18+ doc/examples/hooks/ipsec \
19+ doc/examples/ganeti-confd.service \
20+ doc/examples/ganeti-masterd.service \
21+ doc/examples/ganeti-noded.service \
2b0c5c25
JR
22+ doc/examples/ganeti-luxid.service \
23+ doc/examples/ganeti-mond.service \
dbf830ed
JR
24+ doc/examples/ganeti-rapi.service \
25+ doc/examples/ganeti.sudoers
bc935a7a
JR
26
27 nodist_pkgpython_PYTHON = \
28 $(BUILT_PYTHON_SOURCES)
29--- ganeti-2.6.2/doc/examples.orig/ganeti-confd.service.in 1970-01-01 01:00:00.000000000 +0100
30+++ ganeti-2.6.2/doc/examples/ganeti-confd.service.in 2013-06-01 15:55:37.594893846 +0200
4a9e23c9 31@@ -0,0 +1,18 @@
bc935a7a
JR
32+[Unit]
33+Description=Ganeti Confd
ad6b03f1 34+Requires=ganeti-noded.service
bce9321a 35+After=network.target ganeti-noded.service ganeti-rapi.service
0a985774 36+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
bc935a7a
JR
37+
38+[Service]
39+Type=forking
bc935a7a 40+EnvironmentFile=-/etc/sysconfig/ganeti
dbf830ed 41+ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
bc935a7a
JR
42+ExecStart=@PREFIX@/sbin/ganeti-confd $CONFD_ARGS
43+User=@GNTCONFDUSER@
44+Group=@GNTCONFDGROUP@
45+PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-confd.pid
46+KillMode=process
47+
48+[Install]
49+WantedBy=ganeti.target
50--- ganeti-2.6.2/doc/examples.orig/ganeti-masterd.service.in 1970-01-01 01:00:00.000000000 +0100
51+++ ganeti-2.6.2/doc/examples/ganeti-masterd.service.in 2013-06-01 15:55:37.611560663 +0200
953cc34f 52@@ -0,0 +1,20 @@
bc935a7a
JR
53+[Unit]
54+Description=Ganeti Masterd
55+Requires=ganeti-noded.service
bce9321a 56+After=network.target ganeti-noded.service
0a985774 57+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
bc935a7a
JR
58+
59+[Service]
60+Type=forking
bc935a7a 61+EnvironmentFile=-/etc/sysconfig/ganeti
953cc34f 62+ExecStartPre=/bin/sh -c '[ "$(cat @LOCALSTATEDIR@/lib/ganeti/ssconf_master_node 2>/dev/null)" = "$(hostname -f 2>/dev/null)" ]'
dbf830ed 63+ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
bc935a7a 64+ExecStart=@PREFIX@/sbin/ganeti-masterd $MASTERD_ARGS
618ef747
JR
65+User=@GNTMASTERUSER@
66+Group=@GNTMASTERDGROUP@
bc935a7a
JR
67+PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-masterd.pid
68+# TODO: Should KillMode be process?
69+KillMode=control-group
70+
71+[Install]
72+WantedBy=ganeti.target
73--- ganeti-2.6.2/doc/examples.orig/ganeti-noded.service.in 1970-01-01 01:00:00.000000000 +0100
74+++ ganeti-2.6.2/doc/examples/ganeti-noded.service.in 2013-06-01 15:55:37.631560853 +0200
bce9321a 75@@ -0,0 +1,17 @@
bc935a7a
JR
76+[Unit]
77+Description=Ganeti Noded
bce9321a 78+After=network.target
0a985774 79+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
bc935a7a
JR
80+
81+[Service]
82+Type=forking
bc935a7a 83+EnvironmentFile=-/etc/sysconfig/ganeti
4a9e23c9 84+ExecStartPre=@PKGLIBDIR@/ensure-dirs
bc935a7a
JR
85+ExecStart=@PREFIX@/sbin/ganeti-noded $NODED_ARGS
86+User=@GNTNODEDUSER@
87+Group=@GNTDAEMONSGROUP@
88+PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-noded.pid
89+KillMode=control-group
90+
91+[Install]
92+WantedBy=ganeti.target
93--- ganeti-2.6.2/doc/examples.orig/ganeti-rapi.service.in 1970-01-01 01:00:00.000000000 +0100
94+++ ganeti-2.6.2/doc/examples/ganeti-rapi.service.in 2013-06-01 15:55:37.644894309 +0200
4a9e23c9 95@@ -0,0 +1,18 @@
bc935a7a
JR
96+[Unit]
97+Description=Ganeti RAPI
ad6b03f1 98+Requires=ganeti-noded.service ganeti-masterd.service
bce9321a 99+After=network.target ganeti-noded.service ganeti-masterd.service
0a985774 100+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
bc935a7a
JR
101+
102+[Service]
103+Type=forking
bc935a7a 104+EnvironmentFile=-/etc/sysconfig/ganeti
dbf830ed 105+ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
bc935a7a
JR
106+ExecStart=@PREFIX@/sbin/ganeti-rapi $RAPI_ARGS
107+User=@GNTRAPIUSER@
108+Group=@GNTRAPIGROUP@
109+PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-rapi.pid
110+KillMode=process
111+
112+[Install]
113+WantedBy=ganeti.target
2b0c5c25
JR
114--- ganeti-2.6.2/doc/examples.orig/ganeti-luxid.service.in 1970-01-01 01:00:00.000000000 +0100
115+++ ganeti-2.6.2/doc/examples/ganeti-luxid.service.in 2013-06-01 15:55:37.594893846 +0200
116@@ -0,0 +1,18 @@
117+[Unit]
118+Description=Ganeti luxid
119+Requires=ganeti-noded.service ganeti-masterd.service ganeti-rapi.service
bce9321a 120+After=network.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service
0a985774 121+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
2b0c5c25
JR
122+
123+[Service]
124+Type=forking
2b0c5c25 125+EnvironmentFile=-/etc/sysconfig/ganeti
dbf830ed 126+ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
2b0c5c25
JR
127+ExecStart=@PREFIX@/sbin/ganeti-luxid $LUXID_ARGS
128+User=@GNTLUXIDUSER@
129+Group=@GNTLUXIDGROUP@
130+PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-luxid.pid
131+KillMode=process
132+
133+[Install]
134+WantedBy=ganeti.target
135--- ganeti-2.6.2/doc/examples.orig/ganeti-mond.service.in 1970-01-01 01:00:00.000000000 +0100
136+++ ganeti-2.6.2/doc/examples/ganeti-mond.service.in 2013-06-01 15:55:37.594893846 +0200
137@@ -0,0 +1,18 @@
138+[Unit]
139+Description=Ganeti mond
dbf830ed 140+Requires=ganeti-noded.service
bce9321a 141+After=network.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service
0a985774 142+ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
2b0c5c25
JR
143+
144+[Service]
145+Type=forking
2b0c5c25
JR
146+EnvironmentFile=-/etc/sysconfig/ganeti
147+ExecStartPre=@PKGLIBDIR@/ensure-dirs
148+ExecStart=@PREFIX@/sbin/ganeti-mond $MOND_ARGS
149+User=@GNTMONDUSER@
150+Group=@GNTMONDGROUP@
151+PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-mond.pid
152+KillMode=process
153+
154+[Install]
155+WantedBy=ganeti.target
bc935a7a
JR
156--- ganeti-2.6.2/doc/examples.orig/ganeti.target 1970-01-01 01:00:00.000000000 +0100
157+++ ganeti-2.6.2/doc/examples/ganeti.target 2013-06-01 15:55:37.661561129 +0200
158@@ -0,0 +1,5 @@
159+[Unit]
160+Description=Ganeti
161+
162+[Install]
163+WantedBy=multi-user.target
dbf830ed
JR
164--- ganeti-2.6.2/doc/examples.orig/ganeti.sudoers.in 1970-01-01 01:00:00.000000000 +0100
165+++ ganeti-2.6.2/doc/examples/ganeti.sudoers.in 2013-06-01 15:55:37.661561129 +0200
166@@ -0,0 +1,3 @@
167+User_Alias GANETI = @GNTCONFDUSER@, @GNTMASTERUSER@, @GNTRAPIUSER@, @GNTLUXIDUSER@
168+
169+GANETI ALL=(ALL) NOPASSWD: @PKGLIBDIR@/ensure-dirs
bc935a7a
JR
170--- ganeti-2.6.2/doc/examples.orig/README.systemd 1970-01-01 01:00:00.000000000 +0100
171+++ ganeti-2.6.2/doc/examples/README.systemd 2013-06-01 15:55:37.661561129 +0200
172@@ -0,0 +1,14 @@
173+To register the services with ganeti.target (order doesn't matter):
174+
dbf830ed 175+ systemctl enable ganeti-noded ganeti-masterd ganeti-rapi ganeti-mond
bc935a7a
JR
176+
177+To include confd:
178+
179+ systemctl enable ganeti-confd
180+
181+To signal to the ganeti target that it should start at boot:
182+
183+ systemctl enable ganeti.target
184+
185+Note that the files aren't at all tested beyond just being able to start the
186+daemons. I don't have Ganeti running yet, so I can't test stopping.
This page took 0.188337 seconds and 4 git commands to generate.