Code Monkey home page Code Monkey logo

Comments (10)

rhmk avatar rhmk commented on July 28, 2024

The code that is affected is located here:
roles/sap_swpm/tasks/pre_install/update_etchosts.yml

maybe we can update this with the code from sap_general_preconfigure

from community.sap_install.

rhmk avatar rhmk commented on July 28, 2024

first investigation ansible_fqdn is misunderstood -- use of ansible_domain required. Need to rewoek code for use with sap_ip, sap_domain, sap_hostname.

from community.sap_install.

rhmk avatar rhmk commented on July 28, 2024

Variables that need to be reviewed and its usage:
sap_swpm_fqdn:
sap_swpm_set_fqdn: "true"
sap_swpm_db_ip:
sap_swpm_db_fqdn:
sap_swpm_db_host:

sap_swpm_update_etchosts:

from community.sap_install.

berndfinger avatar berndfinger commented on July 28, 2024

Can you skip modifying /etc/hosts in sap_swpm and just do the modification in sap_general_preconfigure? Or should we modify role sap_general_preconfigure to better support NetWeaver installation?

from community.sap_install.

rhmk avatar rhmk commented on July 28, 2024

the role adds netweaver and HANA into etc/hosts and must be cleaned up. I will skip it in sap_swpm for know !

from community.sap_install.

rhmk avatar rhmk commented on July 28, 2024

sap_swpm_fqdn is misused and should be sap_swpm_domain

from community.sap_install.

rhmk avatar rhmk commented on July 28, 2024

maybe in different places as well

from community.sap_install.

rhmk avatar rhmk commented on July 28, 2024

sap_swpm_fqdn is used in two places:

  1. It sets the variable NW_getFQDN.FQDN in the configfile which expects the domain name
  2. it is used to update the /etc/hosts

It needs to be the domain and not the FQDN, so very misleading usage by SAP

Suggested fix:

  • Document this in defaults/main.yml above the variable and the demo playbooks
  • run several tests in tasks/pre_install/update_etchosts.yml to ensure the variables are set correctly prior to updating /etc/hosts

please comment

from community.sap_install.

berndfinger avatar berndfinger commented on July 28, 2024

All hosts on which HANA or NetWeaver is to be installed need to be preconfigured by role sap_general_preconfigure, and all /etc/hosts modification for either one is already performed by role sap_general_preconfigure. So the only remaining action here is to update /etc/hosts with a valid entry for the database host it is different from the current host, right?

from community.sap_install.

berndfinger avatar berndfinger commented on July 28, 2024

I think we can solve the problem (until we have a new role for setting up /etc/hosts) by the following change in tasks/pre_install/update_etchosts.yml:

  1. Because sap_swpm_fqdn is indeed defined in defaults/main.yml but with variable type NoneType, we replace all "sap_swpm_fqdn is defined" by:
    "sap_swpm_fqdn | type_debug != 'NoneType'"
    "sap_swpm_fqdn | length > 0"
  2. Same for sap_swpm_db_ip and sap_swpm_db_host
  3. Finally, there should be a debug task after each of the two blocks, for warning that despite variable sap_swpm_update_etchosts being set to true, a desired update to /etc/hosts has not been performed because one or more of the conditions in the block had not been met.
    This would be something like:
- name: SAP SWPM Pre Install - Display warning message in case of no update to '/etc/hosts' for HANA
  ansible.builtin.debug:
    msg: "WARN: '/etc/hosts' was not updated for HANA!"
  when:
    ( sap_swpm_db_ip | type_debug == 'NoneType' ) or
    ( sap_swpm_db_ip | length == 0 ) or
    ( sap_swpm_db_host | type_debug == 'NoneType' ) or
    ( sap_swpm_db_host | length == 0 ) or
    ( sap_swpm_db_host == ansible_hostname )

from community.sap_install.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.