diff -up sap-hana-ha-87a5781/srHook/global.ini_susChkSrv.patch100 sap-hana-ha-87a5781/srHook/global.ini_susChkSrv --- sap-hana-ha-87a5781/srHook/global.ini_susChkSrv.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/global.ini_susChkSrv 2024-08-19 12:30:39.985351798 +0200 @@ -1,10 +1,10 @@ -[ha_dr_provider_suschksrv] -provider = susChkSrv -path = /usr/share/SAPHanaSR-angi/ +[ha_dr_provider_chksrv] +provider = ChkSrv +path = /usr/share/sap-hana-ha/ execution_order = 3 action_on_lost = stop stop_timeout = 25 [trace] -ha_dr_suschksrv = info +ha_dr_chksrv = info diff -up sap-hana-ha-87a5781/srHook/global.ini_susCostOpt.patch100 sap-hana-ha-87a5781/srHook/global.ini_susCostOpt --- sap-hana-ha-87a5781/srHook/global.ini_susCostOpt.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/global.ini_susCostOpt 2024-08-19 12:30:39.986351800 +0200 @@ -1,6 +1,6 @@ [ha_dr_provider_susCostOpt] provider = susCostOpt -path = /usr/share/SAPHanaSR-angi +path = /usr/share/sap-hana-ha userKey = costoptkey execution_order = 1 diff -up sap-hana-ha-87a5781/srHook/global.ini_susHanaSR.patch100 sap-hana-ha-87a5781/srHook/global.ini_susHanaSR --- sap-hana-ha-87a5781/srHook/global.ini_susHanaSR.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/global.ini_susHanaSR 2024-08-19 12:30:39.986351800 +0200 @@ -1,7 +1,7 @@ -[ha_dr_provider_susHanaSR] -provider = susHanaSR -path = /usr/share/SAPHanaSR-angi +[ha_dr_provider_HanaSR] +provider = HanaSR +path = /usr/share/sap-hana-ha execution_order = 1 [trace] -ha_dr_sushanasr = info +ha_dr_hanasr = info diff -up sap-hana-ha-87a5781/srHook/global.ini_susTkOver.patch100 sap-hana-ha-87a5781/srHook/global.ini_susTkOver --- sap-hana-ha-87a5781/srHook/global.ini_susTkOver.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/global.ini_susTkOver 2024-08-19 12:30:39.987351802 +0200 @@ -1,9 +1,9 @@ -[ha_dr_provider_susTkOver] -provider = susTkOver -path = /usr/share/SAPHanaSR-angi -sustkover_timeout = 30 +[ha_dr_provider_TkOver] +provider = TkOver +path = /usr/share/sap-hana-ha +tkover_timeout = 30 execution_order = 1 [trace] -ha_dr_susTkOver = info +ha_dr_TkOver = info diff -up sap-hana-ha-87a5781/srHook/susChkSrv.py.patch100 sap-hana-ha-87a5781/srHook/susChkSrv.py --- sap-hana-ha-87a5781/srHook/susChkSrv.py.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/susChkSrv.py 2024-08-19 12:30:39.989351806 +0200 @@ -1,15 +1,15 @@ # pylint: disable=invalid-name,fixme """ -# susChkSrv.py +# ChkSrv.py # Author: Fabian Herschel, June 2022 # License: GNU General Public License (GPL) # Copyright: (c) 2022 SUSE LLC -susChkSrv needs SAP HANA 2.0 SPS4 (2.00.040.00) as minimum version +ChkSrv needs SAP HANA 2.0 SPS4 (2.00.040.00) as minimum version To use this HA/DR hook provide please add the following lines (or similar) to your global.ini: - [ha_dr_provider_suschksrv] - provider = susChkSrv + [ha_dr_provider_chksrv] + provider = ChkSrv path = /usr/share/SAPHanaSR execution_order = 2 action_on_lost = kill | stop | ignore | fence (attr is currently not implemented) @@ -17,7 +17,7 @@ To use this HA/DR hook provide please ad # timeout = timeout-in-seconds (currently not implemented) [trace] - ha_dr_suschksrv = info + ha_dr_chksrv = info TODO: Do we also want this hook to jump-in, if a secondary indexserver is crashing? Maybe to be selected by a parameter. @@ -47,7 +47,7 @@ except ImportError as e: print(f"Module HADRBase not found - running outside of SAP HANA? - {e}") # hook section -SRHookName = "susChkSrv" +SRHookName = "ChkSrv" SRHookVersion = "1.001.1" # parameter section TIME_OUT_DFLT = 20 @@ -62,13 +62,13 @@ def getEpisode(): try: - class susChkSrv(HADRBase): + class ChkSrv(HADRBase): """ class for HADR hook script to handle service changed status events """ def logTimestamp(self, method, episode, outputMessage): """ write message to log file with timestamp """ traceFilepath = os.path.join(os.environ['SAP_RETRIEVAL_PATH'], 'trace', - 'nameserver_suschksrv.trc') + 'nameserver_chksrv.trc') try: with open(traceFilepath, "a", encoding="UTF-8") as saphanasr_multitarget_file: currentTimeStr = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f ') @@ -87,7 +87,7 @@ try: self.logTimestamp(method, episode, "init called") # read settings from global.ini - # read sustkover_timeout + # read tkover_timeout if self.config.hasKey("stop_timeout"): self.stop_timeout = self.config.get("stop_timeout") else: @@ -124,8 +124,8 @@ try: """ tell something about the HADR hook script """ method = "about" self.tracer.info(f"{self.__class__.__name__}.{method}() version {SRHookVersion}") - return {"provider_company": "SUSE", - "provider_name": "susChkSrv", # class name + return {"provider_company": "Red Hat", + "provider_name": "ChkSrv", # class name "provider_description": "Process service status changed events", "provider_version": "1.0"} diff -up sap-hana-ha-87a5781/srHook/susCostOpt.py.patch100 sap-hana-ha-87a5781/srHook/susCostOpt.py --- sap-hana-ha-87a5781/srHook/susCostOpt.py.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/susCostOpt.py 2024-08-19 12:30:39.989351806 +0200 @@ -94,7 +94,7 @@ class susCostOpt(HADRBase): self.tracer.info(f"{self.__class__.__name__}.{method}() version {FHSRHOOKVERSION}") desc = ("postTakeover script to reset parameters to default or set parameters as" " defined in global.ini.") - return {"provider_company": "SUSE", + return {"provider_company": "Red Hat", "provider_name": "susCostOpt", # class name "provider_description": desc, "provider_version": "1.0"} diff -up sap-hana-ha-87a5781/srHook/susHanaSrMultiTarget.py.to-be-integrated.patch100 sap-hana-ha-87a5781/srHook/susHanaSrMultiTarget.py.to-be-integrated --- sap-hana-ha-87a5781/srHook/susHanaSrMultiTarget.py.to-be-integrated.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/susHanaSrMultiTarget.py.to-be-integrated 2024-08-19 12:30:39.992351812 +0200 @@ -100,7 +100,7 @@ try: def about(self): method = "about" self.tracer.info("{0}.{1}() version {2}".format(self.__class__.__name__, method, fhSRHookVersion)) - return {"provider_company": "SUSE", + return {"provider_company": "Red Hat", "provider_name": "SAPHanaSrMultiTarget", # class name "provider_description": "Inform Cluster about SR state", "provider_version": "1.0"} diff -up sap-hana-ha-87a5781/srHook/susHanaSR.py.patch100 sap-hana-ha-87a5781/srHook/susHanaSR.py --- sap-hana-ha-87a5781/srHook/susHanaSR.py.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/susHanaSR.py 2024-08-19 12:30:39.990351808 +0200 @@ -17,9 +17,9 @@ import os # To use this HA/DR hook provide please add the following lines to your global.ini: -# [ha_dr_provider_susHanaSR] -# provider = susHanaSR -# path = /usr/share/SAPHanaSR-angi +# [ha_dr_provider_HanaSR] +# provider = HanaSR +# path = /usr/share/sap-hana-ha # execution_order = 1 # # [trace] @@ -31,8 +31,8 @@ FH_SR_HOOK_VERSION = "1.001.1" try: # remark: case style is given by external configuration # pylint: disable-next=C0103 - class susHanaSR(HADRBase): - """ class susHanaSR to handle HADR events for srConnectionChanged """ + class HanaSR(HADRBase): + """ class HanaSR to handle HADR events for srConnectionChanged """ def __init__(self, *args, **kwargs): """ constructor - delegate construction to base class """ @@ -44,8 +44,8 @@ try: def about(self): """ tell about the HADR hook """ - return {"provider_company": "SUSE", - "provider_name": "susHanaSR", # class name + return {"provider_company": "Red Hat", + "provider_name": "HanaSR", # class name "provider_description": "Inform Cluster about SR state", "provider_version": "1.0"} @@ -53,7 +53,7 @@ try: def srConnectionChanged(self, ParamDict, **kwargs): """ process srConnectionChanged event """ method = "srConnectionChanged" - self.tracer.info(f"susHanaSR {FH_SR_HOOK_VERSION}" + self.tracer.info(f"HanaSR {FH_SR_HOOK_VERSION}" f" {self.__class__.__name__}.srConnectionChanged" f" method called with Dict={ParamDict}") my_system_status = ParamDict["system_status"] @@ -62,7 +62,7 @@ try: my_in_sync = ParamDict["is_in_sync"] my_reason = ParamDict["reason"] my_site = ParamDict["siteName"] - self.tracer.info(f"susHanaSR {self.__class__.__name__}.srConnectionChanged" + self.tracer.info(f"HanaSR {self.__class__.__name__}.srConnectionChanged" f" system_status={my_system_status} SID={self.my_sid}" f" in_sync={my_in_sync} reason={my_reason}") if my_system_status == 15: @@ -70,7 +70,7 @@ try: else: if my_in_sync: # ignoring the SFAIL, because we are still in sync - self.tracer.info(f"susHanaSR {FH_SR_HOOK_VERSION}" + self.tracer.info(f"HanaSR {FH_SR_HOOK_VERSION}" f" {self.__class__.__name__}.srConnectionChanged ignoring bad" f" SR status because of is_in_sync=True (reason={my_reason})") my_srs = "" diff -up sap-hana-ha-87a5781/srHook/susTkOver.py.patch100 sap-hana-ha-87a5781/srHook/susTkOver.py --- sap-hana-ha-87a5781/srHook/susTkOver.py.patch100 2024-07-08 14:39:04.000000000 +0200 +++ sap-hana-ha-87a5781/srHook/susTkOver.py 2024-08-19 12:30:39.994351816 +0200 @@ -5,17 +5,17 @@ # License: GNU General Public License (GPL) # Copyright: (c) 2022 SUSE LLC -susTkOver needs SAP HANA 2.0 SPS4 (2.00.040.00) as minimum version +TkOver needs SAP HANA 2.0 SPS4 (2.00.040.00) as minimum version To use this HA/DR hook provide please add the following lines (or similar) to your global.ini: - [ha_dr_provider_susTkOver] - provider = susTkOver + [ha_dr_provider_TkOver] + provider = TkOver path = /usr/share/SAPHanaSR - sustkover_timeout = 30 + tkover_timeout = 30 execution_order = 1 [trace] - ha_dr_sustkover = info + ha_dr_tkover = info Please make sure to use our supported maintenance procedure together with this HA/DR hook as described in the man page SAPHanaSR_maitenance_examples(7) - @@ -41,7 +41,7 @@ RC_TOB = 50277 try: # pylint: disable-next=invalid-name - class susTkOver(HADRBase): + class TkOver(HADRBase): """ class for HADR hook to handle preTakeover events """ def __init__(self, *args, **kwargs): @@ -50,9 +50,9 @@ try: method = "init" # read settings from global.ini - # read sustkover_timeout - if self.config.hasKey("sustkover_timeout"): - self.time_out = self.config.get("sustkover_timeout") + # read tkover_timeout + if self.config.hasKey("tkover_timeout"): + self.time_out = self.config.get("tkover_timeout") else: self.time_out = TIME_OUT_DFLT self.tracer.info(f"{self.__class__.__name__}.{method}()" @@ -62,8 +62,8 @@ try: """ tell something about the HADR hook script """ method = "about" self.tracer.info(f"{self.__class__.__name__}.{method}() version {FHSRHOOKVERSION}") - return {"provider_company": "SUSE", - "provider_name": "susTkOver", # class name + return {"provider_company": "Red Hat", + "provider_name": "TkOver", # class name "provider_description": "Block manual takeover, if cluster is active", "provider_version": "1.0"}