]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
systemd support for cinder-volume
authorgustavo panizzo <gfa@zumbi.com.ar>
Tue, 5 Aug 2014 05:34:45 +0000 (02:34 -0300)
committergustavo panizzo <gfa@zumbi.com.ar>
Tue, 5 Aug 2014 05:34:45 +0000 (02:34 -0300)
debian/cinder-volume.init
debian/cinder-volume.service [new file with mode: 0644]

index e1a3b7e798df0f2ee664438b8fd3cb639b7e2160..23542cc2361ed38d2e28ab51084122c0ccf2374c 100644 (file)
@@ -20,7 +20,7 @@ DESC="OpenStack Cinder Volume"
 NAME=cinder-volume
 DAEMON=/usr/bin/cinder-volume
 DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/cinder/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 CINDER_USER=cinder
 LOCK_DIR=/var/lock/cinder/
@@ -28,8 +28,8 @@ LOCK_DIR=/var/lock/cinder/
 # Exit if the package is not installed
 [ -x $DAEMON ] || exit 0
 
-mkdir -p ${LOCK_DIR}
-chown ${CINDER_USER} ${LOCK_DIR}
+mkdir -p ${LOCK_DIR} /var/run/cinder
+chown ${CINDER_USER} ${LOCK_DIR} /var/run/cinder
 
 . /lib/lsb/init-functions
 
diff --git a/debian/cinder-volume.service b/debian/cinder-volume.service
new file mode 100644 (file)
index 0000000..0fbc278
--- /dev/null
@@ -0,0 +1,17 @@
+[Unit]
+Description=OpenStack Cinder Volume
+Documentation=http://docs.openstack.org/
+After=postgresql.service mysql.service keystone.service rabbitmq-server.service ntp.service network.service
+
+[Service]
+User=cinder
+Group=cinder
+ExecStart=/etc/init.d/cinder-volume systemd-start
+ExecStop=/etc/init.d/cinder-volume systemd-stop
+PIDFile=/var/run/cinder/cinder-volume.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+