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 875311 Details for
Bug 1076994
Full /var prevents pid file being written, but daemon starts anyway
[?]
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]
Check if daemon running before starting
0001-Check-if-daemon-is-running-before-starting.patch (text/plain), 9.32 KB, created by
Ian Wienand
on 2014-03-17 03:16:31 UTC
(
hide
)
Description:
Check if daemon running before starting
Filename:
MIME Type:
Creator:
Ian Wienand
Created:
2014-03-17 03:16:31 UTC
Size:
9.32 KB
patch
obsolete
>From e3450be9f1a360a591145aa6ca26d95804d0a862 Mon Sep 17 00:00:00 2001 >From: Ian Wienand <iwienand@redhat.com> >Date: Mon, 17 Mar 2014 12:20:23 +1100 >Subject: [PATCH] Check if daemon is running before starting > >In some circumstances, such as a full /var, the daemon can already be >running but not correctly protected by a pid file. Multiple agents >can result in very difficult to diagnose race conditions, so we >protect the startup with an extra check for already running agents. > >Change-Id: I6fcfc6e0a29e9fd23363f8d35e43f86c67de04b9 >Resolves: rhbz#1076994 >--- > neutron-dhcp-agent.init | 7 +++++++ > neutron-l3-agent.init | 7 +++++++ > neutron-lbaas-agent.init | 7 +++++++ > neutron-linuxbridge-agent.init | 7 +++++++ > neutron-metadata-agent.init | 7 +++++++ > neutron-metering-agent.init | 7 +++++++ > neutron-mlnx-agent.init | 7 +++++++ > neutron-nec-agent.init | 7 +++++++ > neutron-openvswitch-agent.init | 7 +++++++ > neutron-ryu-agent.init | 7 +++++++ > neutron-server.init | 7 +++++++ > neutron-vpn-agent.init | 7 +++++++ > 12 files changed, 84 insertions(+) > >diff --git a/neutron-dhcp-agent.init b/neutron-dhcp-agent.init >index ef93ac2..932a01d 100644 >--- a/neutron-dhcp-agent.init >+++ b/neutron-dhcp-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-l3-agent.init b/neutron-l3-agent.init >index d07f5a4..64269ac 100644 >--- a/neutron-l3-agent.init >+++ b/neutron-l3-agent.init >@@ -24,11 +24,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-lbaas-agent.init b/neutron-lbaas-agent.init >index 31ac1ce..b91916e 100644 >--- a/neutron-lbaas-agent.init >+++ b/neutron-lbaas-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-linuxbridge-agent.init b/neutron-linuxbridge-agent.init >index 141a975..91c6a99 100644 >--- a/neutron-linuxbridge-agent.init >+++ b/neutron-linuxbridge-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-metadata-agent.init b/neutron-metadata-agent.init >index 4a0384d..4da1882 100644 >--- a/neutron-metadata-agent.init >+++ b/neutron-metadata-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-metering-agent.init b/neutron-metering-agent.init >index 8c7ab4f..0a8181e 100644 >--- a/neutron-metering-agent.init >+++ b/neutron-metering-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-mlnx-agent.init b/neutron-mlnx-agent.init >index c19f33b..093f518 100644 >--- a/neutron-mlnx-agent.init >+++ b/neutron-mlnx-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-nec-agent.init b/neutron-nec-agent.init >index ff1b877..ebfcd9b 100644 >--- a/neutron-nec-agent.init >+++ b/neutron-nec-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-openvswitch-agent.init b/neutron-openvswitch-agent.init >index 14e53a9..a7e34eb 100644 >--- a/neutron-openvswitch-agent.init >+++ b/neutron-openvswitch-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-ryu-agent.init b/neutron-ryu-agent.init >index 89dcace..6e67a8f 100644 >--- a/neutron-ryu-agent.init >+++ b/neutron-ryu-agent.init >@@ -23,11 +23,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-server.init b/neutron-server.init >index 7b0f3e6..1b00f19 100644 >--- a/neutron-server.init >+++ b/neutron-server.init >@@ -24,6 +24,12 @@ logfile="/var/log/$prog/server.log" > > lockfile=/var/lock/subsys/$prog-server > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > >@@ -33,6 +39,7 @@ start() { > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec ${configs[@]/#/--config-file } --log-file $logfile &>/dev/null & echo \$! > $pidfile" > retval=$? >diff --git a/neutron-vpn-agent.init b/neutron-vpn-agent.init >index 6140ece..d718222 100644 >--- a/neutron-vpn-agent.init >+++ b/neutron-vpn-agent.init >@@ -24,11 +24,18 @@ pidfile="/var/run/$proj/$prog.pid" > > lockfile=/var/lock/subsys/$prog > >+_check_running() { >+ if ps -aef | grep -v grep | grep -q "$exec"; then >+ exit 7 >+ fi >+} >+ > start() { > [ -x $exec ] || exit 5 > for config in ${configs[@]}; do > [ -f $config ] || exit 6 > done >+ _check_running > echo -n $"Starting $prog: " > daemon --user neutron --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log ${configs[@]/#/--config-file } &>/dev/null & echo \$! > $pidfile" > retval=$? >-- >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 1076994
: 875311