Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Juno:Staging
openstack-neutron
openstack-neutron.init
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openstack-neutron.init of Package openstack-neutron
#! /bin/sh ### BEGIN INIT INFO # Provides: neutron-server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Should-Start: mysql postgresql rabbitmq-server # Should-Stop: mysql postgresql rabbitmq-server # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Short-Description: neutron-server # Description: Provides the Neutron networking service ### END INIT INFO NEUTRON_LOGFILE="/var/log/neutron/neutron-server.log" NEUTRON_SYSCONFIG=/etc/sysconfig/neutron NEUTRON_CONF=/etc/neutron/neutron.conf test -r $NEUTRON_SYSCONFIG || exit 6 . $NEUTRON_SYSCONFIG CONF_ARGS="--config-file /etc/neutron/neutron.conf" for i in $NEUTRON_PLUGIN_CONF; do CONF_ARGS="$CONF_ARGS --config-file $i" done USER="neutron" DAEMON=/usr/bin/neutron-server DAEMON_ARGS="--log-file $NEUTRON_LOGFILE $CONF_ARGS" DAEMON_DIR=/var/run START_TIMEOUT="90" export TMPDIR=/var/lib/neutron/tmp if [ ! -x ${DAEMON} ] ; then exit 0 fi . /etc/rc.status neutron_server_running () { # Check the response code of the "List API versions" call. # If it's 200, we consider neutron-server is properly running. http_code=$( curl \ --silent --write-out %{http_code} --output /dev/null \ ${insecure} -X GET ${protocol}://${bind_host}:${bind_port} ) rc=$? if [ $rc -ne 0 ] || [ $http_code -ne 200 ]; then return 1 fi return 0 } wait_for_neutron_api () { if ! bind_host=`crudini --get $NEUTRON_CONF DEFAULT bind_host`; then # Defaults to 0.0.0.0, so we can use localhost bind_host=localhost fi if ! bind_port=`crudini --get $NEUTRON_CONF DEFAULT bind_port`; then bind_port=9696 fi protocol="http" insecure="" if [ `crudini --get $NEUTRON_CONF DEFAULT use_ssl|tr '[:upper:]' '[:lower:]'` == "true" ]; then protocol="https" insecure="--insecure" fi start_time=`date +%s` neutron_server_running ret=$? while [ $((`date +%s` - start_time)) -lt $START_TIMEOUT ] && [ $ret -ne 0 ]; do sleep 2 neutron_server_running ret=$? done return $ret } case "$1" in start) echo -n "Checking for DB Migrations" su $USER -s /bin/sh -c "/usr/bin/neutron-db-manage $CONF_ARGS upgrade head" rc_status -v echo -n "Starting neutron server" startproc -t ${STARTUP_TIMEOUT:-5} -q -s -u $USER $DAEMON $DAEMON_ARGS ret=$? if [ $ret = 0 ]; then # Ensure start-up is synchronous, i.e. blocking until neutron # really is ready, otherwise services which depend on it (e.g. # neutron-ha-tool) could fail unexpectedly. # https://bugzilla.suse.com/show_bug.cgi?id=965886 wait_for_neutron_api ret=$? fi ( exit $ret ) # pass the right exit code to rc_status rc_status -v ;; stop) echo -n "Stopping neutron server" killproc $DAEMON rc_status -v ;; restart|force-reload) $0 stop sleep 1 $0 start ;; reload) ;; status) echo -n "Checking status of neutron server" /sbin/checkproc $DAEMON rc_status -v ;; *) echo $"Usage: $0 {start|stop|restart|force-reload|status}" exit 2 ;; esac exit $?
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor