Description of problem: The deltacloudd binary that comes with the deltacloud core package needs to properly daemonize itself. It also needs to have an initscript, an initial version of which is available in deltacloud-configure. Once we have both of these in place, we can properly run "service deltacloud-core start", or similar, and have the log files go to a standard location (instead of STDOUT/STDERR).
[root@localhost log]# cat /etc/init.d/deltacloud-core #!/bin/bash # # # deltacloud-core startup script for deltacloud-core server # # chkconfig: - 97 03 # description: deltacloud-core is primary server process for the \ # Deltacloud Core component. # [ -r /etc/sysconfig/deltacloud-core ] && . /etc/sysconfig/deltacloud-core ENV="${ENV:-production}" DRIVER="${DRIVER:-ec2}" PORT="${PORT:-3002}" LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-core }" LOGFILE="${LOGFILE:-/var/log/deltacloud-core/$DRIVER.log}" PROG=/usr/bin/deltacloudd . /etc/init.d/functions start() { echo -n "Starting deltacloud-core: " $PROG -i $DRIVER -e $ENV -p $PORT -r 0.0.0.0 >> $LOGFILE 2>&1 & RETVAL=$? if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then echo_success echo else echo_failure echo fi } stop() { echo -n "Shutting down deltacloud-core: " RETVAL=$? killall deltacloudd if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then echo_success echo else echo_failure echo fi } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; reload) ;; force-reload) restart ;; status) status $PROG RETVAL=$? ;; *) echo "Usage: deltacloud-core {start|stop|restart|status}" exit 1 ;; esac exit $RETVAL
Guys I started packaging process for Deltacloud API for Fedora and EL: https://bugzilla.redhat.com/show_bug.cgi?id=674060 This RPM includes initscript and daemonize stuff from "support/fedora" directory. Feel free to take it for an review.
release pending...
closing out old bugs
perm close