Skip to content

Commit

Permalink
Merge pull request #46 from angelabriel/master
Browse files Browse the repository at this point in the history
bsc#1189496 - add the new location of the saved_state files for saptune version3 to…
  • Loading branch information
angelabriel authored Aug 18, 2021
2 parents 87a9be7 + 8b16239 commit 8147586
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions lib/sapconf
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ start() {
# prevent a second start (apply of values) as this will override the
# saved old values of the parameters and reverting back to the
# original state will be impossible
[ -f /var/run/sapconf/active ] && log "sapconf already active, no second start supported" && exit 0
[ ! -d /var/run/sapconf ] && mkdir -p /var/run/sapconf
touch /var/run/sapconf/active
[ -f /run/sapconf/active ] && log "sapconf already active, no second start supported" && exit 0
[ ! -d /run/sapconf ] && mkdir -p /run/sapconf
touch /run/sapconf/active

log "--- Going to apply SAP tuning techniques"
# Common tuning techniques apply to HANA and NetWeaver
Expand Down Expand Up @@ -140,7 +140,7 @@ stop() {
log "--- "
log "--- stopping sapconf ...."
log "--- "
[ ! -f /var/run/sapconf/active ] && log "no active sapconf tuning, so nothing to revert" && exit 0
[ ! -f /run/sapconf/active ] && log "no active sapconf tuning, so nothing to revert" && exit 0

log "--- Going to revert SAP tuning parameters"

Expand Down Expand Up @@ -192,7 +192,7 @@ stop() {
fi
fi

rm -f /var/run/sapconf/active
rm -f /run/sapconf/active
log "--- Finished reverting SAP tuning parameters"
}

Expand Down
4 changes: 2 additions & 2 deletions lib/supportconfig-sapconf
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ display_systemd_status tuned
display_cmd tuned-adm list
display_file_stat /etc/tuned/active_profile
display_file /etc/tuned/active_profile
display_file_stat /var/run/tuned/
display_file_stat /run/tuned/
display_file_stat /usr/lib/tuned/sapconf/script.sh
display_log /var/log/tuned/tuned.log*

display_package_info sapconf
display_file /var/log/sapconf.log
display_file /etc/sysconfig/sapconf
display_systemd_status sapconf
display_file_stat /var/run/sapconf/active
display_file_stat /run/sapconf/active
display_file_stat /run/sapconf_act_profile
display_file /run/sapconf_act_profile
display_file_stat /var/lib/sapconf/last_profile
Expand Down
4 changes: 2 additions & 2 deletions lib/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ chk_active_saptune() {
txt="is active"
fi
fi
if [[ $(ls -A /var/lib/saptune/saved_state 2>/dev/null) ]]; then
if [[ $(ls -A /var/lib/saptune/saved_state 2>/dev/null) || $(ls -A /run/saptune/saved_state 2>/dev/null) ]]; then
used=true
if [ -n "$txt" ]; then
txt=$txt" and has applied notes/solutions"
Expand All @@ -467,7 +467,7 @@ chk_active_saptune() {
fi
if $enabled || $active || $used; then
log "ATTENTION: saptune $txt, so refuse any action"
rm -f /var/run/sapconf/active
rm -f /run/sapconf/active
return 1
fi
return 0
Expand Down

0 comments on commit 8147586

Please sign in to comment.