- added systemd support
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 1 Jun 2013 16:17:16 +0000 (18:17 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 1 Jun 2013 16:17:16 +0000 (18:17 +0200)
- added init scripts
- packaged bash-completion script
- updated BRs

ganeti-confd.init [new file with mode: 0644]
ganeti-masterd.init [new file with mode: 0644]
ganeti-noded.init [new file with mode: 0644]
ganeti-rapi.init [new file with mode: 0644]
ganeti.spec
systemd.patch [new file with mode: 0644]

diff --git a/ganeti-confd.init b/ganeti-confd.init
new file mode 100644 (file)
index 0000000..3de8610
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/sh
+#
+# ganeti-confd Start/Stop Ganeti Cluster config daemon.
+#
+# chkconfig:   2345 99 01
+# description: Ganeti Cluster config daemon.
+#
+# processname: ganeti-confd
+# pidfile:     /var/run/ganeti/ganeti-confd.pid
+#
+### BEGIN INIT INFO
+# Provides:          ganeti-confd
+# Required-Start:    $syslog $remote_fs
+# Required-Stop:     $syslog $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Ganeti Cluster config daemon
+# Description:       Ganeti Cluster config daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/ganeti ] && . /etc/sysconfig/ganeti
+
+if [ ! -f /var/lib/ganeti/server.pem ]; then
+       echo "Missing configuration file /var/lib/ganeti/server.pem"
+       exit 1
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ -f /var/lock/subsys/ganeti-confd ]; then
+               msg_already_running "Ganeti Cluster config daemon"
+               return
+       fi
+
+       msg_starting "Ganeti Cluster config daemon"
+       daemon --user USER --pidfile /var/run/ganeti/ganeti-confd.pid /usr/sbin/ganeti-confd $CONFD_ARGS
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-confd
+}
+
+stop() {
+       if [ ! -f /var/lock/subsys/ganeti-confd ]; then
+               msg_not_running "Ganeti Cluster config daemon"
+               return
+       fi
+
+       msg_stopping "Ganeti Cluster daemon"
+       killproc --pidfile /var/run/ganeti/ganeti-confd.pid ganeti-confd
+       rm -f /var/lock/subsys/ganeti-confd
+}
+
+# HUP causes daemon to reopen logs only
+reload() {
+       if [ ! -f /var/lock/subsys/ganeti-confd ]; then
+               msg_not_running "Ganeti Cluster config daemon"
+               RETVAL=7
+               return
+       fi
+
+       msg_reloading "Ganeti Cluster config daemon"
+       killproc ganeti-confd -HUP
+       RETVAL=$?
+}
+
+condrestart() {
+       if [ ! -f /var/lock/subsys/ganeti-confd ]; then
+               msg_not_running "Ganeti Cluster config daemon"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  reload|force-reload|flush-logs)
+       reload
+       ;;
+  status)
+       status --pidfile /var/run/ganeti/ganeti-confd.pid ganeti-confd
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|flush-logs|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/ganeti-masterd.init b/ganeti-masterd.init
new file mode 100644 (file)
index 0000000..8cded62
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/sh
+#
+# ganeti-masterd       Start/Stop Ganeti Cluster master daemon.
+#
+# chkconfig:   2345 97 03
+# description: Ganeti Cluster master daemon.
+#
+# processname: ganeti-masterd
+# pidfile:     /var/run/ganeti/ganeti-masterd.pid
+#
+### BEGIN INIT INFO
+# Provides:          ganeti-masterd
+# Required-Start:    $syslog $remote_fs
+# Required-Stop:     $syslog $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Ganeti Cluster master daemon
+# Description:       Ganeti Cluster master daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/ganeti ] && . /etc/sysconfig/ganeti
+
+if [ ! -f /var/lib/ganeti/server.pem ]; then
+       echo "Missing configuration file /var/lib/ganeti/server.pem"
+       exit 1
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ -f /var/lock/subsys/ganeti-masterd ]; then
+               msg_already_running "Ganeti Cluster master daemon"
+               return
+       fi
+
+       msg_starting "Ganeti Cluster master daemon"
+       daemon --user USER --pidfile /var/run/ganeti/ganeti-masterd.pid /usr/sbin/ganeti-masterd $MASTERD_ARGS
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-masterd
+}
+
+stop() {
+       if [ ! -f /var/lock/subsys/ganeti-masterd ]; then
+               msg_not_running "Ganeti Cluster master daemon"
+               return
+       fi
+
+       msg_stopping "Ganeti Cluster master daemon"
+       killproc --pidfile /var/run/ganeti/ganeti-masterd.pid ganeti-masterd
+       rm -f /var/lock/subsys/ganeti-masterd
+}
+
+# HUP causes daemon to reopen logs only
+reload() {
+       if [ ! -f /var/lock/subsys/ganeti-masterd ]; then
+               msg_not_running "Ganeti Cluster master daemon"
+               RETVAL=7
+               return
+       fi
+
+       msg_reloading "Ganeti Cluster master daemon"
+       killproc ganeti-masterd -HUP
+       RETVAL=$?
+}
+
+condrestart() {
+       if [ ! -f /var/lock/subsys/ganeti-masterd ]; then
+               msg_not_running "Ganeti Cluster master daemon"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  reload|force-reload|flush-logs)
+       reload
+       ;;
+  status)
+       status --pidfile /var/run/ganeti/ganeti-masterd.pid ganeti-masterd
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|flush-logs|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/ganeti-noded.init b/ganeti-noded.init
new file mode 100644 (file)
index 0000000..8d255b5
--- /dev/null
@@ -0,0 +1,108 @@
+#!/bin/sh
+#
+# ganeti-noded Start/Stop Ganeti Cluster node daemon.
+#
+# chkconfig:   2345 96 04
+# description: Ganeti Cluster node daemon.
+#
+# processname: ganeti-noded
+# pidfile:     /var/run/ganeti/ganeti-noded.pid
+#
+### BEGIN INIT INFO
+# Provides:          ganeti-noded
+# Required-Start:    $syslog $remote_fs
+# Required-Stop:     $syslog $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Ganeti Cluster node daemon
+# Description:       Ganeti Cluster node daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/ganeti ] && . /etc/sysconfig/ganeti
+
+if [ ! -f /var/lib/ganeti/server.pem ]; then
+       echo "Missing configuration file /var/lib/ganeti/server.pem"
+       exit 1
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ -f /var/lock/subsys/ganeti-noded ]; then
+               msg_already_running "Ganeti Cluster node daemon"
+               return
+       fi
+
+       msg_starting "Ganeti Cluster node daemon"
+       daemon --user USER --pidfile /var/run/ganeti/ganeti-noded.pid /usr/sbin/ganeti-noded $NODED_ARGS
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-noded
+}
+
+stop() {
+       if [ ! -f /var/lock/subsys/ganeti-noded ]; then
+               msg_not_running "Ganeti Cluster node daemon"
+               return
+       fi
+
+       msg_stopping "Ganeti Cluster node daemon"
+       killproc --pidfile /var/run/ganeti/ganeti-noded.pid ganeti-noded
+       rm -f /var/lock/subsys/ganeti-noded
+}
+
+# HUP causes daemon to reopen logs only
+reload() {
+       if [ ! -f /var/lock/subsys/ganeti-noded ]; then
+               msg_not_running "Ganeti Cluster node daemon"
+               RETVAL=7
+               return
+       fi
+
+       msg_reloading "Ganeti Cluster node daemon"
+       killproc ganeti-noded -HUP
+       RETVAL=$?
+}
+
+condrestart() {
+       if [ ! -f /var/lock/subsys/ganeti-noded ]; then
+               msg_not_running "Ganeti Cluster node daemon"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  reload|force-reload|flush-logs)
+       reload
+       ;;
+  status)
+       status --pidfile /var/run/ganeti/ganeti-noded.pid ganeti-noded
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|flush-logs|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/ganeti-rapi.init b/ganeti-rapi.init
new file mode 100644 (file)
index 0000000..cf93c34
--- /dev/null
@@ -0,0 +1,110 @@
+#!/bin/sh
+#
+# ganeti-rapi  Start/Stop Ganeti Cluster remote API daemon
+#
+# chkconfig:   2345 98 02
+# description: Ganeti Cluster remote API daemon
+#
+# processname: ganeti-rapi
+# pidfile:     /var/run/ganeti/ganeti-rapi.pid
+#
+### BEGIN INIT INFO
+# Provides:          ganeti-rapi
+# Required-Start:    $syslog $remote_fs
+# Required-Stop:     $syslog $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Ganeti Cluster remote API daemon
+# Description:       Ganeti Cluster remote API daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+_ARGS=""
+
+# Get service config
+[ -f /etc/sysconfig/ganeti ] && . /etc/sysconfig/ganeti
+
+if [ ! -f /var/lib/ganeti/server.pem ]; then
+       echo "Missing configuration file /var/lib/ganeti/server.pem"
+       exit 1
+fi
+
+start() {
+       # Check if the service is already running?
+       if [ -f /var/lock/subsys/ganeti-rapi ]; then
+               msg_already_running "Ganeti Cluster remote API daemon"
+               return
+       fi
+
+       msg_starting "Ganeti Cluster remote API daemon"
+       daemon --user USER --pidfile /var/run/ganeti/ganeti-rapi.pid /usr/sbin/ganeti-rapi $_ARGS
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ganeti-rapi
+}
+
+stop() {
+       if [ ! -f /var/lock/subsys/ganeti-rapi ]; then
+               msg_not_running "Ganeti Cluster remote API daemon"
+               return
+       fi
+
+       msg_stopping "Ganeti Cluster remote API daemon"
+       killproc --pidfile /var/run/ganeti/ganeti-rapi.pid ganeti-rapi
+       rm -f /var/lock/subsys/ganeti-rapi
+}
+
+# HUP causes daemon to reopen logs only
+reload() {
+       if [ ! -f /var/lock/subsys/ganeti-rapi ]; then
+               msg_not_running "Ganeti Cluster remote API daemon"
+               RETVAL=7
+               return
+       fi
+
+       msg_reloading "Ganeti Cluster remote API daemon"
+       killproc ganeti-rapi -HUP
+       RETVAL=$?
+}
+
+condrestart() {
+       if [ ! -f /var/lock/subsys/ganeti-rapi ]; then
+               msg_not_running "Ganeti Cluster remote API daemon"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  reload|force-reload|flush-logs)
+       reload
+       ;;
+  status)
+       status --pidfile /var/run/ganeti/ganeti-rapi.pid ganeti-rapi
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|flush-logs|status}"
+       exit 3
+esac
+
+exit $RETVAL
index 9efaf0e..956e5e5 100644 (file)
@@ -7,8 +7,16 @@ Group:         Applications/System
 Source0:       https://ganeti.googlecode.com/files/%{name}-%{version}.tar.gz
 # Source0-md5: 9d9a0c5c0341d5775988961449f82b99
 Source1:       %{name}.tmpfiles
