]> git.pld-linux.org Git - packages/ganeti.git/blob - systemd.patch
4a550d67decd610762393c9f145a19b7314da480
[packages/ganeti.git] / systemd.patch
1 http://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 @@
6         $(BUILT_EXAMPLES) \
7         doc/examples/bash_completion \
8         doc/examples/bash_completion-debug \
9 +       doc/examples/ganeti.target \
10         $(userspecs) \
11         lib/_generated_rpc.py \
12         $(man_MANS) \
13 @@ -190,7 +190,14 @@
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 \
22 +       doc/examples/ganeti-luxid.service \
23 +       doc/examples/ganeti-mond.service \
24 +       doc/examples/ganeti-rapi.service \
25 +       doc/examples/ganeti.sudoers
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
31 @@ -0,0 +1,18 @@
32 +[Unit]
33 +Description=Ganeti Confd
34 +Requires=ganeti-noded.service
35 +After=ganeti-noded.service ganeti-rapi.service
36 +ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
37 +
38 +[Service]
39 +Type=forking
40 +EnvironmentFile=-/etc/sysconfig/ganeti
41 +ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
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
52 @@ -0,0 +1,20 @@
53 +[Unit]
54 +Description=Ganeti Masterd
55 +Requires=ganeti-noded.service
56 +After=ganeti-noded.service
57 +ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
58 +
59 +[Service]
60 +Type=forking
61 +EnvironmentFile=-/etc/sysconfig/ganeti
62 +ExecStartPre=/bin/sh -c '[ "$(cat @LOCALSTATEDIR@/lib/ganeti/ssconf_master_node 2>/dev/null)" = "$(hostname -f 2>/dev/null)" ]'
63 +ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
64 +ExecStart=@PREFIX@/sbin/ganeti-masterd $MASTERD_ARGS
65 +User=@GNTMASTERUSER@
66 +Group=@GNTMASTERDGROUP@
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
75 @@ -0,0 +1,16 @@
76 +[Unit]
77 +Description=Ganeti Noded
78 +ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
79 +
80 +[Service]
81 +Type=forking
82 +EnvironmentFile=-/etc/sysconfig/ganeti
83 +ExecStartPre=@PKGLIBDIR@/ensure-dirs
84 +ExecStart=@PREFIX@/sbin/ganeti-noded $NODED_ARGS
85 +User=@GNTNODEDUSER@
86 +Group=@GNTDAEMONSGROUP@
87 +PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-noded.pid
88 +KillMode=control-group
89 +
90 +[Install]
91 +WantedBy=ganeti.target
92 --- ganeti-2.6.2/doc/examples.orig/ganeti-rapi.service.in       1970-01-01 01:00:00.000000000 +0100
93 +++ ganeti-2.6.2/doc/examples/ganeti-rapi.service.in    2013-06-01 15:55:37.644894309 +0200
94 @@ -0,0 +1,18 @@
95 +[Unit]
96 +Description=Ganeti RAPI
97 +Requires=ganeti-noded.service ganeti-masterd.service
98 +After=ganeti-noded.service ganeti-masterd.service
99 +ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
100 +
101 +[Service]
102 +Type=forking
103 +EnvironmentFile=-/etc/sysconfig/ganeti
104 +ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
105 +ExecStart=@PREFIX@/sbin/ganeti-rapi $RAPI_ARGS
106 +User=@GNTRAPIUSER@
107 +Group=@GNTRAPIGROUP@
108 +PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-rapi.pid
109 +KillMode=process
110 +
111 +[Install]
112 +WantedBy=ganeti.target
113 --- ganeti-2.6.2/doc/examples.orig/ganeti-luxid.service.in      1970-01-01 01:00:00.000000000 +0100
114 +++ ganeti-2.6.2/doc/examples/ganeti-luxid.service.in   2013-06-01 15:55:37.594893846 +0200
115 @@ -0,0 +1,18 @@
116 +[Unit]
117 +Description=Ganeti luxid
118 +Requires=ganeti-noded.service ganeti-masterd.service ganeti-rapi.service
119 +After=ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service
120 +ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
121 +
122 +[Service]
123 +Type=forking
124 +EnvironmentFile=-/etc/sysconfig/ganeti
125 +ExecStartPre=/usr/bin/sudo @PKGLIBDIR@/ensure-dirs
126 +ExecStart=@PREFIX@/sbin/ganeti-luxid $LUXID_ARGS
127 +User=@GNTLUXIDUSER@
128 +Group=@GNTLUXIDGROUP@
129 +PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-luxid.pid
130 +KillMode=process
131 +
132 +[Install]
133 +WantedBy=ganeti.target
134 --- ganeti-2.6.2/doc/examples.orig/ganeti-mond.service.in       1970-01-01 01:00:00.000000000 +0100
135 +++ ganeti-2.6.2/doc/examples/ganeti-mond.service.in    2013-06-01 15:55:37.594893846 +0200
136 @@ -0,0 +1,18 @@
137 +[Unit]
138 +Description=Ganeti mond
139 +Requires=ganeti-noded.service
140 +After=ganeti-noded.service ganeti-masterd.service ganeti-rapi.service
141 +ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
142 +
143 +[Service]
144 +Type=forking
145 +EnvironmentFile=-/etc/sysconfig/ganeti
146 +ExecStartPre=@PKGLIBDIR@/ensure-dirs
147 +ExecStart=@PREFIX@/sbin/ganeti-mond $MOND_ARGS
148 +User=@GNTMONDUSER@
149 +Group=@GNTMONDGROUP@
150 +PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-mond.pid
151 +KillMode=process
152 +
153 +[Install]
154 +WantedBy=ganeti.target
155 --- ganeti-2.6.2/doc/examples.orig/ganeti.target        1970-01-01 01:00:00.000000000 +0100
156 +++ ganeti-2.6.2/doc/examples/ganeti.target     2013-06-01 15:55:37.661561129 +0200
157 @@ -0,0 +1,5 @@
158 +[Unit]
159 +Description=Ganeti
160 +
161 +[Install]
162 +WantedBy=multi-user.target
163 --- ganeti-2.6.2/doc/examples.orig/ganeti.sudoers.in    1970-01-01 01:00:00.000000000 +0100
164 +++ ganeti-2.6.2/doc/examples/ganeti.sudoers.in 2013-06-01 15:55:37.661561129 +0200
165 @@ -0,0 +1,3 @@
166 +User_Alias GANETI = @GNTCONFDUSER@, @GNTMASTERUSER@, @GNTRAPIUSER@, @GNTLUXIDUSER@
167 +
168 +GANETI ALL=(ALL) NOPASSWD: @PKGLIBDIR@/ensure-dirs
169 --- ganeti-2.6.2/doc/examples.orig/README.systemd       1970-01-01 01:00:00.000000000 +0100
170 +++ ganeti-2.6.2/doc/examples/README.systemd    2013-06-01 15:55:37.661561129 +0200
171 @@ -0,0 +1,14 @@
172 +To register the services with ganeti.target (order doesn't matter):
173 +
174 +    systemctl enable ganeti-noded ganeti-masterd ganeti-rapi ganeti-mond
175 +
176 +To include confd:
177 +
178 +    systemctl enable ganeti-confd
179 +
180 +To signal to the ganeti target that it should start at boot:
181 +
182 +    systemctl enable ganeti.target
183 +
184 +Note that the files aren't at all tested beyond just being able to start the
185 +daemons. I don't have Ganeti running yet, so I can't test stopping.
This page took 0.030334 seconds and 3 git commands to generate.