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

cover command err rc >= 124 like in scale-up #124

Merged
merged 1 commit into from
Jun 6, 2024
Merged
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
10 changes: 5 additions & 5 deletions SAPHana/ra/SAPHanaTopology
Original file line number Diff line number Diff line change
Expand Up @@ -1024,12 +1024,12 @@ function sht_monitor_clone() {
setRole=true
hanaANSWER=$(HANA_CALL --timeout $HANA_CALL_TIMEOUT --cmd "python landscapeHostConfiguration.py --sapcontrol=1" 2>/dev/null); hanalrc="$?"
# landscape timeout - retry command
if [ "$hanalrc" -eq 124 ]; then
super_ocf_log warn "RA: HANA_CALL timed out after $HANA_CALL_TIMEOUT seconds running command 'landscapeHostConfiguration.py --sapcontrol=1'. Retrying..."
if [ "$hanalrc" -ge 124 ]; then
super_ocf_log warn "RA: HANA_CALL failed with rc=${hanalrc} while running command 'landscapeHostConfiguration.py --sapcontrol=1'. Retrying..."
hanaANSWER=$(HANA_CALL --timeout "$HANA_CALL_TIMEOUT" --cmd "python landscapeHostConfiguration.py --sapcontrol=1" 2>/dev/null); hanalrc="$?"
# if the second try again run into a timeout, log an error and do not set hanarole but keep the previous settings.
# if the second try again run into an error, log it as an error and do not set hanarole but keep the previous settings.
if [ "$hanalrc" -ge 124 ]; then
super_ocf_log err "RA: HANA_CALL Operation timeout after $HANA_CALL_TIMEOUT seconds running command 'landscapeHostConfiguration.py --sapcontrol=1'."
super_ocf_log err "RA: HANA_CALL failed with rc=${hanalrc} while running command 'landscapeHostConfiguration.py --sapcontrol=1'. Roles will not be updated."
setRole=false
fi
fi
Expand All @@ -1054,7 +1054,7 @@ function sht_monitor_clone() {
# TODO PRIO2: COULD/SHOULD WE LIMIT THE SET OF THE LSS/SRR ATTRIBUTE TO ONLY THE_MASTER nodes?
# ignore timeout (124) and "ignore" (5) as return code from the landscapeHostConfiguration call
super_ocf_log info "DEC: site=$site; hanalrc=$hanalrc"
if [ -n "$site" -a "$hanalrc" != "124" ]; then
if [ -n "$site" -a "$hanalrc" -lt "124" ]; then
ATTR=(${ATTR_NAME_HANA_LSS[@]}); ATTR[0]="${ATTR[0]}_$site"
set_hana_attribute "X" "$hanalrc" "${ATTR[@]}"
super_ocf_log info "DEC: set_hana_attribute X $hanalrc ${ATTR[0]}"
Expand Down