+Source2:       ganeti-confd.init
+Source3:       ganeti-masterd.init
+Source4:       ganeti-noded.init
+Source5:       ganeti-rapi.init
 Patch0:                fix-no-kvm.patch
+Patch1:                systemd.patch
 URL:           https://code.google.com/p/ganeti/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: curl-devel
 BuildRequires: fakeroot
 BuildRequires: gawk
 BuildRequires: ghc
@@ -16,12 +24,14 @@ BuildRequires:      ghc-QuickCheck
 BuildRequires: ghc-curl
 BuildRequires: ghc-haskell-platform
 BuildRequires: ghc-json
+BuildRequires: gmp-devel
 BuildRequires: hlint
 BuildRequires: hscolour
 BuildRequires: python
 BuildRequires: python-affinity
 BuildRequires: python-modules
 BuildRequires: python-paramiko
+BuildRequires: python-pyOpenSSL
 BuildRequires: python-pycurl
 BuildRequires: python-pyinotify
 BuildRequires: python-pyparsing
@@ -56,11 +66,23 @@ The tools provided are:
  - hspace, used for capacity calculation
  - hscan, used to gather cluster files for offline use in hbal/hspace
 
+%package -n bash-completion-ganeti
+Summary:       bash-completion for ganeti
+Group:         Applications/Shells
+Requires:      %{name} = %{version}
+
+%description -n bash-completion-ganeti
+bash-completion for ganeti.
+
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
+%{__aclocal} -I autotools
+%{__autoconf}
+%{__automake}
 # DON'T use full path to xl binary, just 'xl' (see lib/hypervisor/hv_xen.py for a reason)
 %configure \
        IP_PATH=/sbin/ip \
