mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 05:58:17 +00:00
watchfrr: Echo statements are blocking the execution of frr script
1) Certain echo statements present in the script before/after SSD process restart are causing the FRR script to hang. This is breaking the frr script functionality for start/stop/restart. Removed such echo statements. Tests: 1. Multiple start, stop, restart 2. Multiple restarts/kill of same process. Signed-off-by: Sri Mohana Singamsetty <msingamsetty@vmware.com>
This commit is contained in:
parent
eae8bbce91
commit
179b8a0bde
10
tools/frr.in
10
tools/frr.in
@ -127,6 +127,7 @@ start()
|
|||||||
echo -n " $1"
|
echo -n " $1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
${SSD} \
|
${SSD} \
|
||||||
--start \
|
--start \
|
||||||
--pidfile=`pidfile $1` \
|
--pidfile=`pidfile $1` \
|
||||||
@ -148,7 +149,6 @@ start()
|
|||||||
-- \
|
-- \
|
||||||
`eval echo "$""$1""_options"` -n "$2"
|
`eval echo "$""$1""_options"` -n "$2"
|
||||||
else
|
else
|
||||||
echo -n " $1"
|
|
||||||
if ! check_daemon $1; then
|
if ! check_daemon $1; then
|
||||||
echo -n " (binary does not exist)"
|
echo -n " (binary does not exist)"
|
||||||
return;
|
return;
|
||||||
@ -210,7 +210,6 @@ stop()
|
|||||||
# Now we have to wait until $DAEMON has _really_ stopped.
|
# Now we have to wait until $DAEMON has _really_ stopped.
|
||||||
#
|
#
|
||||||
if test -n "$PID" && kill -0 $PID 2>/dev/null; then
|
if test -n "$PID" && kill -0 $PID 2>/dev/null; then
|
||||||
echo -n " (waiting) ."
|
|
||||||
cnt=0
|
cnt=0
|
||||||
while kill -0 $PID 2>/dev/null; do
|
while kill -0 $PID 2>/dev/null; do
|
||||||
cnt=`expr $cnt + 1`
|
cnt=`expr $cnt + 1`
|
||||||
@ -220,10 +219,8 @@ stop()
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
echo -n "."
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
echo -n " $inst"
|
|
||||||
rm -f `pidfile $inst`
|
rm -f `pidfile $inst`
|
||||||
rm -f `vtyfile $inst`
|
rm -f `vtyfile $inst`
|
||||||
|
|
||||||
@ -305,7 +302,6 @@ start_watchfrr()
|
|||||||
|
|
||||||
# Start if at least one daemon is activated.
|
# Start if at least one daemon is activated.
|
||||||
if [ $found_one -eq 1 ]; then
|
if [ $found_one -eq 1 ]; then
|
||||||
echo -n "Starting Frr monitor daemon:"
|
|
||||||
start watchfrr
|
start watchfrr
|
||||||
echo "."
|
echo "."
|
||||||
fi
|
fi
|
||||||
@ -408,8 +404,6 @@ start_prio()
|
|||||||
wanted_prio=$1
|
wanted_prio=$1
|
||||||
daemon_list=${daemon:-$DAEMONS}
|
daemon_list=${daemon:-$DAEMONS}
|
||||||
|
|
||||||
echo -n "Starting Frr daemons (prio:$wanted_prio):"
|
|
||||||
|
|
||||||
for prio_i in `seq 1 $wanted_prio`; do
|
for prio_i in `seq 1 $wanted_prio`; do
|
||||||
for daemon_name in $daemon_list; do
|
for daemon_name in $daemon_list; do
|
||||||
eval daemon_prio=\$${daemon_name}
|
eval daemon_prio=\$${daemon_name}
|
||||||
@ -447,7 +441,6 @@ start_prio()
|
|||||||
eval "file_list_suffix="$V_PATH"/"$daemon_name-*""
|
eval "file_list_suffix="$V_PATH"/"$daemon_name-*""
|
||||||
for pidfile in $file_list_suffix.pid; do
|
for pidfile in $file_list_suffix.pid; do
|
||||||
${SSD} --stop --quiet --oknodo --pidfile "$pidfile"
|
${SSD} --stop --quiet --oknodo --pidfile "$pidfile"
|
||||||
echo -n "."
|
|
||||||
rm -rf "$pidfile"
|
rm -rf "$pidfile"
|
||||||
done
|
done
|
||||||
for vtyfile in $file_list_suffix.vty; do
|
for vtyfile in $file_list_suffix.vty; do
|
||||||
@ -459,7 +452,6 @@ start_prio()
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo "."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check_status()
|
check_status()
|
||||||
|
Loading…
Reference in New Issue
Block a user