Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

SAP Host Agent : Auto Upgrade

This page last changed on Feb 28, 2011 by D039028.

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>

in the SAPHostAgent profile (host_profile). Additionally the directory location containing the newest SAPHostAgent version could be changed using the profile value
DIR_NEW=<path to a directory>

within the SAPHostAgent profile. Once the profile is changed a restart of SAPHostAgent is necessary.

Advanced Configuration
Avoid incomplete upgrade.
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. The complete procedure is: Create the .upgrading file in $DIR_NEW Extract SAPHOSTAGENT.SAR in $DIR_NEW Remove .upgrading from $DIR_NEW An Example:
ldcibke:root> ldcibke:root> ldcibke:root> ldcibke:root> cd /usr/sap/hostctrl/new/ touch .upgrading SAPCAR -xvf SAPHOSTAGENT.SAR rm .upgrading

Use delayed Auto-upgrade to avoid network bottlenecks


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>

Document generated by Confluence on Feb 28, 2011 11:02

Page 1

where Value1 represents the number of minutes after an auto-upgrade is checked, and Value2 the maximum value of minutes after which the autoupgrade is started. The real upgrade delay value in minutes is given by
delay = Value1 + randomValue *Value2

Value2 is optional and could be omitted. 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.

Document generated by Confluence on Feb 28, 2011 11:02

Page 2

You might also like