[openstack-nova/f20] Merge el6 and Fedora spec files
Pádraig Brady
pbrady at fedoraproject.org
Sat Oct 4 14:38:25 UTC 2014
commit 9de56c525703cb0104ee8a5e3e0ad6a4a7404a59
Author: Pádraig Brady <P at draigBrady.com>
Date: Fri Oct 3 17:28:16 2014 +0100
Merge el6 and Fedora spec files
EL6 drops uneeded deps on fuse and libguestfs-mount.
Fedora/EL7 now creates /var/lib/nova/images like on EL6,
and also uses the %systemd_macros.
Both set Vendor in nova config to "RDO project".
el6 parallel modules patch is maintained outside
of the patches branch, and referenced in the spec as follows
to avoid improper removal by (rdopkg) update-patches:
patch100: lower-case-p.patch
%patch -P100 # rather than %patch100
...-parallel-install-versions-of-epel-packag.patch | 51 +++
openstack-nova-api.init | 110 +++++
openstack-nova-api.upstart | 8 +
openstack-nova-cells.init | 102 +++++
openstack-nova-cells.upstart | 8 +
openstack-nova-cert.init | 102 +++++
openstack-nova-cert.upstart | 8 +
openstack-nova-compute.init | 118 +++++
openstack-nova-compute.upstart | 8 +
openstack-nova-conductor.init | 102 +++++
openstack-nova-conductor.upstart | 8 +
openstack-nova-console.init | 102 +++++
openstack-nova-console.upstart | 8 +
openstack-nova-consoleauth.init | 102 +++++
openstack-nova-consoleauth.upstart | 8 +
openstack-nova-direct-api.init | 110 +++++
openstack-nova-metadata-api.init | 102 +++++
openstack-nova-metadata-api.upstart | 8 +
openstack-nova-network.init | 116 +++++
openstack-nova-network.upstart | 8 +
openstack-nova-novncproxy.init | 102 +++++
openstack-nova-novncproxy.upstart | 8 +
openstack-nova-objectstore.init | 102 +++++
openstack-nova-objectstore.upstart | 8 +
openstack-nova-scheduler.init | 102 +++++
openstack-nova-scheduler.upstart | 8 +
openstack-nova-spicehtml5proxy.init | 102 +++++
openstack-nova-spicehtml5proxy.upstart | 8 +
openstack-nova-xvpvncproxy.init | 102 +++++
openstack-nova-xvpvncproxy.upstart | 8 +
openstack-nova.spec | 474 ++++++++++++++++----
31 files changed, 2127 insertions(+), 86 deletions(-)
---
diff --git a/Use-updated-parallel-install-versions-of-epel-packag.patch b/Use-updated-parallel-install-versions-of-epel-packag.patch
new file mode 100644
index 0000000..3f2bb05
--- /dev/null
+++ b/Use-updated-parallel-install-versions-of-epel-packag.patch
@@ -0,0 +1,51 @@
+From 906bb41217c21f7e288cc511d2ceaa7c0698ac4b Mon Sep 17 00:00:00 2001
+From: Xavier Queralt <xqueralt at redhat.com>
+Date: Mon, 16 Dec 2013 12:33:13 +0100
+Subject: [PATCH] Use updated parallel install versions of epel package
+
+Use SQLAlchemy >= 0.7.8 WebOb >= 1.2 Routes >= 1.12.3 PasteDeploy >= 1.5.0
+and depend on the parallel installable versions of these packages to satisfy
+those requirements.
+---
+ nova/__init__.py | 31 +++++++++++++++++++++++++++++++
+ 1 file changed, 31 insertions(+)
+
+diff --git a/nova/__init__.py b/nova/__init__.py
+index e21bdd7..992d6de 100644
+--- a/nova/__init__.py
++++ b/nova/__init__.py
+@@ -24,3 +24,34 @@
+ :platform: Unix
+ :synopsis: Infrastructure-as-a-Service Cloud platform.
+ """
++
++import sys
++import pkg_resources
++
++# If there is a conflicting non egg module,
++# i.e. an older standard system module installed,
++# then replace it with this requirement
++def replace_dist(requirement):
++ try:
++ return pkg_resources.require(requirement)
++ except pkg_resources.VersionConflict:
++ e = sys.exc_info()[1]
++ dist=e.args[0]
++ req=e.args[1]
++ if dist.key == req.key and not dist.location.endswith('.egg'):
++ del pkg_resources.working_set.by_key[dist.key]
++ # We assume there is no need to adjust sys.path
++ # and the associated pkg_resources.working_set.entries
++ return pkg_resources.require(requirement)
++
++replace_dist("WebOb >= 1.2")
++replace_dist("SQLAlchemy >= 0.7.8")
++replace_dist("Routes >= 1.12.3")
++replace_dist("Jinja2 >= 2.6")
++
++replace_dist("PasteDeploy >= 1.5.0")
++# This hack is needed because replace_dist() results in
++# the standard paste module path being at the start of __path__.
++# TODO: See can we get pkg_resources to do the right thing directly
++import paste
++paste.__path__.insert(0, paste.__path__.pop(-1))
diff --git a/openstack-nova-api.init b/openstack-nova-api.init
new file mode 100644
index 0000000..ff6f525
--- /dev/null
+++ b/openstack-nova-api.init
@@ -0,0 +1,110 @@
+#!/bin/sh
+#
+# openstack-nova-api OpenStack Nova API Server
+#
+# chkconfig: - 98 02
+# description: At the heart of the cloud framework is an API Server. \
+# This API Server makes command and control of the \
+# hypervisor, storage, and networking programmatically \
+# available to users in realization of the definition \
+# of cloud computing.
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova API Server
+# Description: At the heart of the cloud framework is an API Server.
+# This API Server makes command and control of the
+# hypervisor, storage, and networking programmatically
+# available to users in realization of the definition
+# of cloud computing.
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=api
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-api.upstart b/openstack-nova-api.upstart
new file mode 100644
index 0000000..24274e0
--- /dev/null
+++ b/openstack-nova-api.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova API Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-api --logfile /var/log/nova/api.log" nova
diff --git a/openstack-nova-cells.init b/openstack-nova-cells.init
new file mode 100644
index 0000000..83baf10
--- /dev/null
+++ b/openstack-nova-cells.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-cells OpenStack Nova Compute Cells service
+#
+# chkconfig: - 98 02
+# description: Implementation of an S3-like storage server based on local files.
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Compute DB Access service
+# Description: Service to handle database access for compute nodes
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=cells
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-cells.upstart b/openstack-nova-cells.upstart
new file mode 100644
index 0000000..bb0bbdd
--- /dev/null
+++ b/openstack-nova-cells.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Cells Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-cells --logfile /var/log/nova/cells.log" nova
diff --git a/openstack-nova-cert.init b/openstack-nova-cert.init
new file mode 100644
index 0000000..1ce65a8
--- /dev/null
+++ b/openstack-nova-cert.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-cert OpenStack Nova cert Worker
+#
+# chkconfig: - 98 02
+# description: cert manages auth cert access and creation
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Cert Manager
+# Description: cert manages auth cert access and creation
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=cert
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-cert.upstart b/openstack-nova-cert.upstart
new file mode 100644
index 0000000..6480c76
--- /dev/null
+++ b/openstack-nova-cert.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Cert Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-cert --logfile /var/log/nova/cert.log" nova
diff --git a/openstack-nova-compute.init b/openstack-nova-compute.init
new file mode 100644
index 0000000..0e6adc7
--- /dev/null
+++ b/openstack-nova-compute.init
@@ -0,0 +1,118 @@
+#!/bin/sh
+#
+# openstack-nova-compute OpenStack Nova Compute Worker
+#
+# chkconfig: - 98 02
+# description: Compute workers manage computing instances on host \
+# machines. Through the API, commands are dispatched \
+# to compute workers to: \
+# * Run instances \
+# * Terminate instances \
+# * Reboot instances \
+# * Attach volumes \
+# * Detach volumes \
+# * Get console output
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Compute Worker
+# Description: Compute workers manage computing instances on host
+# machines. Through the API, commands are dispatched
+# to compute workers to:
+# * Run instances
+# * Terminate instances
+# * Reboot instances
+# * Attach volumes
+# * Detach volumes
+# * Get console output
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=compute
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-compute.upstart b/openstack-nova-compute.upstart
new file mode 100644
index 0000000..5ff3f06
--- /dev/null
+++ b/openstack-nova-compute.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Compute Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-compute --logfile /var/log/nova/compute.log" nova
diff --git a/openstack-nova-conductor.init b/openstack-nova-conductor.init
new file mode 100644
index 0000000..34548e4
--- /dev/null
+++ b/openstack-nova-conductor.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-conductor OpenStack Nova Compute DB Access service
+#
+# chkconfig: - 98 02
+# description: Implementation of an S3-like storage server based on local files.
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Compute DB Access service
+# Description: Service to handle database access for compute nodes
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=conductor
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-conductor.upstart b/openstack-nova-conductor.upstart
new file mode 100644
index 0000000..bd2abb7
--- /dev/null
+++ b/openstack-nova-conductor.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Conductor Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log" nova
diff --git a/openstack-nova-console.init b/openstack-nova-console.init
new file mode 100644
index 0000000..b21ae59
--- /dev/null
+++ b/openstack-nova-console.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-console OpenStack Nova Console Proxy
+#
+# chkconfig: - 98 02
+# description: OpenStack Nova Console Proxy Server
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Console Proxy
+# Description: OpenStack Nova Console Proxy Server
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=console
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-console.upstart b/openstack-nova-console.upstart
new file mode 100644
index 0000000..ebbc2b2
--- /dev/null
+++ b/openstack-nova-console.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Console Proxy Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-console --logfile /var/log/nova/console.log" nova
diff --git a/openstack-nova-consoleauth.init b/openstack-nova-consoleauth.init
new file mode 100644
index 0000000..a904a27
--- /dev/null
+++ b/openstack-nova-consoleauth.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-console OpenStack Nova Console Auth Proxy
+#
+# chkconfig: - 98 02
+# description: OpenStack Nova Console Auth Proxy Server
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Console Auth Proxy
+# Description: OpenStack Nova Console Auth Proxy Server
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=consoleauth
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-consoleauth.upstart b/openstack-nova-consoleauth.upstart
new file mode 100644
index 0000000..6e27deb
--- /dev/null
+++ b/openstack-nova-consoleauth.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova VNC console auth Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-consoleauth --logfile /var/log/nova/consoleauth.log" nova
diff --git a/openstack-nova-direct-api.init b/openstack-nova-direct-api.init
new file mode 100644
index 0000000..c708acc
--- /dev/null
+++ b/openstack-nova-direct-api.init
@@ -0,0 +1,110 @@
+#!/bin/sh
+#
+# openstack-nova-api OpenStack Nova Direct API Server
+#
+# chkconfig: - 98 02
+# description: At the heart of the cloud framework is an API Server. \
+# This API Server makes command and control of the \
+# hypervisor, storage, and networking programmatically \
+# available to users in realization of the definition \
+# of cloud computing.
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Direct API Server
+# Description: At the heart of the cloud framework is an API Server.
+# This API Server makes command and control of the
+# hypervisor, storage, and networking programmatically
+# available to users in realization of the definition
+# of cloud computing.
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=direct-api
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-metadata-api.init b/openstack-nova-metadata-api.init
new file mode 100644
index 0000000..445a45f
--- /dev/null
+++ b/openstack-nova-metadata-api.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-metadata-api OpenStack Nova Metadata API Server
+#
+# chkconfig: - 98 02
+# description: Metadata provider for guests
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Metadata API Server
+# Description: OpenStack Nova Metadata API Server
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=metadata-api
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-api-metadata"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-metadata-api.upstart b/openstack-nova-metadata-api.upstart
new file mode 100644
index 0000000..62f953a
--- /dev/null
+++ b/openstack-nova-metadata-api.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Metadata API Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-api-metadata --logfile /var/log/nova/metadata-api.log" nova
diff --git a/openstack-nova-network.init b/openstack-nova-network.init
new file mode 100644
index 0000000..fe9ed45
--- /dev/null
+++ b/openstack-nova-network.init
@@ -0,0 +1,116 @@
+#!/bin/sh
+#
+# openstack-nova-network OpenStack Nova Network Controller
+#
+# chkconfig: - 98 02
+# description: The Network Controller manages the networking resources \
+# on host machines. The API server dispatches commands \
+# through the message queue, which are subsequently \
+# processed by Network Controllers. \
+# Specific operations include: \
+# * Allocate Fixed IP Addresses \
+# * Configuring VLANs for projects \
+# * Configuring networks for compute nodes \
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Network Controller
+# Description: The Network Controller manages the networking resources
+# on host machines. The API server dispatches commands
+# through the message queue, which are subsequently
+# processed by Network Controllers.
+# Specific operations include:
+# * Allocate Fixed IP Addresses
+# * Configuring VLANs for projects
+# * Configuring networks for compute nodes
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=network
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-network.upstart b/openstack-nova-network.upstart
new file mode 100644
index 0000000..1428bee
--- /dev/null
+++ b/openstack-nova-network.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Network Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-network --logfile /var/log/nova/network.log" nova
diff --git a/openstack-nova-novncproxy.init b/openstack-nova-novncproxy.init
new file mode 100644
index 0000000..e71400c
--- /dev/null
+++ b/openstack-nova-novncproxy.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-novncproxy OpenStack Nova Console noVNC Proxy
+#
+# chkconfig: - 98 02
+# description: OpenStack Nova Console noVNC Proxy Server
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Console noVNC Proxy
+# Description: OpenStack Nova Console noVNC Proxy Server
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=novncproxy
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --web /usr/share/novnc/ ${OPTIONS} &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-novncproxy.upstart b/openstack-nova-novncproxy.upstart
new file mode 100644
index 0000000..2ea095d
--- /dev/null
+++ b/openstack-nova-novncproxy.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova NoVNCP roxy Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-novncproxy --web /usr/share/novnc" nova
diff --git a/openstack-nova-objectstore.init b/openstack-nova-objectstore.init
new file mode 100644
index 0000000..fafedba
--- /dev/null
+++ b/openstack-nova-objectstore.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-objectstore OpenStack Nova Object Storage
+#
+# chkconfig: - 98 02
+# description: Implementation of an S3-like storage server based on local files.
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Object Storage
+# Description: Implementation of an S3-like storage server based on local files.
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=objectstore
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-objectstore.upstart b/openstack-nova-objectstore.upstart
new file mode 100644
index 0000000..322c1c5
--- /dev/null
+++ b/openstack-nova-objectstore.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Objectstore Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-objectstore --logfile /var/log/nova/objectstore.log" nova
diff --git a/openstack-nova-scheduler.init b/openstack-nova-scheduler.init
new file mode 100644
index 0000000..dd45c5d
--- /dev/null
+++ b/openstack-nova-scheduler.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-scheduler OpenStack Nova Scheduler
+#
+# chkconfig: - 98 02
+# description: Determines which physical hardware to allocate to a virtual resource
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Scheduler
+# Description: Determines which physical hardware to allocate to a virtual resource
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=scheduler
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-scheduler.upstart b/openstack-nova-scheduler.upstart
new file mode 100644
index 0000000..75bef56
--- /dev/null
+++ b/openstack-nova-scheduler.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Scheduler Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-scheduler --logfile /var/log/nova/scheduler.log" nova
diff --git a/openstack-nova-spicehtml5proxy.init b/openstack-nova-spicehtml5proxy.init
new file mode 100644
index 0000000..f5f0d28
--- /dev/null
+++ b/openstack-nova-spicehtml5proxy.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-xvpvncproxy OpenStack Nova Console XVP VNC Proxy
+#
+# chkconfig: - 98 02
+# description: OpenStack Nova Spice HTML5 Proxy Server
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Console XVP VNC Proxy
+# Description: OpenStack Nova Console XVP VNC Proxy Server
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=spicehtml5proxy
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-spicehtml5proxy.upstart b/openstack-nova-spicehtml5proxy.upstart
new file mode 100644
index 0000000..9f02da1
--- /dev/null
+++ b/openstack-nova-spicehtml5proxy.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Spice HTML5 proxy Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-spicehtml5proxy --logfile /var/log/nova/spicehtml5proxy.log" nova
diff --git a/openstack-nova-xvpvncproxy.init b/openstack-nova-xvpvncproxy.init
new file mode 100644
index 0000000..88affe4
--- /dev/null
+++ b/openstack-nova-xvpvncproxy.init
@@ -0,0 +1,102 @@
+#!/bin/sh
+#
+# openstack-nova-xvpvncproxy OpenStack Nova Console XVP VNC Proxy
+#
+# chkconfig: - 98 02
+# description: OpenStack Nova Console XVP VNC Proxy Server
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $remote_fs $network $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Stop: 0 1 6
+# Short-Description: OpenStack Nova Console XVP VNC Proxy
+# Description: OpenStack Nova Console XVP VNC Proxy Server
+### END INIT INFO
+
+. /etc/rc.d/init.d/functions
+
+suffix=xvpvncproxy
+prog=openstack-nova-$suffix
+exec="/usr/bin/nova-$suffix"
+config="/etc/nova/nova.conf"
+pidfile="/var/run/nova/nova-$suffix.pid"
+logfile="/var/log/nova/$suffix.log"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+lockfile=/var/lock/subsys/$prog
+
+start() {
+ [ -x $exec ] || exit 5
+ [ -f $config ] || exit 6
+ echo -n $"Starting $prog: "
+ daemon --user nova --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile"
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && touch $lockfile
+ return $retval
+}
+
+stop() {
+ echo -n $"Stopping $prog: "
+ killproc -p $pidfile $prog
+ retval=$?
+ echo
+ [ $retval -eq 0 ] && rm -f $lockfile
+ return $retval
+}
+
+restart() {
+ stop
+ start
+}
+
+reload() {
+ restart
+}
+
+force_reload() {
+ restart
+}
+
+rh_status() {
+ status -p $pidfile $prog
+}
+
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
+ status)
+ rh_status
+ ;;
+ condrestart|try-restart)
+ rh_status_q || exit 0
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 2
+esac
+exit $?
diff --git a/openstack-nova-xvpvncproxy.upstart b/openstack-nova-xvpvncproxy.upstart
new file mode 100644
index 0000000..a004b2a
--- /dev/null
+++ b/openstack-nova-xvpvncproxy.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova XVP VncProxy Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-xvpvncproxy --logfile /var/log/nova/xvpvncproxy.log" nova
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 725f4ca..3c7df51 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -13,6 +13,36 @@ Source0: https://launchpad.net/nova/havana/%{version}/+download/nova-%{
Source1: nova-dist.conf
Source6: nova.logrotate
+%if "%{dist}" == ".el6"
+Source10: openstack-nova-api.init
+Source100: openstack-nova-api.upstart
+Source11: openstack-nova-cert.init
+Source110: openstack-nova-cert.upstart
+Source12: openstack-nova-compute.init
+Source120: openstack-nova-compute.upstart
+Source13: openstack-nova-network.init
+Source130: openstack-nova-network.upstart
+Source14: openstack-nova-objectstore.init
+Source140: openstack-nova-objectstore.upstart
+Source15: openstack-nova-scheduler.init
+Source150: openstack-nova-scheduler.upstart
+Source16: openstack-nova-conductor.init
+Source160: openstack-nova-conductor.upstart
+Source18: openstack-nova-xvpvncproxy.init
+Source180: openstack-nova-xvpvncproxy.upstart
+Source19: openstack-nova-console.init
+Source190: openstack-nova-console.upstart
+Source24: openstack-nova-consoleauth.init
+Source240: openstack-nova-consoleauth.upstart
+Source25: openstack-nova-metadata-api.init
+Source250: openstack-nova-metadata-api.upstart
+Source26: openstack-nova-cells.init
+Source260: openstack-nova-cells.upstart
+Source27: openstack-nova-spicehtml5proxy.init
+Source270: openstack-nova-spicehtml5proxy.upstart
+Source28: openstack-nova-novncproxy.init
+Source280: openstack-nova-novncproxy.upstart
+%else
Source10: openstack-nova-api.service
Source11: openstack-nova-cert.service
Source12: openstack-nova-compute.service
@@ -21,17 +51,18 @@ Source14: openstack-nova-objectstore.service
Source15: openstack-nova-scheduler.service
Source18: openstack-nova-xvpvncproxy.service
Source19: openstack-nova-console.service
-Source20: openstack-nova-consoleauth.service
+Source24: openstack-nova-consoleauth.service
Source25: openstack-nova-metadata-api.service
Source26: openstack-nova-conductor.service
Source27: openstack-nova-cells.service
Source28: openstack-nova-spicehtml5proxy.service
Source29: openstack-nova-novncproxy.service
+%endif
+Source20: nova-sudoers
Source21: nova-polkit.pkla
Source23: nova-polkit.rules
Source22: nova-ifc-template
-Source24: nova-sudoers
Source30: openstack-nova-novncproxy.sysconfig
#
@@ -43,15 +74,30 @@ Patch0003: 0003-notify-calling-process-we-are-ready-to-serve.patch
Patch0004: 0004-Move-notification-point-to-a-better-place.patch
Patch0005: 0005-Add-RBAC-policy-for-ec2-API-security-groups-calls.patch
+
+%if "%{dist}" == ".el6"
+patch100: Use-updated-parallel-install-versions-of-epel-packag.patch
+%endif
+
BuildArch: noarch
BuildRequires: intltool
-BuildRequires: python-sphinx
BuildRequires: python-oslo-sphinx
BuildRequires: python-setuptools
BuildRequires: python-netaddr
BuildRequires: openstack-utils
BuildRequires: python-pbr
BuildRequires: python-d2to1
+%if 0%{?rhel} && 0%{?rhel} <= 6
+BuildRequires: python-sphinx10
+# These are required to build due to the requirements check added
+BuildRequires: python-paste-deploy1.5
+BuildRequires: python-routes1.12
+BuildRequires: python-sqlalchemy0.7
+BuildRequires: python-webob1.2
+BuildRequires: python-jinja2-26
+%else
+BuildRequires: python-sphinx
+%endif
Requires: openstack-nova-compute = %{version}-%{release}
Requires: openstack-nova-cert = %{version}-%{release}
@@ -82,9 +128,15 @@ Group: Applications/System
Requires: python-nova = %{version}-%{release}
Requires: python-keystoneclient
+%if 0%{?rhel} && 0%{?rhel} <= 6
+Requires(postun): initscripts
+Requires(preun): chkconfig
+Requires: python-setuptools
+%else
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
+%endif
Requires(pre): shadow-utils
%description common
@@ -111,6 +163,10 @@ Requires: iscsi-initiator-utils
Requires: iptables iptables-ipv6
Requires: ipmitool
Requires: vconfig
+%if 0%{?rhel} && 0%{?rhel} <= 6
+# tunctl is needed where `ip tuntap` is not available
+Requires: tunctl
+%endif
Requires: python-libguestfs
Requires: libvirt >= 0.9.6
Requires: libvirt-python
@@ -144,7 +200,12 @@ Requires: vconfig
Requires: radvd
Requires: bridge-utils
Requires: dnsmasq
+# dnsmasq-utils vailable from RDO for EL6
Requires: dnsmasq-utils
+%if 0%{?rhel} && 0%{?rhel} <= 6
+# tunctl is needed where `ip tuntap` is not available
+Requires: tunctl
+%endif
Requires: ebtables
%description network
@@ -291,7 +352,7 @@ through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
-This package contains the Nova Cells service providing additional
+This package contains the Nova Cells service providing additional
scaling and (geographic) distribution for compute services.
%package novncproxy
@@ -300,7 +361,7 @@ Group: Applications/System
Requires: openstack-nova-common = %{version}-%{release}
Requires: novnc
-Requires: python-websockify
+Requires: python-websockify
%description novncproxy
@@ -313,7 +374,7 @@ through users and projects. OpenStack Compute strives to be both
hardware and hypervisor agnostic, currently supporting a variety of
standard hardware configurations and seven major hypervisors.
-This package contains the Nova noVNC Proxy service that can proxy
+This package contains the Nova noVNC Proxy service that can proxy
VNC traffic over browser websockets connections.
%package -n python-nova
@@ -343,16 +404,9 @@ Requires: python-boto
Requires: python-cheetah
Requires: python-ldap
Requires: python-stevedore
-
Requires: python-memcached
-
-Requires: python-sqlalchemy
Requires: python-migrate
-Requires: python-paste-deploy
-Requires: python-routes
-Requires: python-webob
-
Requires: python-glanceclient >= 1:0
Requires: python-neutronclient
Requires: python-novaclient
@@ -360,7 +414,21 @@ Requires: python-oslo-config >= 1:1.2.0
Requires: python-pyasn1
Requires: python-six
Requires: python-babel
+
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+Requires: python-sqlalchemy0.7
+Requires: python-paste-deploy1.5
+Requires: python-routes1.12
+Requires: python-webob1.2
+Requires: python-jinja2-26
+%else
+Requires: python-sqlalchemy
+Requires: python-paste-deploy
+Requires: python-routes
+Requires: python-webob
Requires: python-jinja2
+%endif
%description -n python-nova
OpenStack Compute (codename Nova) is open source software designed to
@@ -374,15 +442,19 @@ This package contains the nova Python library.
Summary: Documentation for OpenStack Compute
Group: Documentation
+%if !0%{?rhel} || 0%{?rhel} >= 7
BuildRequires: systemd-units
+%endif
BuildRequires: graphviz
# Required to build module documents
BuildRequires: python-boto
BuildRequires: python-eventlet
+%if !0%{?rhel} || 0%{?rhel} >= 7
BuildRequires: python-routes
BuildRequires: python-sqlalchemy
BuildRequires: python-webob
+%endif
# while not strictly required, quiets the build down when building docs.
BuildRequires: python-migrate, python-iso8601
@@ -403,6 +475,10 @@ This package contains documentation files for nova.
%patch0004 -p1
%patch0005 -p1
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%patch -P100 -p1
+%endif
+
find . \( -name .gitignore -o -name .placeholder \) -delete
find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
@@ -411,7 +487,7 @@ sed -i '/setuptools_git/d' setup.py
sed -i s/REDHATNOVAVERSION/%{version}/ nova/version.py
sed -i s/REDHATNOVARELEASE/%{release}/ nova/version.py
-# Remove the requirements file so that pbr hooks don't add it
+# Remove the requirements file so that pbr hooks don't add it
# to distutils requiers_dist config
rm -rf {test-,}requirements.txt tools/{pip,test}-requires
@@ -482,7 +558,11 @@ export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
%if 0%{?with_doc}
+%if 0%{?rhel} && 0%{?rhel} <= 6
+SPHINX_DEBUG=1 sphinx-1.0-build -b html source build/html
+%else
SPHINX_DEBUG=1 sphinx-build -b html source build/html
+%endif
# Fix hidden-file-or-dir warnings
rm -fr build/html/.doctrees build/html/.buildinfo
%endif
@@ -490,7 +570,11 @@ rm -fr build/html/.doctrees build/html/.buildinfo
# Create dir link to avoid a sphinx-build exception
mkdir -p build/man/.doctrees/
ln -s . build/man/.doctrees/man
+%if 0%{?rhel} && 0%{?rhel} <= 6
+SPHINX_DEBUG=1 sphinx-1.0-build -b man -c source source/man build/man
+%else
SPHINX_DEBUG=1 sphinx-build -b man -c source source/man build/man
+%endif
mkdir -p %{buildroot}%{_mandir}/man1
install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
@@ -499,6 +583,7 @@ popd
# Setup directories
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/buckets
+install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/images
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/instances
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/keys
install -d -m 755 %{buildroot}%{_sharedstatedir}/nova/networks
@@ -525,12 +610,28 @@ install -p -D -m 640 etc/nova/policy.json %{buildroot}%{_sysconfdir}/nova/policy
# Install version info file
cat > %{buildroot}%{_sysconfdir}/nova/release <<EOF
[Nova]
-vendor = Fedora Project
+vendor = RDO Project
product = OpenStack Nova
package = %{release}
EOF
# Install initscripts for Nova services
+%if 0%{?rhel} && 0%{?rhel} <= 6
+install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-nova-api
+install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-nova-cert
+install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-nova-compute
+install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/openstack-nova-network
+install -p -D -m 755 %{SOURCE14} %{buildroot}%{_initrddir}/openstack-nova-objectstore
+install -p -D -m 755 %{SOURCE15} %{buildroot}%{_initrddir}/openstack-nova-scheduler
+install -p -D -m 755 %{SOURCE16} %{buildroot}%{_initrddir}/openstack-nova-conductor
+install -p -D -m 755 %{SOURCE18} %{buildroot}%{_initrddir}/openstack-nova-xvpvncproxy
+install -p -D -m 755 %{SOURCE19} %{buildroot}%{_initrddir}/openstack-nova-console
+install -p -D -m 755 %{SOURCE24} %{buildroot}%{_initrddir}/openstack-nova-consoleauth
+install -p -D -m 755 %{SOURCE25} %{buildroot}%{_initrddir}/openstack-nova-metadata-api
+install -p -D -m 755 %{SOURCE26} %{buildroot}%{_initrddir}/openstack-nova-cells
+install -p -D -m 755 %{SOURCE27} %{buildroot}%{_initrddir}/openstack-nova-spicehtml5proxy
+install -p -D -m 755 %{SOURCE28} %{buildroot}%{_initrddir}/openstack-nova-novncproxy
+%else
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_unitdir}/openstack-nova-api.service
install -p -D -m 755 %{SOURCE11} %{buildroot}%{_unitdir}/openstack-nova-cert.service
install -p -D -m 755 %{SOURCE12} %{buildroot}%{_unitdir}/openstack-nova-compute.service
@@ -539,15 +640,16 @@ install -p -D -m 755 %{SOURCE14} %{buildroot}%{_unitdir}/openstack-nova-objectst
install -p -D -m 755 %{SOURCE15} %{buildroot}%{_unitdir}/openstack-nova-scheduler.service
install -p -D -m 755 %{SOURCE18} %{buildroot}%{_unitdir}/openstack-nova-xvpvncproxy.service
install -p -D -m 755 %{SOURCE19} %{buildroot}%{_unitdir}/openstack-nova-console.service
-install -p -D -m 755 %{SOURCE20} %{buildroot}%{_unitdir}/openstack-nova-consoleauth.service
+install -p -D -m 755 %{SOURCE24} %{buildroot}%{_unitdir}/openstack-nova-consoleauth.service
install -p -D -m 755 %{SOURCE25} %{buildroot}%{_unitdir}/openstack-nova-metadata-api.service
install -p -D -m 755 %{SOURCE26} %{buildroot}%{_unitdir}/openstack-nova-conductor.service
install -p -D -m 755 %{SOURCE27} %{buildroot}%{_unitdir}/openstack-nova-cells.service
install -p -D -m 755 %{SOURCE28} %{buildroot}%{_unitdir}/openstack-nova-spicehtml5proxy.service
install -p -D -m 755 %{SOURCE29} %{buildroot}%{_unitdir}/openstack-nova-novncproxy.service
+%endif
# Install sudoers
-install -p -D -m 440 %{SOURCE24} %{buildroot}%{_sysconfdir}/sudoers.d/nova
+install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/nova
# Install logrotate
install -p -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-nova
@@ -559,11 +661,29 @@ install -d -m 755 %{buildroot}%{_localstatedir}/run/nova
install -p -D -m 644 nova/cloudpipe/client.ovpn.template %{buildroot}%{_datarootdir}/nova/client.ovpn.template
install -p -D -m 644 %{SOURCE22} %{buildroot}%{_datarootdir}/nova/interfaces.template
+%if 0%{?rhel} && 0%{?rhel} <= 6
+# Install upstart jobs examples
+install -p -m 644 %{SOURCE100} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE110} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE120} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE130} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE140} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE150} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE160} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE180} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE190} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE240} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE250} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE260} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE270} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE280} %{buildroot}%{_datadir}/nova/
+%endif
+
# Install rootwrap files in /usr/share/nova/rootwrap
mkdir -p %{buildroot}%{_datarootdir}/nova/rootwrap/
install -p -D -m 644 etc/nova/rootwrap.d/* %{buildroot}%{_datarootdir}/nova/rootwrap/
-# Older format. Remove when we no longer want to support Fedora 17 with master branch packages
+# Older format. Remove when we no longer want to support Fedora 17/EL6 with master branch packages
install -d -m 755 %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d
install -p -D -m 644 %{SOURCE21} %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/50-nova.pkla
# Newer format since Fedora 18
@@ -593,203 +713,329 @@ usermod -a -G qemu nova
exit 0
%post compute
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-compute
+%else
+%systemd_post
+%endif
+
%post network
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-network
+%else
+%systemd_post
+%endif
+
+%post conductor
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-conductor
+%else
+%systemd_post
+%endif
+
%post scheduler
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-scheduler
+%else
+%systemd_post
+%endif
+
%post cert
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-cert
+%else
+%systemd_post
+%endif
+
%post api
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-%post conductor
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+for svc in api metadata-api; do
+ /sbin/chkconfig --add openstack-nova-$svc
+done
+%else
+%systemd_post
+%endif
+
%post objectstore
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-objectstore
+%else
+%systemd_post
+%endif
+
%post console
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+for svc in console consoleauth xvpvncproxy; do
+ /sbin/chkconfig --add openstack-nova-$svc
+done
+%else
+%systemd_post
+%endif
%post cells
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%if 0%{?rhel} && 0%{?rhel} <= 6
+/sbin/chkconfig --add openstack-nova-cells
+%else
+%systemd_post
+%endif
+
%preun compute
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in compute; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-compute.service
+%endif
+
%preun network
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in network; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-network.service
+%endif
+
%preun scheduler
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in scheduler; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-scheduler.service
+%endif
+
%preun cert
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in cert; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-cert.service
+%endif
+
%preun api
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in api metadata-api; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-api.service
+%systemd_preun %{name}-metadata-api.service
+%endif
+
%preun objectstore
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in objectstore; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-objectstore.service
+%endif
+
%preun conductor
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in conductor; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-conductor.service
+%endif
+
%preun console
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in console consoleauth xvpvncproxy; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-console.service
+%systemd_preun %{name}-consoleauth.service
+%systemd_preun %{name}-xvpvncproxy.service
+%endif
+
%preun cells
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in cells; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-cells.service
+%endif
+
%preun novncproxy
+%if 0%{?rhel} && 0%{?rhel} <= 6
if [ $1 -eq 0 ] ; then
for svc in novncproxy; do
- /bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
- /bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-nova-${svc}
done
fi
+%else
+%systemd_preun %{name}-novncproxy.service
+%endif
+
%postun compute
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in compute; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-compute.service
+%endif
+
%postun network
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in network; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-network.service
+%endif
+
%postun scheduler
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in scheduler; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-scheduler.service
+%endif
+
%postun cert
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in cert; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-cert.service
+%endif
+
%postun api
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in api metadata-api; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-api.service
+%systemd_postun_with_restart %{name}-metadata-api.service
+%endif
+
%postun objectstore
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in objectstore; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-objectstore.service
+%endif
+
%postun conductor
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in conductor; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-conductor.service
+%endif
+
%postun console
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in console consoleauth xvpvncproxy; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-console.service
+%systemd_postun_with_restart %{name}-consoleauth.service
+%systemd_postun_with_restart %{name}-xvpvncproxy.service
+%endif
+
%postun cells
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in cells; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-cells.service
+%endif
+
%postun novncproxy
+%if 0%{?rhel} && 0%{?rhel} <= 6
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in novncproxy; do
- /bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
+ /sbin/service openstack-nova-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart %{name}-novncproxy.service
+%endif
%files
%doc LICENSE
@@ -818,12 +1064,14 @@ fi
%{_bindir}/nova-manage
%{_bindir}/nova-rootwrap
+%exclude %{_datarootdir}/nova/*.upstart
%{_datarootdir}/nova
%{_mandir}/man1/nova*.1.gz
%defattr(-, nova, nova, -)
%dir %{_sharedstatedir}/nova
%dir %{_sharedstatedir}/nova/buckets
+%dir %{_sharedstatedir}/nova/images
%dir %{_sharedstatedir}/nova/instances
%dir %{_sharedstatedir}/nova/keys
%dir %{_sharedstatedir}/nova/networks
@@ -833,22 +1081,42 @@ fi
%{_bindir}/nova-compute
%{_bindir}/nova-baremetal-deploy-helper
%{_bindir}/nova-baremetal-manage
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-compute
+%{_datarootdir}/nova/openstack-nova-compute.upstart
+%else
%{_unitdir}/openstack-nova-compute.service
+%endif
%{_datarootdir}/nova/rootwrap/compute.filters
%files network
%{_bindir}/nova-network
%{_bindir}/nova-dhcpbridge
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-network
+%{_datarootdir}/nova/openstack-nova-network.upstart
+%else
%{_unitdir}/openstack-nova-network.service
+%endif
%{_datarootdir}/nova/rootwrap/network.filters
%files scheduler
%{_bindir}/nova-scheduler
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-scheduler
+%{_datarootdir}/nova/openstack-nova-scheduler.upstart
+%else
%{_unitdir}/openstack-nova-scheduler.service
+%endif
%files cert
%{_bindir}/nova-cert
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-cert
+%{_datarootdir}/nova/openstack-nova-cert.upstart
+%else
%{_unitdir}/openstack-nova-cert.service
+%endif
%defattr(-, nova, nova, -)
%dir %{_sharedstatedir}/nova/CA/
%dir %{_sharedstatedir}/nova/CA/certs
@@ -868,32 +1136,66 @@ fi
%files api
%{_bindir}/nova-api*
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-*api
+%{_datarootdir}/nova/openstack-nova-*api.upstart
+%else
%{_unitdir}/openstack-nova-*api.service
+%endif
%{_datarootdir}/nova/rootwrap/api-metadata.filters
%files conductor
%{_bindir}/nova-conductor
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-conductor
+%{_datarootdir}/nova/openstack-nova-conductor.upstart
+%else
%{_unitdir}/openstack-nova-conductor.service
+%endif
%files objectstore
%{_bindir}/nova-objectstore
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-objectstore
+%{_datarootdir}/nova/openstack-nova-objectstore.upstart
+%else
%{_unitdir}/openstack-nova-objectstore.service
+%endif
%files console
%{_bindir}/nova-console*
%{_bindir}/nova-xvpvncproxy
%{_bindir}/nova-spicehtml5proxy
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-console*
+%{_datarootdir}/nova/openstack-nova-console*.upstart
+%{_initrddir}/openstack-nova-xvpvncproxy
+%{_datarootdir}/nova/openstack-nova-xvpvncproxy.upstart
+%{_initrddir}/openstack-nova-spicehtml5proxy*
+%{_datarootdir}/nova/openstack-nova-spicehtml5proxy.upstart
+%else
%{_unitdir}/openstack-nova-console*.service
%{_unitdir}/openstack-nova-xvpvncproxy.service
%{_unitdir}/openstack-nova-spicehtml5proxy.service
+%endif
%files cells
%{_bindir}/nova-cells
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-cells
+%{_datarootdir}/nova/openstack-nova-cells.upstart
+%else
%{_unitdir}/openstack-nova-cells.service
+%endif
%files novncproxy
%{_bindir}/nova-novncproxy
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{_initrddir}/openstack-nova-novncproxy
+%{_datarootdir}/nova/openstack-nova-novncproxy.upstart
+%else
%{_unitdir}/openstack-nova-novncproxy.service
+%endif
%config(noreplace) %{_sysconfdir}/sysconfig/openstack-nova-novncproxy
%files -n python-nova
@@ -981,7 +1283,7 @@ fi
- Remove Folsom release deprecated config options from nova-dist.conf
* Tue Aug 27 2013 Xavier Queralt <xqueralt at redhat.com> - 2013.2-0.12.b2
-- Add the second dhcpbridge-flagfile to nova-dist.conf
+- Add the second dhcpbridge-flagfile to nova-dist.conf
* Tue Aug 27 2013 Xavier Queralt <xqueralt at redhat.com> - 2013.2-0.11.b2
- Change the default config to poll for DB connection indefinitely
More information about the scm-commits
mailing list