SUSE / ha-sap-terraform-deployments

Automated SAP/HA Deployments in Public/Private Clouds
GNU General Public License v3.0
122 stars 88 forks source link

missing scale_up_resources.j2 in newest saphanabootstrap-formula leads to salt failure during installation of cluster.sls #785

Closed jschaef closed 2 years ago

jschaef commented 2 years ago

Used cloud platform all, tested on vsphere

Used SLES4SAP version tested on SLE15SP2

Used client machine OS OpenSUSE Tumbleweed

Expected behaviour vs observed behaviour cluster should be built.

How to reproduce

use pillar_examples/automatic/hana/cluster.sls

Used terraform.tfvars

vsphere_user = testuser"
vsphere_password = "test"
vsphere_server = "xxx-lab-vcenter.lab.example.com"
vsphere_dc = "LAB-SDI"
vsphere_cluster = "SDI-CLUSTER"
vsphere_datastore = "Datastore-SU-Sessions"
vsphere_resource_pool = "Test"
vsphere_network_1 = "DP-Network-62"
vsphere_network_2 = "DP-SAP-HANA-01"
sles_release = "sle15"
service_pack = "sp2"
hana_node_memory = "32768"
hana_node_vcpu = "6"
authorized_keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC14sQr7LetRDGC1QWEDRTF5678Mt0yI91TyA2t26wUsMRDB0yO2PlzLBtj7V1tr1Utc4CeP41c1t8w+ErqxaH2l1P6dklBPNOwZ1GuQpC69dSZPuxJTNHwHzPi7jGrWu/6RF1nE5JAGoBfvOZLdFFQU82QgaOm2vBjMF54j5Hg8OvBLSAHocwmOmlJPLoULfc3M9XEKkMc77zAvWYM/q8gZaNKCflzj4/ZNWHExEQuJkzPl1B+ia4eT5pSJ2w+nUn/K/6h7Vxkf/vZN16CGDHhAGocHWD5VhkZ49jTIBaBNKOdb6HNXzIFj5sHW7z1DdiKwJNSlr bla@blub]
guest_id = "sles15_64Guest"
vm_template = "test/sles15sp2-sap-vorlage"
monitoring_enabled = "false"
iprange = "192.168.201.60/24"
hana_inst_folder = "/sapmedia/HANA"
hana_inst_master = "10.156.60.3:/install/sap-install"
hana_platform_folder = "51053061/DATA_UNITS/HDB_LCM_LINUX_X86_64"
ha_sap_deployment_repo = "https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:devel"
iscsi_srv_ip = "192.168.201.61"
iscsi_memory = "4096"
iscsi_vcpu = "2"
sbd_disk_size = "1"
hana_ips = ["192.168.201.62", "192.168.201.63"]
hana_cluster_vip = "192.168.201.64" hana_cluster_vip_secondary = "192.168.201.65"
hana_sid = "PRD"
hana_instance_number = "10"
hana_master_password = "linux123_X"
hana_node_disk_size = "128"
hana_primary_site = "SITE1_PRIM"
hana_secondary_site = "SITE2_SEC"
iscsi_lun_count = "3"
sbd_storage_type = "iscsi"
hana_active_active = "true"
background = "false"
pre_deployment = "true"
provisioning_log_level = "info"
hana_ha_enabled = "true"

Logs

      ID: /tmp/cluster.config
Function: file.managed
  Result: False
 Comment: Source file salt://hana/templates/scale_up_resources.j2 not found in saltenv 'base'
 Started: 11:16:38.784972
Duration: 28.142 ms
 Changes:   

      ID: configure-the-cluster
Function: crm.cluster_configured
    Name: update
  Result: False
 Comment: Error configuring the cluster with method update and file /tmp/cluster.config
 Started: 11:16:38.813677
Duration: 492.629 ms
 Changes: 

Root Cause cluster.sls tries to source /usr/share/salt-formulas/states/hana/templates/scale_up_resources.j2 from saphanabootstrap-formula

rpm -qpl ./packages/SAP_Applications_Module_x86_64:SLE-Module-SAP-Applications15-SP2-Updates/noarch/saphanabootstrap-formula-0.7.1+git.1619008686.8600866-3.11.1.noarch.rpm|grep templates:

/usr/share/salt-formulas/states/hana/templates/hanadb_exporter.j2 /usr/share/salt-formulas/states/hana/templates/scale_up_resources.j2 /usr/share/salt-formulas/states/hana/templates/srTakeover_hook.j2

The new saphanabootstrap-formula 0.8.0+git.1634566980.9dcfa9f-1.1 does not contain scale_up_resources.j2 anymore: rpm -ql saphanabootstrap-formula |grep -i templates:

/usr/share/salt-formulas/states/hana/templates/cluster_resources.j2 /usr/share/salt-formulas/states/hana/templates/hanadb_exporter.j2 /usr/share/salt-formulas/states/hana/templates/srCostOptMemConfig_hook.j2

yeoldegrove commented 2 years ago

There is a breaking change in saphanabootstrap-formula 0.8.0 as also seen from this late PR https://github.com/SUSE/ha-sap-terraform-deployments/pull/734.

If you are using this package repo here:

ha_sap_deployment_repo = "https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:devel"`

Please also use the develop branch of ha-sap-terraform-deployments.

Or...use the master branch and change it to this:

ha_sap_deployment_repo = "https://download.opensuse.org/repositories/network:/ha-clustering:/sap-deployments:/v7"

As mentioned in the latest release: https://github.com/SUSE/ha-sap-terraform-deployments/releases/tag/7.2.1

jschaef commented 2 years ago

There is a breaking change in saphanabootstrap-formula 0.8.0 as also seen from this late PR #734.

If you are using this package repo here:

ha_sap_deployment_repo = "https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:devel"`

Please also use the develop branch of ha-sap-terraform-deployments.

Or...use the master branch and change it to this:

ha_sap_deployment_repo = "https://download.opensuse.org/repositories/network:/ha-clustering:/sap-deployments:/v7"

As mentioned in the latest release: https://github.com/SUSE/ha-sap-terraform-deployments/releases/tag/7.2.1

Thx yeoldegrove. I was not aware of this change :thumbsup: