community.sap_install icon indicating copy to clipboard operation
community.sap_install copied to clipboard

sap_swpm: ascs failed install async

Open Baboulinet-33 opened this issue 2 years ago • 3 comments

Hello,

I'm trying to install ASCS on nodes ascs_group and ERS on nodes ers_group - each group has one node here. In the futur, I want to install a pacemaker cluster via the role sap_ha_pacemaker_cluster

My playbook:

- hosts: all
  become: true

  pre_tasks:
    - name: Manage repo
      ansible.builtin.include_tasks: tasks/repo.yml

  roles:
    - role: community.sap_install.sap_general_preconfigure
    - role: community.sap_install.sap_netweaver_preconfigure

- hosts: ascs_group
  become: true
  roles:  
    - role: community.sap_install.sap_install_media_detect
    - role: community.sap_install.sap_swpm

- hosts: ers_group
  become: true
  roles:  
    - role: community.sap_install.sap_install_media_detect
    - role: community.sap_install.sap_swpm

group_vars/all:

sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: false

sap_install_media_detect_rar_package: 'linux-rar'

sap_install_media_detect_file_server_only: true

sap_general_preconfigure_system_roles_collection: 'redhat.rhel_system_roles'

sap_general_preconfigure_reboot_ok: true

sap_general_preconfigure_selinux_state: 'permissive'
selinux_state: "{{ sap_general_preconfigure_selinux_state }}"
selinux_policy: 'targeted'

sap_swpm_ansible_role_mode: 'default'
sap_swpm_generic: 'true'
sap_swpm_configure_tms: 'false'

# Detect SAP NetWeaver software
sap_install_media_detect_source_directory: "/data/bin"
sap_install_media_detect_source: remote_dir
sap_install_media_detect_swpm: true
sap_install_media_detect_hostagent: true
sap_install_media_detect_igs: true
sap_install_media_detect_kernel: true
sap_install_media_detect_webdisp: false

sap_global_password: NewPass$123

# Software
sap_swpm_software_path: /data/bin
sap_swpm_sapcar_path: /data/bin
sap_swpm_swpm_path: /data/bin 

# NW Passwords
sap_swpm_master_password: "{{ sap_global_password }}"
sap_swpm_ddic_000_password: "{{ sap_global_password }}"

# NW Instance Parameters
sap_swpm_sid: ABC
sap_swpm_fqdn: "poc.cloud"

# Unix User ID
sap_swpm_sapadm_uid: '40641'
sap_swpm_sapsys_gid: '40645'
sap_swpm_sidadm_uid: '40706'

group_vars/ascs_group.yml

# Product ID for New Installation
sap_swpm_product_catalog_id: NW_ABAP_ASCS:S4HANA2022.CORE.HDB.ABAP

# HDB Passwords
sap_swpm_db_system_password: "{{ sap_global_password }}"
sap_swpm_db_systemdb_password: "{{ sap_global_password }}"
sap_swpm_db_schema_abap: "SAPHANADB"
sap_swpm_db_schema_abap_password: "{{ sap_global_password }}"
sap_swpm_db_sidadm_password: "{{ sap_global_password }}"

# NW Instance Parameters
sap_swpm_ascs_instance_nr: "01"
sap_swpm_ascs_instance_hostname: "s4h-ascs-01"
sap_swpm_virtual_hostname: "s4h-ascs-01"

# HDB Instance Parameters
sap_swpm_db_ip: "10.40.70.169"
sap_swpm_db_sid: SGH
sap_swpm_db_instance_nr: "00"

group_vars/ers_group.yml:

# Product ID for New Installation
sap_swpm_product_catalog_id: NW_ERS:S4HANA2022.CORE.HDB.ABAPHA

# NW Instance Parameters
sap_swpm_ers_instance_nr: "02"
sap_swpm_ers_instance_hostname: "s4h-ers-02"

sap_swpm_virtual_hostname: "s4h-ers-02"

