Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1060709 - neutron-server start should survive lack of db availability
neutron-server start should survive lack of db availability
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron (Show other bugs)
4.0
Unspecified Unspecified
urgent Severity urgent
: z4
: 4.0
Assigned To: Jakub Libosvar
Roey Dekel
: ZStream
Depends On:
Blocks: RHEL-OSP_Neutron_HA
  Show dependency treegraph
 
Reported: 2014-02-03 07:40 EST by Fabio Massimo Di Nitto
Modified: 2016-04-26 11:17 EDT (History)
8 users (show)

See Also:
Fixed In Version: openstack-neutron-2013.2.2-9.el6ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-29 16:23:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
extra init script (698 bytes, application/x-shellscript)
2014-02-05 05:16 EST, Fabio Massimo Di Nitto
no flags Details
Proposed patch for adding spec file (4.52 KB, patch)
2014-02-05 07:24 EST, Jakub Libosvar
no flags Details | Diff
DB check patch to spec file (that goes together with the neutron-watch-agent) (2.20 KB, patch)
2014-03-28 11:06 EDT, Miguel Angel Ajo
no flags Details | Diff
extra init script (918 bytes, application/x-shellscript)
2014-03-28 11:19 EDT, Miguel Angel Ajo
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0516 normal SHIPPED_LIVE Moderate: openstack-neutron security, bug fix, and enhancement update 2014-05-29 20:15:59 EDT

  None (edit)
Description Fabio Massimo Di Nitto 2014-02-03 07:40:47 EST
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.
Comment 1 Fabio Massimo Di Nitto 2014-02-05 05:16:52 EST
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.
Comment 2 Fabio Massimo Di Nitto 2014-02-05 05:19:40 EST
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".
Comment 3 Fabio Massimo Di Nitto 2014-02-05 05:21:44 EST
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
Comment 4 Jakub Libosvar 2014-02-05 07:24:39 EST
Created attachment 859625 [details]
Proposed patch for adding spec file
Comment 6 Miguel Angel Ajo 2014-03-28 11:06:50 EDT
Created attachment 879894 [details]
DB check patch to spec file (that goes together with the neutron-watch-agent)
Comment 7 Miguel Angel Ajo 2014-03-28 11:19:24 EDT
Created attachment 879910 [details]
extra init script
Comment 13 errata-xmlrpc 2014-05-29 16:23:43 EDT
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

Note You need to log in before you can comment on or make changes to this bug.