Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medium: oracle: oracledb.sh always executes a forced stop #434

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion rgmanager/src/resources/oracledb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# Lon Hohberger <lhh at redhat.com>
# Michael Moon <Michael dot Moon at oracle.com>
# Ryan McCabe <rmccabe at redhat.com>
# Roberto Polli <roberto.polli at babel.it>
#
# NOTES:
#
Expand Down Expand Up @@ -388,7 +389,9 @@ exit_idle()
declare -i n=0

ocf_log debug "Waiting for Oracle processes for $ORACLE_SID to terminate..."
while ps ax | grep $ORACLE_HOME | grep "ora_.*_${ORACLE_SID}" | grep -v grep | awk '{print $1}'; do
# awk always return 0 and the following while will cycle even if no processes are hanging around
# You must set the exit status appending END {!$1;} to mimic grep behavior
while ps ax | grep $ORACLE_HOME | grep "ora_.*_${ORACLE_SID}" | grep -v grep | awk '{print $1} END {exit !$1;}'; do
if [ $n -ge 90 ]; then
ocf_log debug "Timed out while waiting for Oracle processes for $ORACLE_SID to terminate"
force_cleanup
Expand Down