When ansible try to install ascs I get the following error:

TASK [community.sap_install.sap_swpm : SAP SWPM -] *****************************15:15:48
changed: [ascs_node01]

TASK [community.sap_install.sap_swpm : SAP SWPM - Wait for sapinst process to exit, poll every 60 seconds] ***15:15:49
ok: [ascs_node01]

TASK [community.sap_install.sap_swpm : SAP SWPM - Verify if sapinst process finished successfully] ***15:15:49
fatal: [ascs_node01]: FAILED! =>
{
    "ansible_job_id": "j425252174395.46858",
    "changed": false,
    "failed_when_result": true,
    "finished": 0,
    "results_file": "/root/.ansible_async/j425252174395.46858",
    "started": 1,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "",
    "stdout_lines": []
}

But in the same time, the sapinst.log file fills up - and I got the error ( I cleaned the directory before running ansible):

ERROR 2023-10-31 15:16:27.694 (root/sapinst) id=nw.directoryIsNotEmptyUnattended
<p style="margin-top: 0">
DIR_CT_RUN=/usr/sap/ABC/SYS/exe/uc/linuxx86_64 is not empty.
DETAILS: An empty directory is required for a new SAP system installation. SOLUTION: Clean up the directory to be able to proceed.
</p>
 
ERROR 2023-10-31 15:16:27.700 (root/sapinst) id=modlib.jslib.caughtException errno=MUT-03025
Caught ESAPinstJSError in module call: nw.directoryIsNotEmptyUnattended.
 
ERROR 2023-10-31 15:16:27.793 (root/sapinst) id=controller.stepExecuted errno=FCO-00011
The step check_dir_ct_run with step key |NW_ABAP_ASCS|ind|ind|ind|ind|0|0|nw_check_dir_ct_run|ind|ind|ind|ind|dirctrun|0|check_dir_ct_run was executed with status ERROR (Last error reported by the step: <p style="margin-top: 0"> DIR_CT_RUN=/usr/sap/ABC/SYS/exe/uc/linuxx86_64 is not empty. DETAILS: An empty directory is required for a new SAP system installation. SOLUTION: Clean up the directory to be able to proceed. </p>).

I'm missing a conf ?

Baboulinet-33 avatar Oct 31 '23 14:10 Baboulinet-33

@Baboulinet-33

Firstly, you are dynamically detecting the installation media using sap_install_media_detect Ansible Role but your Extravars file will override these with the incorrect variable values. It doesn't cause an error but isn't necessary:

# Software
sap_swpm_software_path: /data/bin
sap_swpm_sapcar_path: /data/bin
sap_swpm_swpm_path: /data/bin 

The async Ansible Task (used because SSH connections can otherwise drop while waiting 1-3 hours for SAP SWPM to complete) immediately failing to poll is a new error and difficult to diagnose without access. It's possible SAP SWPM fails within 60 seconds, which might explain.

The actual SAP SWPM halting error is /usr/sap/<<SID>> from a previous run is causing the error. If the directory is clean before running, are you sure the NFS is mounted correctly for /usr/sap/* mount points when creating ASCS/ERS HA pair?

Drop me an email if you want to preview the advanced Playbooks to be released in the coming weeks; it might accelerate your current work.

sean-freeman avatar Oct 31 '23 15:10 sean-freeman

Some news about the async problem, we don't change anything but today it works once in two.

Without the following var it doesn't work:

# Software
sap_swpm_software_path: /data/bin
sap_swpm_sapcar_path: /data/bin
sap_swpm_swpm_path: /data/bin 

Baboulinet-33 avatar Nov 02 '23 09:11 Baboulinet-33

Some news here, with a pause between tasks TASK [community.sap_install.sap_swpm : SAP SWPM -] and task TASK [community.sap_install.sap_swpm : SAP SWPM - Wait for sapinst process to exit, poll every 60 seconds] it works

Baboulinet-33 avatar Nov 06 '23 11:11 Baboulinet-33