In a scalable/high available environment, there is no guarantee of service startup order and availability of all services during startup (some services could start or be visible at a later stage in the boot process). In some cases: mysql starts on node X neutron-server starts on node Y but in other cases: neutron-server starts on node A -> will fail because mysql is not started yet mysql is scheduled to start on node B All services in openstack are capable in one way or another to survive this scenario. neutron-server runtime should continue attempting to connect to mysql even if at startup is not immediately available, and at the first connection perform db-check.
Created attachment 859563 [details] extra init script I need the file in attachment to be shipped as part of a neutron package that is installed together with neutron-server and any of the agent. From a spec file perspective it must be installed in %{initdir}, chkconfig --add and off by default. I can take care of everything else from pacemaker.
Unit test for QE: mysql is running on configured host: [root@rhos4-neutron1 ~]# /etc/init.d/neutron-db-check start [root@rhos4-neutron1 ~]# echo $? 0 [root@rhos4-neutron1 ~]# /etc/init.d/neutron-db-check start neutron-db-check: ERROR: unable to find version information for the neutron database. Check your logs for additional information. [root@rhos4-neutron1 ~]# echo $? 1 at first it appears to duplicate information and checks from neutron-server init script, but this shorter version allows pacemaker to decouple check and server. pacemaker is then configured to loop specifically on db-check and perform the correct action on "start failure".
Spec file testing should: [root@rhos4-neutron1 ~]# rpm -q -l openstack-neutron |grep neutron-db-check /usr/bin/neutron-db-check /etc/init.d/neutron-db-check after installing the package: [root@rhos4-neutron1 ~]# chkconfig --list|grep neutron-db neutron-db-check 0:off 1:off 2:off 3:off 4:off 5:off 6:off
Created attachment 859625 [details] Proposed patch for adding spec file
Created attachment 879894 [details] DB check patch to spec file (that goes together with the neutron-watch-agent)
Created attachment 879910 [details] extra init script
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-0516.html