diff --git a/package/yast2-sap-ha.changes b/package/yast2-sap-ha.changes index 17d590f..96d005e 100644 --- a/package/yast2-sap-ha.changes +++ b/package/yast2-sap-ha.changes @@ -1,8 +1,10 @@ ------------------------------------------------------------------- -Mon Nov 4 21:34:50 UTC 2024 - Peter Varkoly +Wed Jan 29 11:06:24 UTC 2025 - Peter Varkoly -- yast-sap-ha does not support SAPHanaSR-angi (bsc#1232807) - Adapt to new SAPHanaSR-angi +- yast-sap-ha does not support SAPHanaSR-angi (bsc#1232807) +- Adapt to new SAPHanaSR-angi + #458 [doc] Issue in "Constraints for SAPHanaSR-angi" + https://github.com/SUSE/suse-best-practices/issues/458 - 4.6.4 ------------------------------------------------------------------- diff --git a/package/yast2-sap-ha.spec b/package/yast2-sap-ha.spec index 50350dc..e46e1d3 100644 --- a/package/yast2-sap-ha.spec +++ b/package/yast2-sap-ha.spec @@ -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 diff --git a/src/data/sap_ha/SUDOERS_HANASR.angi.erb b/src/data/sap_ha/SUDOERS_HANASR.angi.erb new file mode 100644 index 0000000..36e01f3 --- /dev/null +++ b/src/data/sap_ha/SUDOERS_HANASR.angi.erb @@ -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_* diff --git a/src/data/sap_ha/SUDOERS_HANASR.erb b/src/data/sap_ha/SUDOERS_HANASR.classic.erb similarity index 100% rename from src/data/sap_ha/SUDOERS_HANASR.erb rename to src/data/sap_ha/SUDOERS_HANASR.classic.erb diff --git a/src/data/sap_ha/tmpl_cluster_config.angi.erb b/src/data/sap_ha/tmpl_cluster_config.angi.erb index 6d1071b..52169da 100644 --- a/src/data/sap_ha/tmpl_cluster_config.angi.erb +++ b/src/data/sap_ha/tmpl_cluster_config.angi.erb @@ -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 \ @@ -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 %> @@ -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 %> diff --git a/src/lib/sap_ha/configuration/hana.rb b/src/lib/sap_ha/configuration/hana.rb index 9437bb3..d41b59f 100644 --- a/src/lib/sap_ha/configuration/hana.rb +++ b/src/lib/sap_ha/configuration/hana.rb @@ -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", @@ -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