Skip to content

Commit

Permalink
new CHECK - Azure azcopy version
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPitterling committed Dec 30, 2024
1 parent 7497a25 commit 1f33338
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
68 changes: 68 additions & 0 deletions scripts/lib/check/9105_tools_azcopy_azure.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env bash

function check_9105_tools_azcopy_azure {

logTrace "<${BASH_SOURCE[0]}:${FUNCNAME[*]}>"

local -i _retval=99

# https://github.com/Azure/azure-storage-azcopy/releases

# MODIFICATION SECTION>>
local -r sapnote='2015553,2000000'
local -r _goodversion='10.27.1'
# MODIFICATION SECTION<<

# 2015553 - SAP on Microsoft Azure: Support prerequisites
# 2000000 - FAQ: SAP HANA Performance Optimization

# PRECONDITIONS
if ! LIB_FUNC_IS_CLOUD_MICROSOFT; then

logCheckSkipped 'Not running on Microsoft Azure. Skipping' "<${FUNCNAME[0]}>"
_retval=3

elif ! rpm -q --quiet azcopy ; then

logCheckSkipped 'Azure tool azcopy not installed. Skipping' "<${FUNCNAME[0]}>"
_retval=3

fi

# CHECK
if [[ ${_retval} -eq 99 ]]; then

local normalized_goodversion
local normalized_fullversion

local _fullversion
_fullversion=$(rpm -q --queryformat "%{VERSION}.%{RELEASE}" azcopy)

logCheckWarning 'azcopy is known for using large portions of the Linux page cache. It has been observed that'
logCheckWarning 'this has resulted in standstills and logshipping timeouts of the SAP HANA database.'

#normalize good version
LIB_FUNC_NORMALIZE_RPM "${_goodversion}"
normalized_goodversion="${LIB_FUNC_NORMALIZE_RPM_RETURN}"

#normalize full version
LIB_FUNC_NORMALIZE_RPM "${_fullversion}"
normalized_fullversion="${LIB_FUNC_NORMALIZE_RPM_RETURN}"

# returns 0 if equal, 1 if first is higher, 2 if second is higher
LIB_FUNC_COMPARE_VERSIONS "${normalized_fullversion}" "${normalized_goodversion}"

if [[ $? -ne 2 ]]; then
logCheckOk 'Azure tool azcopy version seems to be ok' "(SAP Note ${sapnote:-}) (is: ${_fullversion})"
_retval=0
else
logCheckWarning 'Azure tool azcopy should be updated' "(SAP Note ${sapnote:-}) (is: ${_fullversion}, should be: >=${_goodversion})"
_retval=1
fi

fi

logDebug "<${BASH_SOURCE[0]}:${FUNCNAME[0]}> # RC=${_retval}"
return ${_retval}

}
1 change: 1 addition & 0 deletions scripts/lib/checkset/RHELonX64only.checkset
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@
8704_sap_hana_backint_gcp
9100_monitor_agent_omsagent_azure
9101_monitor_agent_dependency_azure
9105_tools_azcopy_azure
9200_monitor_agent_sapdataprovider_amazon
9400_monitor_agent_sap_gcp
1 change: 1 addition & 0 deletions scripts/lib/checkset/SLESonX64only.checkset
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,6 @@
8704_sap_hana_backint_gcp
9100_monitor_agent_omsagent_azure
9101_monitor_agent_dependency_azure
9105_tools_azcopy_azure
9200_monitor_agent_sapdataprovider_amazon
9400_monitor_agent_sap_gcp

0 comments on commit 1f33338

Please sign in to comment.