@@ -83,12 +105,23 @@ The tools provided are:
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}} \
-       $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
+       $RPM_BUILD_ROOT/etc/{ganeti,cron.d,bash_completion.d,sysconfig,rc.d/init.d}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ganeti.conf
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-confd
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-masterd
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-noded
+install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/ganeti-rapi
+
+install doc/examples/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/ganeti
+install doc/examples/ganeti.cron $RPM_BUILD_ROOT/etc/cron.d/ganeti
+install doc/examples/ganeti.default $RPM_BUILD_ROOT/etc/sysconfig/ganeti
+install doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir}
+install doc/examples/ganeti.target $RPM_BUILD_ROOT%{systemdunitdir}
+install doc/examples/ganeti-{noded,masterd,rapi,confd}.service $RPM_BUILD_ROOT%{systemdunitdir}
 
 %py_postclean
 
@@ -110,14 +143,14 @@ fi
 %post
 /sbin/chkconfig --add %{name}
 %service %{name} restart
-%systemd_post %{name}.service
+%systemd_post ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service -q %{name} stop
        /sbin/chkconfig --del %{name}
 fi
-%systemd_preun %{name}.service
+%systemd_preun ganeti.target ganeti-noded.service ganeti-masterd.service ganeti-rapi.service ganeti-confd.service
 
 %postun
 %systemd_reload
