What is Rolling Kernel Switch?
During the SAP kernel upgrade with multiple application servers, we need to:
Stop all the application servers including PAS.
Switch the kernel executables
Restart the application instance.
This traditional approach has a major disadvantage as ‘unwanted downtime is required during kernel switch’.
To minimize this downtime, RKS (Rolling Kernel Switch) procedure was introduced.
Description of the RKS Procedure
To keep any adverse effects on business operations to a minimum when importing a new kernel version, instances are restarted one after the other. This means that during the RKS procedure, at least one application server instance is always available for business operations. The order in which individual instances are restarted enables you to import a new kernel version without system downtime. Details of the RKS procedure are described below.
The order in which instances are restarted is as below:
ERS (Enqueue Replication Server) is first restarted.
ASCS instance is started next.
Application server instances are restarted next in sequence (n, n+1,n+2, and so on).
As a last step, the instance defined last with its start service is started with a new kernel version.
As of 7.4x releases, an automatic RKS procedure is provided.
For 7.2x kernel releases, a manual procedure exists.
Please refer SNOTE: 953653 for manual procedure on release 7.2x.
Prerequisites for Rolling Kernel Switch procedure:
To enable the RKS procedure, the Enqueue server and message server must be located in separate instances.
This instance host must not contain any application server (ABAP SAP Central Services, ASCS )As of 7.4x version, the RKS procedure does not support any DUAL stack or JAVA stack systems.
Avoid long-running background jobs when RKS is scheduled.
Use a logical spool server instead of an application server which can be defined in SPAD to avoid any print failure during this activity.
Use local IGS services as this service might get stopped/restarted.
If we are using update server groups, we should check if each group is RKS compatible.
We can verify this by checking if the UPD work process exists for all/ at least 2 application servers in the group.VMC must be active in at least two AS ABAP instances or in none.
RFC’s must be configured with load balancing, if the single host is used, chances are to get they will fail.
Backup DIR_CT_RUN in which we want to import a new kernel patch.
Download relevant SAPEXE.SAR and SAPEXE<DB>.SAR archives and extract them in DIR_CT_RUN (central executable directory) using SAPCAR. (Refer SNOTE:19466).
Source and target version kernels must be RKS compatible.
It can be checked by using the below command or via SM51 release notes info:
disp+work -v
The compatibility level can be displayed from the context menu of the menu option Version Info in SAP MMC or with the command:
sapcontrol -nr <NR> -function GetVersionInfo.
Profile Parameter Settings In Context of RKS
The rolling kernel switch (RKS) procedure (rolling kernel switch) can be configured using various profile parameters. These profile parameters are listed and described below.
The RKS procedure can be configured using these profile parameters:
Parameter | Default Value | Details |
---|---|---|
lg/rks_strategy | unmodified | Describes how load balancing is performed during the RKS procedure. unmodified:New logons are distributed across instances that still have to be restarted as well as instances that have already been restarted. Prefer_restarted:The preferred option is to forward new logons to instances that have already been restarted. |
rdisp/server_startup/max_time | 1H | Specifies the maximum length of time the server startup procedure can last for while the application server instance is restarting. If this value is exceeded, the server startup procdure is terminated. |
rdisp/server_startup/info_file | $(DIR_DATA)$(DIR_SEP)$(FN_STARTINFO) | stores additional information during the server startup procedure. Do not change the file name |
rdisp/server_startup/run_proc | YES | Specifies whether the server startup procedure is to be run while an ABAP application server instance is starting up |
rdisp/server_startup/user | DDIC | Specifies the ABAP user with which the server startup procedure is run. |
The server startup procedure should be run while an instance is starting up, but it is not mandatory for starting the instance. We recommend you only change the values of profile parameters for the server startup procedure after consulting SAP.
Value of Profile Parameter:
DIR_CT_RUN = $(DIR_EXE_ROOT)$(DIR_SEP)$(OS_UNICODE)$(DIR_SEP)linuxx86_64 -> /usr/sap/OZ2/SYS/exe/uc/linuxx86_64
lg/rks_strategy = unmodified
10.0.1.132 oz2ascs - ASCS00
10.0.1.133 oz2ha01
10.0.1.134 oz2ha02
10.0.1.135 oz2ers - ERS10
10.0.1.136 oz2appdb - D01,D02
/usr/sap/OZ2/SYS/exe/uc link to /sapmnt/OZ2/exe/uc
/sapmnt - NFS share mounted to all nodes
/usr/sap/OZ2/SYS/exe/uc/linuxx86_64 oz2adm:sapsys 755
Starting RKS
Before the RKS procedure is started, the system administrator must manually check the RKS prerequisites in the system configuration.
Download relevant SAPEXE.SAR and SAPEXE<DB>.SAR archives and extract them in DIR_CT_RUN (central executable directory) using SAPCAR.
You can start the RKS procedure with various tools:
Starting RKS in SAP MMC
Starting RKS with the Command Line
Starting RKS from SAP Landscape Virtualization Management (LVM)
Starting RKS with the Command Line
Start the RKS procedure by entering the following command:
sapcontrol -nr <NR> -function UpdateSystem <waittimeout sec> <softtimeout sec>
Note that the value in start wait timeout must be larger than the value of profile parameter rdisp/server_startup/max_time:
If the operation terminates with a warning, you can force the RKS procedure. Enter the following command: sapcontrol -nr <NR> -function UpdateSystem <waittimeout sec> <softtimeout sec> 1
Monitoring the RKS Procedure
Once the RKS procedure has been started, you should monitor its progress. Various tools are available to display the current status of the RKS procedure:
SAP MMC
System overview / transaction SM51
Overview of users / transaction SM04
You can call up the same information with the following command:
sapcontrol -nr <NR> -function GetSystemUpdateList
/sapmnt/OZ2/exe/uc/linuxx86_64/sapcontrol -nr 01 -function GetSystemUpdateList
sapcontrol -nr <NR> -function GetVersionInfo
sapcontrol -nr <NR> -function UpdateSystem
Add Comment