Skip to content

Commit 875aa1e

Browse files
authored
Merge pull request #54 from varkoly/master
Adapt to new SAPHanaSR-angi
2 parents 5fe67c9 + 9012648 commit 875aa1e

File tree

6 files changed

+26
-10
lines changed

6 files changed

+26
-10
lines changed

package/yast2-sap-ha.changes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
-------------------------------------------------------------------
2+
Wed Jan 29 11:06:24 UTC 2025 - Peter Varkoly <varkoly@suse.com>
3+
4+
- yast-sap-ha does not support SAPHanaSR-angi (bsc#1232807)
5+
Fix used templates
6+
Add missed distinguishing between classic and angi
7+
#458 [doc] Issue in "Constraints for SAPHanaSR-angi"
8+
https://github.com/SUSE/suse-best-practices/issues/458
9+
- 6.0.3
10+
111
-------------------------------------------------------------------
212
Mon Nov 4 21:34:50 UTC 2024 - Peter Varkoly <varkoly@suse.com>
313

package/yast2-sap-ha.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# spec file for package yast2-sap-ha
33
#
4-
# Copyright (c) 2023 SUSE LLC
4+
# Copyright (c) 2025 SUSE LLC
55
#
66
# All modifications and additions to the file contributed by third parties
77
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
1717

1818

1919
Name: yast2-sap-ha
20-
Version: 6.0.2
20+
Version: 6.0.3
2121
Release: 0
2222
BuildArch: noarch
2323
Source0: %{name}-%{version}.tar.bz2
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SAPHanaSR-ScaleUp entries for writing srHook cluster attribute
2+
<%= @system_id -%>adm ALL=(ALL) NOPASSWD: /usr/bin/SAPHanaSR-hookHelper --sid=<%= @system_id -%> *
3+
<%= @system_id -%>adm ALL=(ALL) NOPASSWD: /usr/sbin/crm_attribute -n hana_<%= @system_id -%>_site_srHook_*
File renamed without changes.

src/data/sap_ha/tmpl_cluster_config.angi.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ primitive rsc_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%> ocf:suse:SAPHan
3939
DUPLICATE_PRIMARY_TIMEOUT=600 AUTOMATED_REGISTER="<%= @auto_register -%>" \
4040
meta priority="100"
4141

42-
clone msl_SAPHana_<%= @system_id -%>_HDB<%= @instance -%> rsc_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%> \
42+
clone mst_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%> rsc_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%> \
4343
meta clone-max=2 clone-node-max=1 interleave=true promotable=true
4444

4545
primitive rsc_ip_<%= @system_id -%>_HDB<%= @instance -%> ocf:heartbeat:IPaddr2 \
@@ -63,17 +63,17 @@ group g_ip_<%= @system_id -%>_HDB<%= @instance -%> rsc_ip_<%= @system_id -%>_HDB
6363
#
6464

6565
colocation col_saphana_ip_<%= @system_id -%>_HDB<%= @instance -%> <%= @additional_instance ? "3000" : "2000" -%>: g_ip_<%= @system_id -%>_HDB<%= @instance -%>:Started \
66-
msl_SAPHana_<%= @system_id -%>_HDB<%= @instance -%>:Master
66+
mst_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%>:Master
6767

6868
<% else %>
6969

7070
colocation col_saphana_ip_<%= @system_id -%>_HDB<%= @instance -%> <%= @additional_instance ? "3000" : "2000" -%>: rsc_ip_<%= @system_id -%>_HDB<%= @instance -%>:Started \
71-
msl_SAPHana_<%= @system_id -%>_HDB<%= @instance -%>:Master
71+
mst_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%>:Master
7272

7373
<% end %>
7474

7575
order ord_SAPHana_<%= @system_id -%>_HDB<%= @instance -%> Optional: cln_SAPHanaTop_<%= @system_id -%>_HDB<%= @instance -%> \
76-
msl_SAPHana_<%= @system_id -%>_HDB<%= @instance -%>
76+
mst_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%>
7777

7878
<% if @additional_instance %>
7979

@@ -96,6 +96,6 @@ colocation col_<%= @np_system_id -%>_never_with_<%= @system_id -%>ip -inf: rsc_S
9696

9797
order ord_<%= @np_system_id -%>_stop_before_<%= @system_id -%>-promote mandatory: \
9898
rsc_SAP_<%= @np_system_id -%>_HDB<%= @np_instance -%>:stop \
99-
msl_SAPHana_<%= @system_id -%>_HDB<%= @instance -%>:promote
99+
mst_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%>:promote
100100

101101
<% end %>

src/lib/sap_ha/configuration/hana.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,10 @@ def wait_idle(node)
340340
end
341341

342342
def activating_msr
343-
msr = "msl_SAPHana_#{@system_id}_HDB#{@instance}"
343+
msr = "mst_SAPHanaCon_#{@system_id}_HDB#{@instance}"
344+
if @rsa_version == "classic"
345+
msr = "msl_SAPHana_#{@system_id}_HDB#{@instance}"
346+
end
344347
out, status = exec_outerr_status("crm", "resource", "refresh", msr)
345348
@nlog.log_status(status.exitstatus == 0,
346349
"#{msr} status refresh OK",
@@ -402,8 +405,8 @@ def configure_firewall(role)
402405

403406
# Creates the sudoers file
404407
def adapt_sudoers
405-
if File.exist?(SapHA::Helpers.data_file_path("SUDOERS_HANASR.erb"))
406-
Helpers.write_file("/etc/sudoers.d/saphanasr.conf", Helpers.render_template("SUDOERS_HANASR.erb", binding))
408+
if File.exist?(SapHA::Helpers.data_file_path("SUDOERS_HANASR.#{@rsa_version}.erb"))
409+
Helpers.write_file("/etc/sudoers.d/saphanasr.conf", Helpers.render_template("SUDOERS_HANASR.#{@rsa_version}.erb", binding))
407410
end
408411
end
409412

0 commit comments

Comments
 (0)