Skip to content

Commit

Permalink
Merge pull request #53 from varkoly/SLE-15-SP7
Browse files Browse the repository at this point in the history
Sle 15 sp7
  • Loading branch information
varkoly authored Jan 29, 2025
2 parents 66685bc + e9c32c4 commit 02eaf33
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
10 changes: 9 additions & 1 deletion package/yast2-sap-ha.changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
-------------------------------------------------------------------
Wed Jan 29 11:06:24 UTC 2025 - Peter Varkoly <[email protected]>

- yast-sap-ha does not support SAPHanaSR-angi (bsc#1232807)
Fix used templates
Add missed distinguishing between classic and angi
- 4.7.2

-------------------------------------------------------------------
Mon Nov 4 21:34:50 UTC 2024 - Peter Varkoly <[email protected]>

- yast-sap-ha does not support SAPHanaSR-angi (bsc#1232807)
- yast-sap-ha does not support SAPHanaSR-angi (bsc#1232807)
Adapt to new SAPHanaSR-angi
- 4.7.1

Expand Down
4 changes: 2 additions & 2 deletions package/yast2-sap-ha.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package yast2-sap-ha
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 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 @@ -17,7 +17,7 @@


Name: yast2-sap-ha
Version: 4.7.1
Version: 4.7.2
Release: 0
BuildArch: noarch
Source0: %{name}-%{version}.tar.bz2
Expand Down
3 changes: 3 additions & 0 deletions src/data/sap_ha/SUDOERS_HANASR.angi.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SAPHanaSR-ScaleUp entries for writing srHook cluster attribute
<%= @system_id -%>adm ALL=(ALL) NOPASSWD: /usr/bin/SAPHanaSR-hookHelper --sid=<%= @system_id -%> *
<%= @system_id -%>adm ALL=(ALL) NOPASSWD: /usr/sbin/crm_attribute -n hana_<%= @system_id -%>_site_srHook_*
File renamed without changes.
10 changes: 5 additions & 5 deletions src/data/sap_ha/tmpl_cluster_config.angi.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ primitive rsc_SAPHanaCon_<%= @system_id -%>_HDB<%= @instance -%> ocf:suse:SAPHan
DUPLICATE_PRIMARY_TIMEOUT=600 AUTOMATED_REGISTER="<%= @auto_register -%>" \
meta priority="100"

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

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

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

<% else %>

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

<% end %>

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

<% if @additional_instance %>

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

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

<% end %>
9 changes: 6 additions & 3 deletions src/lib/sap_ha/configuration/hana.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ def wait_idle(node)
end

def activating_msr
msr = "msl_SAPHana_#{@system_id}_HDB#{@instance}"
msr = "mst_SAPHanaCon_#{@system_id}_HDB#{@instance}"
if @rsa_version == "classic"
msr = "msl_SAPHana_#{@system_id}_HDB#{@instance}"
end
out, status = exec_outerr_status("crm", "resource", "refresh", msr)
@nlog.log_status(status.exitstatus == 0,
"#{msr} status refresh OK",
Expand Down Expand Up @@ -403,8 +406,8 @@ def configure_firewall(role)

# Creates the sudoers file
def adapt_sudoers
if File.exist?(SapHA::Helpers.data_file_path("SUDOERS_HANASR.erb"))
Helpers.write_file("/etc/sudoers.d/saphanasr.conf", Helpers.render_template("SUDOERS_HANASR.erb", binding))
if File.exist?(SapHA::Helpers.data_file_path("SUDOERS_HANASR.#{@rsa_version}.erb"))
Helpers.write_file("/etc/sudoers.d/saphanasr.conf", Helpers.render_template("SUDOERS_HANASR.#{@rsa_version}.erb", binding))
end
end

Expand Down

0 comments on commit 02eaf33

Please sign in to comment.