Configuration: SAP Host Agent: Auto Upgrade
Configuration: SAP Host Agent: Auto Upgrade
The SAPHostAgent implements an auto upgrade capability. The running saphostexec regularly checks
a directory, by default $DIR_EXECUTABLE/../new, where it expects to find the newest executable of
SAPHostAgent (unpacked SAPHOSTAGENT.SAR).
Configuration
By default saphostexec performs this check every 5 minutes. This behaviour could be changed using the
profile value
hostexec/autoupgrade_delay=<minutes>
Additionally the directory location containing the newest SAPHostAgent version could be changed using
the profile value
DIR_NEW=<path to a directory>
Advanced Configuration
To avoid that saphostexec starts the upgrade procedure during the extraction of the .SAR (with the
consequence that only partially the newest version of the packages will be upgraded) you should create
an empty file called .upgrading in the directory $DIR_NEW.
An Example:
ldcibke:root> cd /usr/sap/hostctrl/new/
ldcibke:root> touch .upgrading
ldcibke:root> SAPCAR -xvf SAPHOSTAGENT.SAR
ldcibke:root> rm .upgrading
Within large installations, it normally makes sense to use one single share where the content of
SAPHOSTAGENT.SAR is regularly extracted. With this configuration the simultaneous upgrade of many
machines is very easy.
Unfortunately, if all machines start to access a single network share, it could result in a network
bottleneck, and in case of a restrictive firewall configuration, to a complete outage.
To avoid this kind of problem, for large landscapes you can additionally create a configuration file within
$DIR_NEW, containing the maximum time range of an upgrade. In this case the various saphostexec
processes of the different machines will plan the upgrade in a random way within a well defined time
window.
To configure this capability just create a file in $DIR_NEW called .delay
The format of the file is:
<Value1>random<Value2>
Some Examples:
500
Check the version of the file contained in $DIR_NEW every 500 minutes.
500random500
Check the version of the file contained in $DIR_NEW every 500 minutes. Once the version of the
SAPHostAgent contained within $DIR_NEW is newer the upgrade will be started within the next 500
minutes. The exact time where the upgrade is started is a random value between 1 and 500 minutes.