Nova installation on Ubuntu 14.04

nova-cert and sometimes nova-scheduler does not start after reboot even though it is enabled as per nova-manage service list output (marked as XXX state):

Reason can be found in /var/log/nova/nova-cert.log

  • Root cause is that MySQL server is not ready.
  • MySQL is started using SysV script in /etc/init.d while Nova scripts are Upstart scripts in /etc/init/ dir
  • SysV and Upstart scripts are started asynchrounously

Solution:

In /etc/init/nova-cert.conf and /etc/init/nova-scheduler.conf add a line “start on mysql_started” and comment “start on runlevel” line

It means start a service when a custom event mysql_started is emitted.

As these nova-cert/scheduler depends on mysql to start properly add the following line in /etc/init.d/mysql as a list line of start option:

  • We don’t have to care about runlevel as it is covered by mysql init script
  • In this way we ensure that only after mysql starts then we start nova-cert and nova-scheduler
  • caveat: event should be emitted only we startup is successful so only in “ifs” telling that mysql started succcessfully, I added it as a list line in the “start” option

2 thoughts on “Nova installation on Ubuntu 14.04

  • Pingback: Heat installation on Ubuntu 14.04 | stackblog.net

  • July 1, 2015 at 11:11 am
    Permalink

    Hi, where i exactly must put the line : “initctl emit mysql_started” in “/etc/init.d/mysql” ?

    I tried as follow:

    # Start MariaDB!
    /usr/bin/mysqld_safe “${@:2}” 2>&1 >/dev/null | $ERR_LOGGER &
    initctl emit mysql_started
    # 6s was reported in #352070 to be too few when using ndbcluster

    without success…

    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *