NOVA upstart jobs in Oneiric

Asked by Valeriy Belavin

I think that Nova upstart jobs are not correct. We use MySQL in our OpenStack setup and after each reboot some of nova services cannot start (nova-compute, nova-scheduler) because they tried to start before MySQL or RabbitMQ. I made the following changes:

[/etc/init/nova-*.conf, 'and started mysql and rabbitmq' - added]

start on (filesystem and net-device-up IFACE!=lo
    and started mysql
    and rabbitmq)

[/etc/init.d/rabbitmq-server, 'initctl emit --no-wait rabbitmq' - added]

...
start_rabbitmq () {
    status_rabbitmq quiet
    if [ $RETVAL = 0 ] ; then
        echo RabbitMQ is currently running
    else
        RETVAL=0
        set +e
        setsid sh -c "$DAEMON > ${INIT_LOG_DIR}/startup_log \
            2> ${INIT_LOG_DIR}/startup_err" &
        $CONTROL wait >/dev/null 2>&1
        RETVAL=$?
        set -e
        case "$RETVAL" in
            0)
                echo SUCCESS
                if [ -n "$LOCK_FILE" ] ; then
                    touch $LOCK_FILE
                fi
                echo "`date` - rabbitmq successfully started" >> ${INIT_LOG_DIR}/startup_log
                initctl emit --no-wait rabbitmq
                ;;
            *)
                echo FAILED - check ${INIT_LOG_DIR}/startup_\{log, _err\}
                echo "`date` - rabbitmq failed to start" >> ${INIT_LOG_DIR}/startup_err
                RETVAL=1
                ;;
        esac
    fi
}

...

Question information

Language:
English Edit question
Status:
Expired
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.