Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 859625 Details for
Bug 1060709
neutron-server start should survive lack of db availability
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch for adding spec file
0001-Add-neutron-db-check-init-script-for-HA-purposes.patch (text/plain), 4.52 KB, created by
Jakub Libosvar
on 2014-02-05 12:24:39 UTC
(
hide
)
Description:
Proposed patch for adding spec file
Filename:
MIME Type:
Creator:
Jakub Libosvar
Created:
2014-02-05 12:24:39 UTC
Size:
4.52 KB
patch
obsolete
>From e2f6c3458d83c547dff9863c781a270ad0882c5b Mon Sep 17 00:00:00 2001 >From: Jakub Libosvar <libosvar@redhat.com> >Date: Wed, 5 Feb 2014 13:22:16 +0100 >Subject: [PATCH] Add neutron-db-check init script for HA purposes > >Because database could be inaccessible during HA deployment there is >need to check for DB availability. Added init script neutron-db-check >implements database checking. HA mechanism can wait for DB using this >init script. > >Change-Id: Ic8742de5ad2923ba2230ff398b6decaf54ac36e8 >--- > neutron-db-check.init | 31 +++++++++++++++++++++++++++++++ > openstack-neutron.spec | 22 +++++++++++++++++----- > 2 files changed, 48 insertions(+), 5 deletions(-) > create mode 100644 neutron-db-check.init > >diff --git a/neutron-db-check.init b/neutron-db-check.init >new file mode 100644 >index 0000000..8791cd3 >--- /dev/null >+++ b/neutron-db-check.init >@@ -0,0 +1,31 @@ >+#!/bin/bash >+# >+# neutron OpenStack Software Defined Networking Service >+# >+# chkconfig: - 98 02 >+# description: neutron provides an API to \ >+# * request and configure virtual networks >+### END INIT INFO >+ >+. /etc/rc.d/init.d/functions >+ >+prog=neutron >+dbcheck="/usr/bin/$prog-db-check" >+ >+case "$1" in >+ start) >+ [ -x $dbcheck ] && { >+ # random minimal sleep to avoid overload on >+ # >+ sleep 1 >+ $dbcheck >+ exit $? >+ } >+ ;; >+ stop|restart|reload|force-reload|status|condrestart|try-restart) >+ ;; >+ *) >+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" >+ exit 2 >+esac >+exit 0 >diff --git a/openstack-neutron.spec b/openstack-neutron.spec >index 5f5cd7d..bf6ba3a 100644 >--- a/openstack-neutron.spec >+++ b/openstack-neutron.spec >@@ -2,7 +2,7 @@ > > Name: openstack-neutron > Version: 2013.2.1 >-Release: 6%{?dist} >+Release: 7%{?dist} > Provides: openstack-quantum = %{version}-%{release} > Obsoletes: openstack-quantum < 2013.2-0.3.b3 > >@@ -46,6 +46,7 @@ Source31: neutron-vpn-agent.init > Source41: neutron-vpn-agent.upstart > Source32: neutron-metering-agent.init > Source42: neutron-metering-agent.upstart >+Source33: neutron-db-check.init > > Source50: neutron-db-check > Source51: openstack-neutron.sysconfig >@@ -499,6 +500,7 @@ install -p -D -m 755 %{SOURCE19} %{buildroot}%{_initrddir}/neutron-lbaas-agent > install -p -D -m 755 %{SOURCE30} %{buildroot}%{_initrddir}/neutron-mlnx-agent > install -p -D -m 755 %{SOURCE31} %{buildroot}%{_initrddir}/neutron-vpn-agent > install -p -D -m 755 %{SOURCE32} %{buildroot}%{_initrddir}/neutron-metering-agent >+install -p -D -m 755 %{SOURCE33} %{buildroot}%{_initrddir}/neutron-db-check > > # Setup directories > install -d -m 755 %{buildroot}%{_datadir}/neutron >@@ -554,7 +556,9 @@ exit 0 > %post > if [ $1 -eq 1 ] ; then > # Initial installation >- /sbin/chkconfig --add neutron-server >+ for service in server db-check; do >+ /sbin/chkconfig --add neutron-$service >+ done > for agent in dhcp l3 metadata lbaas; do > /sbin/chkconfig --add neutron-$agent-agent > done >@@ -563,8 +567,10 @@ fi > %preun > if [ $1 -eq 0 ] ; then > # Package removal, not upgrade >- /sbin/service neutron-server stop >/dev/null 2>&1 >- /sbin/chkconfig --del neutron-server >+ for service in server db-check; do >+ /sbin/service neutron-$service stop >/dev/null 2>&1 >+ /sbin/chkconfig --del neutron-$service >+ done > for agent in dhcp l3 metadata lbaas; do > /sbin/service neutron-$agent-agent stop >/dev/null 2>&1 > /sbin/chkconfig --del neutron-$agent-agent >@@ -574,7 +580,9 @@ fi > %postun > if [ $1 -ge 1 ] ; then > # Package upgrade, not uninstall >- /sbin/service neutron-server condrestart >/dev/null 2>&1 || : >+ for service in server db-check; do >+ /sbin/service neutron-$service condrestart >/dev/null 2>&1 || : >+ done > for agent in dhcp l3 metadata lbaas; do > /sbin/service neutron-$agent-agent condrestart >/dev/null 2>&1 || : > done >@@ -808,6 +816,7 @@ fi > %{_initrddir}/neutron-metadata-agent > %{_initrddir}/neutron-ovs-cleanup > %{_initrddir}/neutron-lbaas-agent >+%{_initrddir}/neutron-db-check > %dir %{_datadir}/neutron > %{_datadir}/neutron/neutron-server.upstart > %{_datadir}/neutron/neutron-dhcp-agent.upstart >@@ -1024,6 +1033,9 @@ fi > > > %changelog >+* Wed Feb 05 2014 Jakub Libosvar <libosvar@redhat.com> - 2013.2.1-7 >+- Add neutron-db-check init script for HA purposes, bz#1060709 >+ > * Mon Jan 27 2014 Jakub Libosvar <jlibosva@redhat.com> - 2013.2.1-6 > - Comment added for quantum rootwrap paths for filters, bz#1025570 > - Skip drop of service tables if they don't exist, bz#1056890 >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1060709
:
859563
|
859625
|
879894
|
879910