Open ZouhirYachou opened 8 months ago
Hello @ZouhirYachou , your input specified unsupported mount points. mountpoint: "/usr/sap/SID/ERSXX"
Mentioned task was checking if it is one of: /sapmnt, /usr/sap/trans or /usr/sap/SID/SYS, then it assigned variable idname.
Your mount was not recognized so idname was undefined, which you can see in your error message: 'idname' is undefined.
{%- if '/sapmnt' in __mountpoint -%}
{% elif '/usr/sap/trans' in __mountpoint -%}
{% elif '/usr/sap/' + sap_ha_pacemaker_cluster_nwas_abap_sid + '/SYS' in __mountpoint -%}
I have setup ASCS/ERS cluster just moments ago using this filesystem setup:
storage_definition:
- name: usr_sap
mountpoint: /usr/sap
nfs_path: /usr/sap
nfs_server: "{{ sap_vm_provision_nfs_mount_point | default('') }}"
nfs_filesystem_type: "{{ sap_vm_provision_nfs_mount_point_type | default('') }}"
nfs_mount_options: "{{ sap_vm_provision_nfs_mount_point_opts | default('') }}"
@sean-freeman @berndfinger
Hi @ZouhirYachou , what @marcelmamula wrote is correct. The role is currently limited in its flexibility of ASCS/ERS filesystem setup. This is certainly something we will look to improve in the future.
@ZouhirYachou to be clear on the ask and subsequent error:
- Use separate NFS for /usr/sap/trans [as standard]
- Instead of shared NFS for /usr/sap and all subdirectories
- Use separate NFS for each of /usr/sap/<SID>/SYS, /usr/sap/<SID>/ASCS00, /usr/sap/<SID>/ERS02
- Use separate NFS for /sapmnt
For reference, confirmed working code:
sap_ha_pacemaker_cluster_storage_nfs_filesytem_type: nfs
sap_ha_pacemaker_cluster_storage_nfs_mount_options: 'defaults'
sap_ha_pacemaker_cluster_storage_nfs_server: "fs-00000000000000000.efs.eu-west-2.amazonaws.com:/"
special_sap_ha_pacemaker_cluster_storage_nfs_server_separate_sap_transport_dir: "fs-11111111111111111.efs.eu-west-2.amazonaws.com:/"
sap_ha_pacemaker_cluster_storage_definition:
# Must have directories available /<SID>/SYS, /<SID>/ASCS<NN>, /<SID>/<ERS<NN>
- name: usr_sap
mountpoint: /usr/sap
nfs_path: /usr/sap
nfs_server: "{{ sap_ha_pacemaker_cluster_storage_nfs_server }}"
- name: sapmnt
mountpoint: /sapmnt
nfs_path: /sapmnt
nfs_server: "{{ sap_ha_pacemaker_cluster_storage_nfs_server }}"
- name: usr_sap_trans
mountpoint: /usr/sap/trans
nfs_path: /usr/sap/trans
nfs_server: "{{ special_sap_ha_pacemaker_cluster_storage_nfs_server_separate_sap_transport_dir }}"
Hello @sean-freeman Yes that is correct so the expected NFS mount would be the following:
/sapmnt/[SID] /usr/sap/trans /usr/sap/[SID]/SYS /usr/sap/[SID]/ASCS01 /usr/sap/[SID]/ERS02
My understanding is when having the ASCS and ERS mount on both node, this would allow a smoother takeover when one of the nodes fails
@ZouhirYachou
The Ansible Role accepts only 1 NFS for /usr/sap
path.
The Ansible Role expects the following setup (which can be achieved via sap_storage_setup
Ansible Role if desired), note the separate NFS for the transports directory:
[root@nw-ascs ~]# df -h
Filesystem Size Used Avail Use% Mounted on
fs-00000000000000000.efs.eu-west-2.amazonaws.com:/usr/sap/trans 8.0E 0 8.0E 0% /usr/sap/trans
fs-11111111111111111.efs.eu-west-2.amazonaws.com:/sapmnt 8.0E 0 8.0E 0% /sapmnt
fs-11111111111111111.efs.eu-west-2.amazonaws.com:/usr/sap/S01/SYS 8.0E 0 8.0E 0% /usr/sap/S01/SYS
fs-11111111111111111.efs.eu-west-2.amazonaws.com:/usr/sap/S01/ASCS00 8.0E 0 8.0E 0% /usr/sap/S01/ASCS00
fs-11111111111111111.efs.eu-west-2.amazonaws.com:/usr/sap/S01/ERS10 8.0E 0 8.0E 0% /usr/sap/S01/ERS10
Will look tonight for some reference documents; admittedly the sap_ha_pacemaker_cluster
Ansible Role's documentation for this variable could be improved to explain the expectations and the Ansible Role logic could be improved to specifically check the NFS target server for these directories and provide a pretty error.
After the installation of SAP ASCS and ERS with swpm role, I'm trying to run the sap_ha_pacemaker_cluster role with the following variables for the NAS configuration:
The NFS mounts are already present on the hosts when I execute the sap_ha_pacemaker_cluster role
But I get the error on this task https://github.com/sap-linuxlab/community.sap_install/blob/1.4.0/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_nwas_common.yml#L20
The error occurs when the loop reaches /usr/sap/SID/ASCS01 and /usr/sap/SID/ERS02 mount points:
When I remove the two mount points from the variable
sap_ha_pacemaker_cluster_storage_definition
:It does not give me any errors when the execution has finished but the status on the pacemaker shows errors regarding missing mount points above