sap_hana_install: Update Pseudo-Idempotency - #1215
Conversation
|
@marcelmamula I found some time for testing and noticed that with fapolicyd running, some Ansible functionality is blocked. So I analyzed the problem and found that it is possible to add Ansible rules to fapolicyd, allowing the role to succeed even with fapolicyd running. The following code changes on top of your branch achieved the goal in my tests (README.md is not yet updated as there might be follow-up discussions and changes): https://github.com/marcelmamula/community.sap_install/compare/hana-fix...berndfinger:fapolicyd-fix?expand=1 . The proposed change can deal with an already existing fapolicyd rule file (e.g. with entries for other users) and also with such a rule file not yet present. In both cases, the changes are reverted at the end of the role (but only if the role does not fail in between - there appears to be no mechanism to run tasks in all cases except if we add all tasks to a Or we could put all fapolicyd prepare and cleanup tasks into separate roles or as separate tasks in the playbook which executes sap_hana_install. But separate roles just for that is probably too unusual and too difficult to explain, and the latter puts too much burden on the user. Stopping fapolicyd before running the role is not a good alternative either because it opens an otherwise protected system too much. So maybe an additional warning message related to opening fapolicyd for Ansible is an alternative. |
|
@marcelmamula I am no longer able to reproduce the issue I reported in #1215 (comment). But I found another issue which I would like you to fix as part of this PR, because if users assume that the role has some level of idempotency, they may not be careful enough before running the role against an existing SAP HANA system. In such cases, on RHEL with This must be avoided by default, as it may lead to compromised files to be trusted and later be executed. Can you please modify your code so that the tasks of file |
@berndfinger I have pushed commit with restricted I do believe your original issue from #1215 (comment) still exists, but maybe your host is no longer empty enough to trigger issue.
|
Changes
This pull request is created in alignment with #1213, where strict detection is added. Existing SAP HANA detection was only fairly strict, allowing to see HANA as detected just from files, which is not conclusive.
Detection Approach
New approach uses detection matrix shared with SWPM:
Tests
Tested on SLES_SAP 16.0 on SAP HANA 2.0 SPS08 installation.