Resource cleanup activities - SAP HANA on AWS

Resource cleanup activities

Clean up the failed actions using following command:

[root@prihana ~]# pcs resource cleanup SAPHana_HDB_00 --node prihana
[root@prihana ~]#pcs status Thu Nov 12 10:45:14 2020 Cluster name: rhelhanaha Stack: corosync Current DC: sechana (version 1.1.19-8.el7_6.5-c3c624ea3d) - partition with quorum Last updated: Thu Nov 12 10:45:14 2020 Last change: Thu Nov 12 10:45:06 2020 by root via crm_attribute on sechana 2 nodes configured 6 resources configured Online: [ prihana sechana ] Full list of resources: clusterfence (stonith:fence_aws): Started prihana Clone Set: SAPHanaTopology_HDB_00-clone [SAPHanaTopology_HDB_00] Started: [ prihana sechana ] Master/Slave Set: SAPHana_HDB_00-master [SAPHana_HDB_00] Masters: [ sechana ] Stopped: [ prihana ] hana-oip (ocf::heartbeat:aws-vpc-move-ip): Started sechana Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled

Manual migration of resources from one node to another node (as shown in the preceding section) will create constraints in pcs configuration “pcs config show”.

root@prihana ~]# pcs config show Cluster Name: rhelhanaha Corosync Nodes: prihana sechana Pacemaker Nodes: prihana sechana Resources: Clone: SAPHanaTopology_HDB_00-clone Meta Attrs: clone-max=2 clone-node-max=1 interleave=true Resource: SAPHanaTopology_HDB_00 (class=ocf provider=heartbeat type=SAPHanaTopology) Attributes: InstanceNumber=00 SID=HDB Operations: methods interval=0s timeout=5 (SAPHanaTopology_HDB_00-methods-interval-0s) monitor interval=10 timeout=600 (SAPHanaTopology_HDB_00-monitor-interval-10) reload interval=0s timeout=5 (SAPHanaTopology_HDB_00-reload-interval-0s) start interval=0s timeout=600 (SAPHanaTopology_HDB_00-start-interval-0s) stop interval=0s timeout=300 (SAPHanaTopology_HDB_00-stop-interval-0s) Master: SAPHana_HDB_00-master Meta Attrs: clone-max=2 clone-node-max=1 interleave=true notify=true Resource: SAPHana_HDB_00 (class=ocf provider=heartbeat type=SAPHana) Attributes: AUTOMATED_REGISTER=true DUPLICATE_PRIMARY_TIMEOUT=7200 InstanceNumber=00 PREFER_SITE_TAKEOVER=true SID=HDB Operations: demote interval=0s timeout=3600 (SAPHana_HDB_00-demote-interval-0s) methods interval=0s timeout=5 (SAPHana_HDB_00-methods-interval-0s) monitor interval=61 role=Slave timeout=700 (SAPHana_HDB_00-monitor-interval-61) monitor interval=59 role=Master timeout=700 (SAPHana_HDB_00-monitor-interval-59) promote interval=0s timeout=3600 (SAPHana_HDB_00-promote-interval-0s) reload interval=0s timeout=5 (SAPHana_HDB_00-reload-interval-0s) start interval=0s timeout=3600 (SAPHana_HDB_00-start-interval-0s) stop interval=0s timeout=3600 (SAPHana_HDB_00-stop-interval-0s) Resource: hana-oip (class=ocf provider=heartbeat type=aws-vpc-move-ip) Attributes: interface=eth0 ip=192.168.1.99 routing_table=rtb-0027679b7a9eff404 Operations: monitor interval=60s timeout=30s (hana-oip-monitor-interval-60s) start interval=0s timeout=180s (hana-oip-start-interval-0s) stop interval=0s timeout=180s (hana-oip-stop-interval-0s) Stonith Devices: Resource: clusterfence (class=stonith type=fence_aws) Attributes: pcmk_host_map=prihana:i-01b7ceb0d8799eccf;sechana:i-05b924af2f83ffe0b pcmk_reboot_retries=4 pcmk_reboot_timeout=480 power_timeout=240 region=us-east-1 Operations: monitor interval=60s (clusterfence-monitor-interval-60s) Fencing Levels: Location Constraints: Ordering Constraints: start SAPHanaTopology_HDB_00-clone then start SAPHana_HDB_00-master (kind:Mandatory) (non-symmetrical) Colocation Constraints: hana-oip with SAPHana_HDB_00-master (score:2000) (rsc-role:Started) (with-rsc-role:Master) Ticket Constraints: Alerts: No alerts defined Resources Defaults: resource-stickiness: 1000 migration-threshold: 5000 Operations Defaults: No defaults set Cluster Properties: cluster-infrastructure: corosync cluster-name: rhelhanaha dc-version: 1.1.19-8.el7_6.5-c3c624ea3d have-watchdog: false last-lrm-refresh: 1605053571 Node Attributes: prihana: hana_hdb_op_mode=logreplay hana_hdb_remoteHost=sechana hana_hdb_site=HDBPrimary hana_hdb_srmode=syncmem hana_hdb_vhost=prihana lpa_hdb_lpt=1605196167 sechana: hana_hdb_op_mode=logreplay hana_hdb_remoteHost=prihana hana_hdb_site=HDBSecondary hana_hdb_srmode=syncmem hana_hdb_vhost=sechana lpa_hdb_lpt=30 Quorum: Options:

These location constraints need to be cleaned up before you perform any further cluster actions with the following command:

[root@prihana ~]# pcs constraint list --full Location Constraints: Ordering Constraints: start SAPHanaTopology_HDB_00-clone then start SAPHana_HDB_00-master (kind:Mandatory) (non-symmetrical) (id:order-SAPHanaTopology_HDB_00- clone-SAPHana_HDB_00-master-mandatory) Colocation Constraints: hana-oip with SAPHana_HDB_00-master (score:2000) (rsc-role:Started) (with-rsc-role:Master) (id:colocation-hana-oip-SAPHana_HDB_00-master-2000) Ticket Constraints: [root@prihana ~]# root@prihana ~]# pcs constraint remove colocation-hana-oip-SAPHana_HDB_00-master-2000 [root@prihana ~]# pcs constraint list --full Location Constraints: Ordering Constraints: start SAPHanaTopology_HDB_00-clone then start SAPHana_HDB_00-master (kind:Mandatory) (non-symmetrical) (id:order-SAPHanaTopology_HDB_00-clone- SAPHana_HDB_00-master-mandatory) Colocation Constraints: Ticket Constraints: [root@prihana ~]#