table of contents
SAPHanaSR-upgrade-to-angi-demo(8) | SAPHanaSR | SAPHanaSR-upgrade-to-angi-demo(8) |
NAME¶
SAPHanaSR-upgrade-to-angi-demo - How to upgrade from SAPHanaSR to SAPHanaSR-angi.
SYNOPSIS¶
SAPHanaSR-upgrade-to-angi-demo [ --help | --version |
--list | --check | --erase | --upgrade ]
SAPHanaSR-upgrade-to-angi-demo --run FUNCTION [ FUNCTION
[ ... ]]
DESCRIPTION¶
SAPHanaSR-upgrade-to-angi-demo demonstrates how to upgrade from SAPHanaSR to SAPHanaSR-angi. The script collects information from an Linux HA cluster with SAPHanaSR. Based on that data it suggests step by step the commands to upgrade the cluster. The running configuration is not changed. See also manual page SAPHanaSR_upgrade_to_angi(7).
SAPHanaSR-upgrade-to-angi-demo is shipped as technology preview.
OPTIONS¶
- --help
- show help.
- --version
- show version.
- --check
- do some basic checks on configuration and status of Linux cluster.
- --erase
- show demo for removing SAPHanaSR.
- --list
- list SAPHanaSR-upgrade-to-angi-demo functions.
- --run FUNCTION [ FUNCTION [ ... ]]
- run given function(s). Not all functions will work, once CIB attributes have been deleted.
- --upgrade
- show demo for upgrading from SAPHanaSR to SAPHanaSR-angi.
RETURN CODES¶
0 Successful program execution.
>0 Usage, syntax or execution errors.
EXAMPLES¶
* Copying the script to outside the package.
The script needs to be still available on both cluster nodes after the SAPHanaSR RPM has been removed. Needs to be done on all cluster nodes.
# chmod 755 /root/bin/SAPHanaSR-upgrade-to-angi-demo
# SAPHanaSR-upgrade-to-angi-demo --help
* Example for finding the HANA primary node.
awk -F/ '$3=="clone_state=\"PROMOTED\"" {print $2}'
# crm_mon -1r | grep "* Masters: \["
* Checking sane state of cluster.
This steps should be performed before doing anything with the cluster, and after something has been done. See also SAPHanaSR_upgrade_to_angi(7) and SAPHanaSR_maintenance_examples(7).
# crm_mon -1r
# crm configure show type:location | grep cli-
# SAPHanaSR-showAttr
* Checking pre-requisites for the upgrade.
The scripts should be run on the HANA primary node before the upgrade. It also could be run on the HANA secondary. Any error message should be investigated. The check covers several requirements for the upgrade, but not all. On the other hand, some of the pre-requisites are caused by limitations of the script SAPHanaSR-upgrade-to-angi-demo itself. Those might not be needed for doing the real upgrade manually. See also SAPHanaSR_upgrade_to_angi(7), cs_show_error_patterns(8) and cs_show_cluster_patterns(8).
* Demonstrating an upgrade.
HANA´s SID and instance number will be detected, as well as
the names of both cluster nodes. The names of cluster resources and
constraints will be derived from the CIB. Based on that information, command
sequences will be proposed for performing an upgrade:
- Collecting needed data.
- Backing up old CIB, sudoers file and global.ini.
- Setting HANA resource into maintenance mode.
- Removing old rules from sudoers file on both nodes.
- Removing old hook scripts from global.ini on both nodes.
- Removing old cluster resources and constraints from CIB.
- Removing old node attributes and SAPHanaSR properties from CIB.
- Removing old SAPHanaSR package.
- Adding new SAPHanaSR-angi package.
- Adding new rules to sudoers file on both nodes.
- Adding new hook scripts to global.ini on both nodes.
- Adding new cluster resources and constraints to CIB.
- Probing HANA resource status.
- Setting HANA resource back to managed.
The script needs to be copied to all cluster nodes upfront. It should be called on the HANA primary node. Before doing this, you should check and prepare pre-requisites, see example above. The proposed commands need to be checked. Sometimes adaptions are necessary. See also SAPHanaSR_upgrade_to_angi(7).
* Drafting a runbook for the manual upgrade.
The script should be used on the HANA primary node. Before doing this, you should check and prepare pre-requisites, see example above. The runbook draft is stored as file "SAPHanaSR-upgrade-draft.txt". This draft can be used for preparing details for the upgrade procedure. The proposed commands need to be checked. Sometimes adaptions are necessary. Of course the result needs to be checked finally as well. See also SAPHanaSR_upgrade_to_angi(7) and tee(1).
# less SAPHanaSR-upgrade-draft.txt
* Demonstrating removal of package SAPHanaSR and its configuration.
Removing the old SAPHanaSR without performing the complete upgrade manually might be useful, if installation and configuration of the new SAPHanaSR-angi should be done by deploymant automation tools.
HANA´s SID and instance number will be detected, as well as
the names of both cluster nodes. The names of cluster resources and
constraints will be derived from the CIB. Based on that information, command
sequences will be proposed for performing the removal of SAPHanaSR:
- Collecting needed data.
- Backing up old CIB, sudoers file and global.ini.
- Setting HANA resource into maintenance mode.
- Removing old rules from sudoers file on both nodes.
- Removing old hook scripts from global.ini on both nodes.
- Removing old cluster resources and constraints from CIB.
- Removing old node attributes and SAPHanaSR properties from CIB.
- Removing old SAPHanaSR package.
The script needs to be copied to all cluster nodes beforehand. It should be called on the HANA primary node. Before doing this, you should check and prepare pre-requisites, see example above. The proposed commands need to be checked. Sometimes adaptions are necessary. Of course the result needs to be checked finally as well. See also SAPHanaSR_upgrade_to_angi(7).
FILES¶
- /usr/share/SAPHanaSR-angi/samples/SAPHanaSR-upgrade-to-angi-demo
- unsupported script for demonstrating the procedure on a test cluster
- /etc/sudoers.d/SAPHanaSR
- recommended place for sudo permissions of HADR provider hook scripts
- /hana/shared/$SID/global/hdb/custom/config/global.ini
- on-disk representation of HANA global system configuration
- SAPHanaSR-upgrade-to-angi-demo.<timestamp>
- directory with backup of old configuration
REQUIREMENTS¶
* The initial configuration matches SUSE´s documented setup
of the SAPHanaSR scale-up performance-optimised scenario.
* Linux cluster, HANA and system replication are in sane state before the
upgrade. All cluster nodes are online.
* Package libxml2-tools is installed on both cluster nodes. Package
ClusterTools2 is recommended.
* SAPHanaSR-upgrade-to-angi-demo is copied into /root/bin/ and made executable
on both cluster nodes.
* SAPHanaSR-upgrade-to-angi-demo is executed on the HANA primary node.
* SAPHanaSR-upgrade-to-angi-demo should be run on test systems.
* A backup has been made for the cluster nodes.
* The commands suggested by SAPHanaSR-upgrade-to-angi-demo have been checked
before they will be applied.
* For further requirements see manual page SAPHanaSR_upgrade_to_angi(7).
BUGS¶
In case of any problem, please use your favourite SAP support process to open a request for the component BC-OP-LNX-SUSE. Please report any other feedback and suggestions to feedback@suse.com.
SEE ALSO¶
SAPHanaSR-angi(7) , SAPHanaSR(7) ,
ocf_suse_SAPHana(7) , ocf_suse_SAPHanaController(7) ,
SAPHanaSR.py(7) , susHanaSR.py(7) ,
SAPHanaSR_upgrade_to_angi(7) ,
SAPHanaSR_maintenance_examples(7) , SAPHanaSR-showAttr(8) ,
crm(8) , crm_mon(8) , crm_attribute(8) ,
cibadmin(8) , cs_wait_for_idle(8) ,
https://documentation.suse.com/sbp/sap/ ,
https://www.suse.com/c/tag/towardszerodowntime/
AUTHORS¶
A.Briel, F.Herschel, L.Pinne.
COPYRIGHT¶
(c) 2024 SUSE LLC
SAPHanaSR-upgrade-to-angi-demo comes with ABSOLUTELY NO WARRANTY.
For details see the GNU General Public License at
http://www.gnu.org/licenses/gpl.html
08 Mar 2024 |