import traceback
import BaseHTTPServer
import simplejson
+import errno
from optparse import OptionParser
print "Cluster configuration incomplete: '%s'" % str(err)
sys.exit(5)
+ # create /var/run/ganeti if not existing, in order to take care of
+ # tmpfs /var/run
+ if not os.path.exists(constants.BDEV_CACHE_DIR):
+ try:
+ os.mkdir(constants.BDEV_CACHE_DIR, 0755)
+ except EnvironmentError, err:
+ if err.errno != errno.EEXIST:
+ print ("Node setup wrong, cannot create directory %s: %s" %
+ (constants.BDEV_CACHE_DIR, err))
+ sys.exit(5)
+ if not os.path.isdir(constants.BDEV_CACHE_DIR):
+ print ("Node setup wrong, %s is not a directory" %
+ constants.BDEV_CACHE_DIR)
+ sys.exit(5)
+
# become a daemon
if options.fork:
createDaemon()
NODED=@PREFIX@/sbin/ganeti-noded
MASTER=@PREFIX@/sbin/ganeti-master
SCRIPTNAME=@SYSCONFDIR@/init.d/ganeti
-RUNDIR="@LOCALSTATEDIR@/run/ganeti"
test -f $NODED || exit 0
start)
log_daemon_msg "Starting $DESC" "$NAME"
check_config
- test -e "$RUNDIR" || mkdir -p "$RUNDIR"
if start-stop-daemon --start --quiet --exec $NODED; then
log_end_msg 0
else
esac
exit 0
-
-# vim: set sw=4 sts=4 et foldmethod=marker :