@@ -125,15 +158,19 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc NEWS README UPGRADE
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
-%{systemdunitdir}/%{name}.service
+%attr(754,root,root) /etc/rc.d/init.d/ganeti-confd
+%attr(754,root,root) /etc/rc.d/init.d/ganeti-masterd
+%attr(754,root,root) /etc/rc.d/init.d/ganeti-noded
+%attr(754,root,root) /etc/rc.d/init.d/ganeti-rapi
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ganeti
+%dir %{_sysconfdir}/ganeti
+%{systemdunitdir}/ganeti.target
+%{systemdunitdir}/ganeti-confd.service
+%{systemdunitdir}/ganeti-masterd.service
+%{systemdunitdir}/ganeti-noded.service
+%{systemdunitdir}/ganeti-rapi.service
 %{systemdtmpfilesdir}/ganeti.conf
-%if 0
-# if _sysconfdir != /etc:
-#%%dir %{_sysconfdir}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
-%endif
+/etc/cron.d/ganeti
 %dir %{_libdir}/ganeti
 %{_libdir}/ganeti/check-cert-expired
 %{_libdir}/ganeti/daemon-util
@@ -230,3 +267,7 @@ fi
 %{_mandir}/man1/hscan.1*
 %{_mandir}/man1/hspace.1*
 %{_mandir}/man1/htools.1*
