diff --git a/package/yast2-sap-ha.changes b/package/yast2-sap-ha.changes index 72294f3..19718c2 100644 --- a/package/yast2-sap-ha.changes +++ b/package/yast2-sap-ha.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Feb 3 13:18:25 UTC 2025 - Peter Varkoly + +- yast sap_ha should check if HDB is running on primary + (bsc#1235773) Build in a check if the DB is running on both nodes. +- 6.0.4 + ------------------------------------------------------------------- Wed Jan 29 11:06:24 UTC 2025 - Peter Varkoly diff --git a/package/yast2-sap-ha.spec b/package/yast2-sap-ha.spec index 44e1222..919e843 100644 --- a/package/yast2-sap-ha.spec +++ b/package/yast2-sap-ha.spec @@ -17,7 +17,7 @@ Name: yast2-sap-ha -Version: 6.0.3 +Version: 6.0.4 Release: 0 BuildArch: noarch Source0: %{name}-%{version}.tar.bz2 diff --git a/src/data/sap_ha/help_prereq_hana_su_co.html b/src/data/sap_ha/help_prereq_hana_su_co.html index 4ba20d4..1e8844f 100644 --- a/src/data/sap_ha/help_prereq_hana_su_co.html +++ b/src/data/sap_ha/help_prereq_hana_su_co.html @@ -5,6 +5,7 @@

SAP HANA System Replication Scale Up: Cost-Optimized

There are two machines with SAP HANA installed.
Note that the machine you run the wizard on becomes the primary node in the cluster. +
  • Verify that both databases are up and running.
  • You have created one of the following:
      diff --git a/src/data/sap_ha/help_prereq_hana_su_co_azure.html b/src/data/sap_ha/help_prereq_hana_su_co_azure.html index 949ec31..3e26902 100644 --- a/src/data/sap_ha/help_prereq_hana_su_co_azure.html +++ b/src/data/sap_ha/help_prereq_hana_su_co_azure.html @@ -18,6 +18,7 @@

      SAP HANA System Replication Scale Up: Cost-Optimized in Microsoft® Azure There are two machines with SAP HANA installed.
      Note that the machine you run the wizard on becomes the primary node in the cluster. +
    • Verify that both databases are up and running.
    • The master node SSH public key is authorized for SSH access to the secondary node. This is needed when SSH password access is disabled, which is the default on Microsoft Azure.
    • diff --git a/src/data/sap_ha/help_prereq_hana_su_mt.html b/src/data/sap_ha/help_prereq_hana_su_mt.html index 32a0561..3df6e5e 100644 --- a/src/data/sap_ha/help_prereq_hana_su_mt.html +++ b/src/data/sap_ha/help_prereq_hana_su_mt.html @@ -5,6 +5,7 @@

      SAP HANA System Replication Scale Up: Multi-Tier

      There are two machines with SAP HANA installed.
      Note that the machine you run the wizard on becomes the primary node in the cluster. +
    • Verify that both databases are up and running.
    • You have created one of the following:
        diff --git a/src/data/sap_ha/help_prereq_hana_su_mt_azure.html b/src/data/sap_ha/help_prereq_hana_su_mt_azure.html index 127eba5..ea83541 100644 --- a/src/data/sap_ha/help_prereq_hana_su_mt_azure.html +++ b/src/data/sap_ha/help_prereq_hana_su_mt_azure.html @@ -18,6 +18,7 @@

        SAP HANA System Replication Scale Up: Multi-Tier in Microsoft® Azure® There are two machines with SAP HANA installed.
        Note that the machine you run the wizard on becomes the primary node in the cluster. +
      • Verify that both databases are up and running.
      • The master node SSH public key is authorized for SSH access to the secondary node. This is needed when SSH password access is disabled, which is the default on Microsoft Azure.
      • diff --git a/src/data/sap_ha/help_prereq_hana_su_po.html b/src/data/sap_ha/help_prereq_hana_su_po.html index 3dfe52c..586e432 100644 --- a/src/data/sap_ha/help_prereq_hana_su_po.html +++ b/src/data/sap_ha/help_prereq_hana_su_po.html @@ -5,6 +5,7 @@

        SAP HANA System Replication Scale Up: Performance-Optimized

        There are two machines with SAP HANA installed.
        Note that the machine you run the wizard on becomes the primary node in the cluster. +
      • Verify that both databases are up and running.
      • You have created one of the following:
          diff --git a/src/data/sap_ha/help_prereq_hana_su_po_azure.html b/src/data/sap_ha/help_prereq_hana_su_po_azure.html index 0c4e499..bdb56d8 100644 --- a/src/data/sap_ha/help_prereq_hana_su_po_azure.html +++ b/src/data/sap_ha/help_prereq_hana_su_po_azure.html @@ -18,6 +18,7 @@

          SAP HANA System Replication Scale Up: Performance-Optimized in Microsoft® There are two machines with SAP HANA installed.
          Note that the machine you run the wizard on becomes the primary node in the cluster. +
        • Verify that both databases are up and running.
        • The master node SSH public key is authorized for SSH access to the secondary node. This is needed when SSH password access is disabled, which is the default on Microsoft Azure.
        • diff --git a/src/lib/sap_ha/configuration/hana.rb b/src/lib/sap_ha/configuration/hana.rb index abf67a8..13c5f79 100644 --- a/src/lib/sap_ha/configuration/hana.rb +++ b/src/lib/sap_ha/configuration/hana.rb @@ -117,6 +117,7 @@ def configured? def validate(verbosity = :verbose) SemanticChecks.instance.check(verbosity) do |check| check.hana_is_installed(@system_id, @global_config.cluster.all_nodes) + check.hana_is_running(@system_id, @instance, @global_config.cluster.all_nodes) check.ipv4(@virtual_ip, "Virtual IP") check.nonneg_integer(@virtual_ip_mask, "Virtual IP mask") check.integer_in_range(@virtual_ip_mask, 1, 32, "CIDR mask has to be between 1 and 32.", diff --git a/src/lib/sap_ha/semantic_checks.rb b/src/lib/sap_ha/semantic_checks.rb index bc8c4fa..43a4ac4 100644 --- a/src/lib/sap_ha/semantic_checks.rb +++ b/src/lib/sap_ha/semantic_checks.rb @@ -282,11 +282,33 @@ def hana_is_installed(value, nodes) end if status != 0 flag = false - message += "No SAP HANA #{value} is installed on #{node}\n" + message += "
          No SAP HANA #{value} is installed on #{node}" end end end - report_error(flag, message, 'SID', value) + report_error(flag, message, '', '') + end + + def hana_is_running(system_id, instance_number, nodes) + flag = true + message = '' + my_ips = SapHA::System::Network.ip_addresses + procname = "hdb.sap#{system_id.upcase}_HDB#{instance_number}" + if @no_test + nodes.each do |node| + log.debug("node #{node} #{my_ips}") + if my_ips.include?(node) + status = exec_status("pidof", procname) + else + status = exec_status("ssh", "-o", "StrictHostKeyChecking=no", node, "pidof", procname) + end + if status != 0 + flag = false + message += "
          No SAP HANA #{system_id} is running on #{node}" + end + end + end + report_error(flag, message, '', '') end # Check if string is a block device @@ -368,11 +390,10 @@ def error_string(field_name, explanation, value = nil) explanation = explanation[0..-2] if explanation.end_with? "." explanation = explanation if field_name.empty? - "Invalid input: #{explanation}" + "Error detected: #{explanation}" elsif value.nil? || (value.is_a?(::String) && value.empty?) "Invalid entry for #{field_name}: #{explanation}." else - "Invalid entry for #{field_name} (\"#{ERB::Util.html_escape(value)}\"): #{explanation}." end end