Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package saphanabootstrap-formula for
openSUSE:Factory checked in at 2021-06-09 21:53:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/saphanabootstrap-formula (Old)
and /work/SRC/openSUSE:Factory/.saphanabootstrap-formula.new.32437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "saphanabootstrap-formula"
Wed Jun 9 21:53:00 2021 rev:37 rq:898803 version:0.7.1+git.1623245207.6711362
Changes:
--------
---
/work/SRC/openSUSE:Factory/saphanabootstrap-formula/saphanabootstrap-formula.changes
2021-05-10 15:42:02.296931788 +0200
+++
/work/SRC/openSUSE:Factory/.saphanabootstrap-formula.new.32437/saphanabootstrap-formula.changes
2021-06-09 21:53:22.118588804 +0200
@@ -1,0 +2,8 @@
+Wed Jun 9 07:00:36 UTC 2021 - Eike Waldt <[email protected]>
+
+- fixes a not working import of dbapi in SUSE/ha-sap-terraform-deployments#703
+- removes the installation and extraction of all hdbcli files in the
/hana/shared/srHook directory
+- fixes execution order of srTakeover/srCostOptMemConfig hook
+- renames and updates hook srTakeover to srCostOptMemConfig
+
+-------------------------------------------------------------------
Old:
----
saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2.tar.gz
New:
----
saphanabootstrap-formula-0.7.1+git.1623245207.6711362.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ saphanabootstrap-formula.spec ++++++
--- /var/tmp/diff_new_pack.vMGHyu/_old 2021-06-09 21:53:22.502589488 +0200
+++ /var/tmp/diff_new_pack.vMGHyu/_new 2021-06-09 21:53:22.506589496 +0200
@@ -19,7 +19,7 @@
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
Name: saphanabootstrap-formula
-Version: 0.7.1+git.1620632537.c8808c2
+Version: 0.7.1+git.1623245207.6711362
Release: 0
Summary: SAP HANA platform deployment formula
License: Apache-2.0
++++++ _service ++++++
--- /var/tmp/diff_new_pack.vMGHyu/_old 2021-06-09 21:53:22.526589531 +0200
+++ /var/tmp/diff_new_pack.vMGHyu/_new 2021-06-09 21:53:22.526589531 +0200
@@ -5,7 +5,7 @@
<param name="exclude">.git</param>
<param name="filename">saphanabootstrap-formula</param>
<param name="versionformat">0.7.1+git.%ct.%h</param>
- <param name="revision">c8808c2742b7bb5de718fe95e51b35da50d06a55</param>
+ <param name="revision">67113626dbcf100f2d8f309b2006b45d6782ec08</param>
</service>
<service name="recompress" mode="disabled">
++++++ saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2.tar.gz ->
saphanabootstrap-formula-0.7.1+git.1623245207.6711362.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/hana/enable_cost_optimized.sls
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/hana/enable_cost_optimized.sls
---
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/hana/enable_cost_optimized.sls
2021-05-10 09:42:17.000000000 +0200
+++
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/hana/enable_cost_optimized.sls
2021-06-09 15:26:47.000000000 +0200
@@ -34,10 +34,10 @@
- require:
- reduce_memory_resources_{{ node.host+node.sid }}
-install_srTakeover_hook:
+install_srCostOptMemConfig_hook:
file.managed:
- - source: salt://hana/templates/srTakeover_hook.j2
- - name: /hana/shared/srHook/srTakeover.py
+ - source: salt://hana/templates/srCostOptMemConfig_hook.j2
+ - name: /hana/shared/srHook/srCostOptMemConfig.py
- user: {{ node.sid.lower() }}adm
- group: sapsys
- mode: 755
@@ -53,60 +53,19 @@
- failhard: True
{% endif %}
-extract_hana_pydbapi_archive:
- hana.pydbapi_extracted:
- - name: PYDBAPI.TGZ
- - software_folders: [{{ hana_client_path }}]
- - output_dir: /hana/shared/srHook
- - hana_version: '20'
- - force: true
- - additional_extract_options: --transform
s|-[0-9]*\.[0-9]*\.[0-9]*|-package| --wildcards hdbcli*
- - require:
- - setup_srHook_directory
-
-extract_hdbcli_client_files:
- archive.extracted:
- - name: /hana/shared/srHook/
- - source: /hana/shared/srHook/hdbcli-package.tar.gz
- - enforce_toplevel: False
- - options: --strip=2 --wildcards '*/hdbcli/*.py'
- - require:
- - extract_hana_pydbapi_archive
-
-remove_hdbcli_tar_package:
- file.absent:
- - names:
- - /hana/shared/srHook/hdbcli-package.tar.gz
- - /hana/shared/srHook/hdbcli
- - require:
- - extract_hdbcli_client_files
-
-chmod_hdbcli_client_files:
- file.managed:
- - user: {{ node.sid.lower() }}adm
- - group: sapsys
- - mode: 755
- - names:
- - /hana/shared/srHook/dbapi.py
- - /hana/shared/srHook/resultrow.py
- - /hana/shared/srHook/__init__.py
- - require:
- - extract_hdbcli_client_files
-
-configure_ha_dr_provider_srTakeover:
+configure_ha_dr_provider_srCostOptMemConfig:
file.append:
- name: /hana/shared/{{ node.sid.upper()
}}/global/hdb/custom/config/global.ini
- text: |
- [ha_dr_provider_srTakeover]
- provider = srTakeover
+ [ha_dr_provider_srCostOptMemConfig]
+ provider = srCostOptMemConfig
path = /hana/shared/srHook
- execution_order = 1
+ execution_order = 2
- require:
- reduce_memory_resources_{{ node.host+node.sid }}
- setup_srHook_directory
- - install_srTakeover_hook
- - extract_hdbcli_client_files
+ - install_srCostOptMemConfig_hook
{% endif %}
{% endif %}
{% endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/saphanabootstrap-formula.changes
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/saphanabootstrap-formula.changes
---
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/saphanabootstrap-formula.changes
2021-05-10 09:42:17.000000000 +0200
+++
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/saphanabootstrap-formula.changes
2021-06-09 15:26:47.000000000 +0200
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Wed Jun 9 07:00:36 UTC 2021 - Eike Waldt <[email protected]>
+
+- fixes a not working import of dbapi in SUSE/ha-sap-terraform-deployments#703
+- removes the installation and extraction of all hdbcli files in the
/hana/shared/srHook directory
+- fixes execution order of srTakeover/srCostOptMemConfig hook
+- renames and updates hook srTakeover to srCostOptMemConfig
+
+-------------------------------------------------------------------
Fri May 7 09:15:21 UTC 2021 - Bernd Schubert <[email protected]>
- Changing exporter stickiness to => 0 and adjusting the colocation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/templates/srCostOptMemConfig_hook.j2
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/templates/srCostOptMemConfig_hook.j2
---
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/templates/srCostOptMemConfig_hook.j2
1970-01-01 01:00:00.000000000 +0100
+++
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/templates/srCostOptMemConfig_hook.j2
2021-06-09 15:26:47.000000000 +0200
@@ -0,0 +1,102 @@
+{%- from "hana/map.jinja" import hana with context -%}
+{%- set host = grains['host'] %}
+
+{%- for node in hana.nodes %}
+{%- if node.host == host and node.secondary is defined and
node.scenario_type.lower() == 'cost-optimized' %}
+
+{%- set dbsid = node.sid.lower() %}
+{%- set dbinst = '{:0>2}'.format(node.instance) %}
+
+{%- for prim_node in hana.nodes %}
+{%- if node.secondary.remote_host == prim_node.host and prim_node.primary is
defined %}
+
+{%- set dbuser = prim_node.primary.userkey.user_name %}
+{%- set dbpwd = prim_node.password %}
+{%- set dbversion = salt['hana.get_version'](sid=dbsid, inst=dbinst,
password=dbpwd) %}
+{%- if salt['pkg.version_cmp'](dbversion, '2.0') < 0 %}
+ {%- set dbport = ('3'~ dbinst ~'15')|int %}
+{%- else %}
+ {%- set dbport = ('3'~ dbinst ~'13')|int %}
+{%- endif -%}
+
+"""
+HA/DR hook {haDrCostOptMem} for method srPostTakeover()
+
+This hook is used when deploying a "Cost Optimized Scenario".
+It makes sure to reconfigure the primary database after a takeover.
+
+The folowing changes to global.ini are needed to activea this hook.
+
+[ha_dr_provider_{haDrCostOptMem}]
+provider = {haDrCostOptMem}
+path = /hana/shared/srHook/
+execution_order = 2
+
+For all hooks, 0 must be returned in case of success.
+
+Set the following variables:
+* dbinst Instance Number [e.g. 00 - 99 ]
+* dbuser Username [ e.g. SYSTEM ]
+* dbpwd
+* user password [ e.g. SLES4sap ]
+* dbport port where db listens for SQL connctions [e.g 30013 or 30015]
+"""
+#
+# parameter section
+#
+dbuser="{{ dbuser }}"
+dbpwd="{{ dbpwd }}"
+dbinst="{{ dbinst }}"
+dbport="{{ dbport }}"
+
+{%- endif %}
+{%- endfor %}
+{%- endif %}
+{%- endfor %}
+
+#
+# prepared SQL statements to remove memory allocation limit
+# and pre-load of column tables
+#
+stmnt1 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET
('memorymanager','global_allocation_limit') WITH RECONFIGURE"
+stmnt2 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET
('system_replication','preload_column_tables') WITH RECONFIGURE"
+#
+# loading classes and libraries
+#
+import os, time
+from hdbcli import dbapi
+from hdb_ha_dr.client import HADRBase, Helper
+#
+# class definition srCostOptMemConfig
+#
+class srCostOptMemConfig(HADRBase):
+ def __init__(self, *args, **kwargs):
+ # delegate construction to base class
+ super(srCostOptMemConfig, self).__init__(*args, **kwargs)
+
+ def about(self):
+ return {"provider_company" : "<customer>",
+ "provider_name" : "srCostOptMemConfig", # provider name = class
name
+ "provider_description" : "Replication takeover script to set
parameters to default.",
+ "provider_version" : "1.0"}
+
+ def postTakeover(self, rc, **kwargs):
+ """Post takeover hook."""
+ self.tracer.info("%s.postTakeover method called with rc=%s" %
(self.__class__.__name__, rc))
+ if rc == 0:
+ # normal takeover succeeded
+ conn = dbapi.connect('localhost',dbport,dbuser,dbpwd)
+ cursor = conn.cursor()
+ cursor.execute(stmnt1)
+ cursor.execute(stmnt2)
+ return 0
+ elif rc == 1:
+ # waiting for force takeover
+ conn = dbapi.connect('localhost',dbport,dbuser,dbpwd)
+ cursor = conn.cursor()
+ cursor.execute(stmnt1)
+ cursor.execute(stmnt2)
+ return 0
+ elif rc == 2:
+ # error, something went wrong
+ return 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/templates/srTakeover_hook.j2
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/templates/srTakeover_hook.j2
---
old/saphanabootstrap-formula-0.7.1+git.1620632537.c8808c2/templates/srTakeover_hook.j2
2021-05-10 09:42:17.000000000 +0200
+++
new/saphanabootstrap-formula-0.7.1+git.1623245207.6711362/templates/srTakeover_hook.j2
1970-01-01 01:00:00.000000000 +0100
@@ -1,114 +0,0 @@
-#!/usr/bin/env python2
-{%- from "hana/map.jinja" import hana with context -%}
-{% set host = grains['host'] %}
-
-{% for node in hana.nodes %}
-{% if node.host == host and node.secondary is defined and
node.scenario_type.lower() == 'cost-optimized' %}
-
-{% set dbsid = node.sid.lower() %}
-{% set dbinst = '{:0>2}'.format(node.instance) %}
-
-{% for prim_node in hana.nodes %}
-{% if node.secondary.remote_host == prim_node.host and prim_node.primary is
defined %}
-
-{% set dbuser = prim_node.primary.userkey.user_name %}
-{% set dbpwd = prim_node.password %}
-{% set dbversion = salt['hana.get_version'](sid=dbsid, inst=dbinst,
password=dbpwd) %}
-{% if salt['pkg.version_cmp'](dbversion, '2.0') < 0 %}
- {% set dbport = ('3'~ dbinst ~'15')|int %}
-{% else %}
- {% set dbport = ('3'~ dbinst ~'13')|int %}
-{% endif -%}
-
-dbuser="{{ dbuser }}"
-dbpwd="{{ dbpwd }}"
-dbinst="{{ dbinst }}"
-dbport="{{ dbport }}"
-
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endfor %}
-
-"""
-Auto-generated HA/DR hook script
-
-"""
-
-stmnt1 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET
('memorymanager','global_allocation_limit') WITH RECONFIGURE"
-stmnt2 = "ALTER SYSTEM ALTER CONFIGURATION ('global.ini','SYSTEM') UNSET
('system_replication','preload_column_tables') WITH RECONFIGURE"
-
-import os, time, dbapi
-
-from hdb_ha_dr.client import HADRBase, Helper
-
-class srTakeover(HADRBase):
- def __init__(self, *args, **kwargs):
- # delegate construction to base class
- super(srTakeover, self).__init__(*args, **kwargs)
-
- def about(self):
- return {"provider_company" : "SUSE",
- "provider_name" : "srTakeover", # provider name = class name
- "provider_description" : "Replication takeover script to set
parameters to default.",
- "provider_version" : "1.0"}
-
- def startup(self, hostname, storage_partition, system_replication_mode,
**kwargs):
- self.tracer.debug("enter startup hook; %s" % locals())
- self.tracer.debug(self.config.toString())
- self.tracer.info("leave startup hook")
- return 0
-
- def shutdown(self, hostname, storage_partition, system_replication_mode,
**kwargs):
- self.tracer.debug("enter shutdown hook; %s" % locals())
- self.tracer.debug(self.config.toString())
- self.tracer.info("leave shutdown hook")
- return 0
-
- def failover(self, hostname, storage_partition, system_replication_mode,
**kwargs):
- self.tracer.debug("enter failover hook; %s" % locals())
- self.tracer.debug(self.config.toString())
- self.tracer.info("leave failover hook")
- return 0
-
- def stonith(self, failingHost, **kwargs):
- self.tracer.debug("enter stonith hook; %s" % locals())
- self.tracer.debug(self.config.toString())
- # e.g. stonith of params["failed_host"]
- # e-g- set vIP active
- self.tracer.info("leave stonith hook")
- return 0
-
- def preTakeover(self, isForce, **kwargs):
- """Pre takeover hook."""
- self.tracer.info("%s.preTakeover method called with isForce=%s" %
- (self.__class__.__name__, isForce))
- if not isForce:
- # run pre takeover code
- # run pre-check, return != 0 in case of error => will abort
takeover
- return 0
- else:
- # possible force-takeover only code
- # usually nothing to do here
- return 0
-
- def postTakeover(self, rc, **kwargs):
- """Post takeover hook."""
- self.tracer.info("%s.postTakeover method called with rc=%s" %
(self.__class__.__name__, rc))
- if rc == 0:
- # normal takeover succeeded
- conn = dbapi.connect('localhost',dbport,dbuser,dbpwd)
- cursor = conn.cursor()
- cursor.execute(stmnt1)
- cursor.execute(stmnt2)
- return 0
- elif rc == 1:
- # waiting for force takeover
- conn = dbapi.connect('localhost',dbport,dbuser,dbpwd)
- cursor = conn.cursor()
- cursor.execute(stmnt1)
- cursor.execute(stmnt2)
- return 0
- elif rc == 2:
- # error, something went wrong
- return 0
\ No newline at end of file