Skip to content

Commit

Permalink
Merge pull request #39 from angelabriel/master
Browse files Browse the repository at this point in the history
srHook SAPHanaSR ScaleUp - log empty site names (bsc#1173581)
  • Loading branch information
angelabriel authored Jul 14, 2020
2 parents d1dde99 + 36e015c commit ad5dd19
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
11 changes: 11 additions & 0 deletions SAPHanaSR.changes_12
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jul 2 11:27:34 UTC 2020 - [email protected]

- Version bump to 0.154.1
- log empty site names, but do not generate bad formatted cluster
attribute name
(bsc#1173581)
- fix documentation of some parameter defaults
- adjust start/stop/promote/monitor action timeouts to match
official recommendations

-------------------------------------------------------------------
Thu Nov 21 12:50:07 UTC 2019 - [email protected]

Expand Down
11 changes: 11 additions & 0 deletions SAPHanaSR.changes_15
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jul 2 11:27:34 UTC 2020 - [email protected]

- Version bump to 0.154.1
- log empty site names, but do not generate bad formatted cluster
attribute name
(bsc#1173581)
- fix documentation of some parameter defaults
- adjust start/stop/promote/monitor action timeouts to match
official recommendations

-------------------------------------------------------------------
Thu Nov 21 12:50:07 UTC 2019 - [email protected]

Expand Down
4 changes: 2 additions & 2 deletions SAPHanaSR.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Copyright (c) 2013-2014 SUSE Linux Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014-2016 SUSE Linux GmbH, Nuernberg, Germany.
# Copyright (c) 2017-2019 SUSE LLC.
# Copyright (c) 2017-2020 SUSE LLC.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -21,7 +21,7 @@ License: GPL-2.0
Group: Productivity/Clustering/HA
AutoReqProv: on
Summary: Resource agents to control the HANA database in system replication setup
Version: 0.154.0
Version: 0.154.1
Release: 0
Url: http://scn.sap.com/community/hana-in-memory/blog/2014/04/04/fail-safe-operation-of-sap-hana-suse-extends-its-high-availability-solution

Expand Down
11 changes: 7 additions & 4 deletions srHook/SAPHanaSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[trace]
ha_dr_saphanasr = info
"""
fhSRHookVersion = "0.161.0"
fhSRHookVersion = "0.162.0"


class SAPHanaSR(HADRBase):
Expand Down Expand Up @@ -92,19 +92,22 @@ def srConnectionChanged(self, ParamDict, **kwargs):
myInSync = ParamDict["is_in_sync"]
myReason = ParamDict["reason"]
mySite = ParamDict["siteName"]
if (mySystemStatus == 15):
if mySystemStatus == 15:
mySRS = "SOK"
else:
if (myInSync):
if myInSync:
# ignoring the SFAIL, because we are still in sync
self.tracer.info("SAPHanaSR (%s) %s.srConnectionChanged ignoring bad SR status because of is_in_sync=True (reason=%s)" % (fhSRHookVersion, self.__class__.__name__, myReason))
mySRS = ""
else:
mySRS = "SFAIL"
if (mySRS == ""):
if mySRS == "":
self.tracer.info("SAPHanaSR (%s) 001" % (self.__class__.__name__))
myMSG = "### Ignoring bad SR status because of is_in_sync=True ###"
self.tracer.info("SAPHanaSR (%s) 002" % (self.__class__.__name__))
elif mySite == "":
myMSG = "### Ignoring bad SR status because of empty site name in call params ###"
self.tracer.info("SAPHanaSR (%s) was called with empty site name. Ignoring call." % (self.__class__.__name__))
else:
myCMD = "sudo /usr/sbin/crm_attribute -n hana_%s_site_srHook_%s -v %s -t crm_config -s SAPHanaSR" % (mysid, mySite, mySRS)
rc = os.system(myCMD)
Expand Down

0 comments on commit ad5dd19

Please sign in to comment.