Comments (10)
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.
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.
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.
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.
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.
sap_swpm_fqdn is misused and should be sap_swpm_domain
from community.sap_install.
maybe in different places as well
from community.sap_install.
sap_swpm_fqdn is used in two places:
- It sets the variable
NW_getFQDN.FQDN
in the configfile which expects the domain name - 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.
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.
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
:
- Because
sap_swpm_fqdn
is indeed defined indefaults/main.yml
but with variable typeNoneType
, we replace all"sap_swpm_fqdn is defined"
by:
"sap_swpm_fqdn | type_debug != 'NoneType'"
"sap_swpm_fqdn | length > 0"
- Same for
sap_swpm_db_ip
andsap_swpm_db_host
- Finally, there should be a debug task after each of the two blocks, for warning that despite variable
sap_swpm_update_etchosts
being set totrue
, 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)
- sap_hana_preconfigure: handlers do not work with block
- sap_netweaver_preconfigure: verify compatibility with the applicable SAP notes for Adobe Document Services
- Dependency outdated in requirements-workflow.txt: ansible:9.1.0 -> 9.4.0 HOT 1
- Dependency outdated in requirements-workflow.txt: ansible-core:2.16.2 -> 2.16.5 HOT 1
- sap_hana_preconfigure: fail saptune verify on SLES4SAP 15 SP5 on Azure E20s_v5 HOT 4
- sap_general_preconfigure: false duplicates in /etc/hosts due to partial matching HOT 1
- sap_swpm: advanced mode inifile inorect build HOT 5
- sap_install_media_detect: incorrect detection of file JAVA export file HOT 1
- sap_install_media_detect: Kernel info files in download basket incorrectly counted as kernel duplicates HOT 1
- collection: No sample var file for AAS installation
- sap_maintain_etc_hosts: Fail if there is more than one line containing the same IPv4 address
- sap_swpm: Add option to enable observer mode in sap_swpm role HOT 8
- Dependency outdated in requirements-workflow.txt: ansible==9.1.0 -> 9.6.0 HOT 2
- Dependency outdated in requirements-workflow.txt: ansible-compat==4.1.10 -> 24.6.0 HOT 2
- Dependency outdated in requirements-workflow.txt: ansible-core==2.16.2 -> 2.17.0 HOT 1
- Dependency outdated in requirements-workflow.txt: ansible-lint==6.22.1 -> 24.5.0 HOT 2
- Workflows: Sanity workflow aborts with "invalid escape sequence" HOT 2
- Workflows: galaxy-importer fails due to missing module community.general.pids HOT 2
- sap_swpm: No longer require module community.general.pids
- sap_swpm: Argument list can be too long when setting file permissions HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community.sap_install.