+
+%files -n bash-completion-ganeti
+%defattr(644,root,root,755)
+/etc/bash_completion.d/ganeti
diff --git a/systemd.patch b/systemd.patch
new file mode 100644 (file)
index 0000000..058394e
--- /dev/null
@@ -0,0 +1,129 @@
+http://code.google.com/p/ganeti/issues/detail?id=444
+
+--- ganeti-2.6.2/Makefile.am~  2012-12-21 15:38:52.000000000 +0100
++++ ganeti-2.6.2/Makefile.am   2013-06-01 16:01:46.594026366 +0200
+@@ -149,6 +149,7 @@
+       devel/upload \
+       $(BUILT_EXAMPLES) \
+       doc/examples/bash_completion \
++      doc/examples/ganeti.target \
+       lib/_generated_rpc.py \
+       $(man_MANS) \
+       $(manhtml) \
+@@ -190,7 +190,11 @@
+       doc/examples/ganeti.cron \
+       doc/examples/ganeti.initd \
+       doc/examples/gnt-config-backup \
+-      doc/examples/hooks/ipsec
++      doc/examples/hooks/ipsec \
++      doc/examples/ganeti-confd.service \
++      doc/examples/ganeti-masterd.service \
++      doc/examples/ganeti-noded.service \
++      doc/examples/ganeti-rapi.service
+ nodist_pkgpython_PYTHON = \
+       $(BUILT_PYTHON_SOURCES)
+--- ganeti-2.6.2/doc/examples.orig/ganeti-confd.service.in     1970-01-01 01:00:00.000000000 +0100
++++ ganeti-2.6.2/doc/examples/ganeti-confd.service.in  2013-06-01 15:55:37.594893846 +0200
+@@ -0,0 +1,17 @@
++[Unit]
++Description=Ganeti Confd
++Requires=ganeti-noded.service ganeti-masterd.service ganeti-rapi.service
++After=ganeti-rapi.service
++
++[Service]
++Type=forking
++ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
++EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStart=@PREFIX@/sbin/ganeti-confd $CONFD_ARGS
++User=@GNTCONFDUSER@
++Group=@GNTCONFDGROUP@
++PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-confd.pid
++KillMode=process
++
++[Install]
++WantedBy=ganeti.target
+--- ganeti-2.6.2/doc/examples.orig/ganeti-masterd.service.in   1970-01-01 01:00:00.000000000 +0100
++++ ganeti-2.6.2/doc/examples/ganeti-masterd.service.in        2013-06-01 15:55:37.611560663 +0200
+@@ -0,0 +1,18 @@
++[Unit]
++Description=Ganeti Masterd
++Requires=ganeti-noded.service
++After=ganeti-noded.service
++
++[Service]
++Type=forking
++ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
++EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStart=@PREFIX@/sbin/ganeti-masterd $MASTERD_ARGS
++User=@GNTNODEDUSER@
++Group=@GNTDAEMONSGROUP@
++PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-masterd.pid
++# TODO: Should KillMode be process?
++KillMode=control-group
++
++[Install]
++WantedBy=ganeti.target
+--- ganeti-2.6.2/doc/examples.orig/ganeti-noded.service.in     1970-01-01 01:00:00.000000000 +0100
++++ ganeti-2.6.2/doc/examples/ganeti-noded.service.in  2013-06-01 15:55:37.631560853 +0200
+@@ -0,0 +1,15 @@
++[Unit]
++Description=Ganeti Noded
++
++[Service]
++Type=forking
++ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
++EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStart=@PREFIX@/sbin/ganeti-noded $NODED_ARGS
++User=@GNTNODEDUSER@
++Group=@GNTDAEMONSGROUP@
++PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-noded.pid
++KillMode=control-group
++
++[Install]
++WantedBy=ganeti.target
+--- ganeti-2.6.2/doc/examples.orig/ganeti-rapi.service.in      1970-01-01 01:00:00.000000000 +0100
++++ ganeti-2.6.2/doc/examples/ganeti-rapi.service.in   2013-06-01 15:55:37.644894309 +0200
+@@ -0,0 +1,17 @@
++[Unit]
++Description=Ganeti RAPI
++Requires=ganeti-noded.service ganeti-masterd.service
++After=ganeti-masterd.service
++
++[Service]
++Type=forking
++ConditionPathExists=@LOCALSTATEDIR@/lib/ganeti/server.pem
++EnvironmentFile=-/etc/sysconfig/ganeti
++ExecStart=@PREFIX@/sbin/ganeti-rapi $RAPI_ARGS
++User=@GNTRAPIUSER@
++Group=@GNTRAPIGROUP@
++PIDFile=@LOCALSTATEDIR@/run/ganeti/ganeti-rapi.pid
++KillMode=process
++
++[Install]
++WantedBy=ganeti.target
+--- ganeti-2.6.2/doc/examples.orig/ganeti.target       1970-01-01 01:00:00.000000000 +0100
++++ ganeti-2.6.2/doc/examples/ganeti.target    2013-06-01 15:55:37.661561129 +0200
+@@ -0,0 +1,5 @@
++[Unit]
++Description=Ganeti
++
++[Install]
++WantedBy=multi-user.target
+--- ganeti-2.6.2/doc/examples.orig/README.systemd      1970-01-01 01:00:00.000000000 +0100
++++ ganeti-2.6.2/doc/examples/README.systemd   2013-06-01 15:55:37.661561129 +0200
+@@ -0,0 +1,14 @@
++To register the services with ganeti.target (order doesn't matter):
++
++    systemctl enable ganeti-noded ganeti-masterd ganeti-rapi
++
++To include confd:
++
++    systemctl enable ganeti-confd
++
++To signal to the ganeti target that it should start at boot:
++
++    systemctl enable ganeti.target
++
++Note that the files aren't at all tested beyond just being able to start the
++daemons. I don't have Ganeti running yet, so I can't test stopping.
This page took 0.125781 seconds and 4 git commands to generate.