Closed tbludau closed 2 years ago
Yeah, we could add pre-checks, but won't this approach make the "code" more complex? Ansible has the mechanism to report errors by itself (i.e. don't need to code if a file exists check as Ansible will generate a failure itself) Won't the HANA installer do the same? Generate an error if the instance already exists? As long this is not causing errors on the existing deployment I don't see any good reason to code a custom error in the role to handle that?
What are your thoughts?
Tested this already and the installer is just reporting an error but not damaging existing installation:
"stdout": "\n\nSAP HANA Lifecycle Management - SAP HANA Database 2.00.045.00.1575639312\n************************************************************************\n\n\nScanning software locations...\nDetected components:\n SAP HANA Database (2.00.045.00.1575639312) in /usr/local/src/SAP_HANA_DATABASE/server\nLog file written to '/var/tmp/hdb_SLE_hdblcm_install_2020-01-22_05.44.20/hdblcm.log' on host 'rhel-target-02'.",
"stderr": "Configuration error (batch mode):\n SAP HANA System ID 'SLE' is already in use by a SAP HANA Database instance!",
"rc": 1,
Added Pull request for this issue
@tbludau @rhmk I also checked and found that the HANA installer (I tested SPS05) fails early with a useful error message in case it detects an already existing HANA installation. So this confirms what @makentenza already mentioned above. On the other hand, I like the idea of the role being able to report if it detects a possible conflict. We may consider creating a role which is collecting SAP system and instance information only and feed this information into any role which is installing SAP software. Any comments?
Closing this issue, as it is fixed in https://github.com/sap-linuxlab/community.sap_install/blob/main/roles/sap_hana_install, see https://github.com/sap-linuxlab/community.sap_install/blob/c8ba401294c0d17cefaf4083251baa1bc1a0b224/roles/sap_hana_install/tasks/hana_exists.yml .
Note: Development and maintenance of this software has stopped.
Its functional scope is covered and expanded by role sap_hana_install. The role is part of Ansible Collection sap_install in the GitHub organization sap-linuxlab, which is a joint initiative by SAP Technology Partners.
We had a check (creating the /usr/sap/{{ item.value.hana_sid|upper }}/HDB{{ item.value.hana_instance_number }}/exe/hdbdaemon file) if a hana instance already installed on the system. This is gone in the new version. We also planned a second check based on the sap host agent to check it two times if a hana instance with the same parameters were installed. (but i think it was not integrated.)
could this be also integrated in the next versions?