Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap_install_media_detect: allow separate detection of exe and exedb for installations where exedb isn't required #729

Closed
rob0d opened this issue Apr 26, 2024 · 4 comments
Assignees

Comments

@rob0d
Copy link

rob0d commented Apr 26, 2024

@sean-freeman as per your message to track this enhancement suggestion.
When set sap_install_media_detect_kernel the code in sap_install_media_detect currently detects both EXE and EXEDB parts of the SAP Kernel.
Some types of installations don't require EXEDB, only EXE.

Suggestion is to change the behaviour to allow the kernel detection to separately check EXE or EXEDB or both.
Options probably depend on how much we care about backwards compatibility as sap_install_media_detect_kernel is used in many places.
Option 1:
Allow more than just true/false, but keep true for compatibility purposes:

  • to detect both parts of kernel set this to: true or all
  • to detect part1/exe set this to: exe or part1
  • to detect part2/exedb set hit to: exedb or part2

Option2:
Introduce new control parameters: sap_install_media_detect_kernel_part1 + sap_install_media_detect_kernel_part2
ans possibly for backward compatibility keep sap_install_media_detect_kernel which will override the two new parameters if set to true. This may lead to a slightly confusing behaviour is the three parameters are not inline.

@berndfinger berndfinger self-assigned this May 4, 2024
@berndfinger
Copy link
Member

berndfinger commented May 4, 2024

@rob0d @sean-freeman - According to the comments about sap_install_media_detect_kernel_db in defaults/main.yml, setting this parameter to the database type is only necessary if there is more than one SAPEXEDB file in the source directory. Taking into account the absence of this parameter in https://github.com/sap-linuxlab/ansible.playbooks_for_sap, I agree that we should be careful when modifying the meaning of the parameter sap_install_media_detect_kernel or sap_install_media_detect_kernel_db.

Wouldn't a new value for sap_install_media_detect_kernel_db, like for example absent, be sufficient? I wouldn't choose false because this could give the impression that this parameter is a boolean.

The new behavior would be as follows:

  • If sap_install_media_detect_kernel_db is not defined, the behavior is unchanged and the role will check for the presence of a single database dependent kernel file (SAPEXEDB).
  • If sap_install_media_detect_kernel_db is defined and if the value is not absent , the behavior is unchanged and the role will check for the presence of the correct database dependent kernel file (SAPEXEDB) for the specified database type (e.g. saphana).
  • If sap_install_media_detect_kernel_db is defined and if its value is equal to absent, the behavior is changed as follows:
    • The absence of SAPEXEDB does not fail the role, and
    • The role parameters sap_swpm_kernel_dependent_file_name_get_db_specific and the output parameters sap_swpm_kernel_dependent_path and sap_swpm_kernel_dependent_file_name are not set.

This can be achieved by adding all possible database types for parameter sap_install_media_detect_kernel_db as a when condition in the blocks

- name: SAP Install Media Detect - Prepare - Assert that exactly one matching SAP Kernel DB dependent is present
and
- name: SAP Install Media Detect - Find files after extraction - Find SAPEXEDB, database specific - block
, and by modifying the when condition of the task
- name: SAP Install Media Detect - Detection completed - Set facts for SAPEXEDB, specific
.

berndfinger added a commit to berndfinger/community.sap_install that referenced this issue May 4, 2024
Solves issue sap-linuxlab#729.

Signed-off-by: Bernd Finger <bfinger@redhat.com>
@rob0d
Copy link
Author

rob0d commented May 7, 2024

Hi @berndfinger, yes this sounds better than what I suggested. I would just suggest to use 'none' instead of 'absent'.

berndfinger added a commit to berndfinger/community.sap_install that referenced this issue May 7, 2024
... for not detecting DB specific SAP kernel file(s) (SAPEXEDB)

Relates to sap-linuxlab#729.

Signed-off-by: Bernd Finger <bfinger@redhat.com>
@berndfinger
Copy link
Member

berndfinger commented May 7, 2024

@rob0d I agree: 'none' is better than 'absent', as the meaning of 'absent' in Ansible is typically to ensure that something is not available.

@berndfinger
Copy link
Member

Solved in #732.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants