From: gustavo panizzo Date: Tue, 5 Aug 2014 05:34:45 +0000 (-0300) Subject: systemd support for cinder-volume X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f4824549495eb5b66921430b11a3e35a0cff1bc8;p=openstack-build%2Fcinder-build.git systemd support for cinder-volume Rewritten-From: c8dc07293d3d78d1039b38cb3b31ff7008fcd676 --- diff --git a/xenial/debian/cinder-volume.init b/xenial/debian/cinder-volume.init index e1a3b7e79..23542cc23 100644 --- a/xenial/debian/cinder-volume.init +++ b/xenial/debian/cinder-volume.init @@ -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/xenial/debian/cinder-volume.service b/xenial/debian/cinder-volume.service new file mode 100644 index 000000000..0fbc278c4 --- /dev/null +++ b/xenial/debian/cinder-volume.service @@ -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 +