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_swpm: unhandled exception when using sap_swpm_swpm_observer_mode... #792

Open
berndfinger opened this issue Jul 5, 2024 · 2 comments

Comments

@berndfinger
Copy link
Member

... and not defining sap_swpm_swpm_remote_access_user.

The error occurs in task SAP SWPM Pre Install - Set sapinst command. The complete error message is:

fatal: [host01]: FAILED! => msg: 'An unhandled exception occurred while templating ''{{ ''SAPINST_REMOTE_ACCESS_USER='' + sap_swpm_swpm_remote_access_user + '' SAPINST_REMOTE_ACCESS_USER_IS_TRUSTED=true'' if sap_swpm_swpm_observer_mode and sap_swpm_swpm_remote_access_user is defined and sap_swpm_swpm_remote_access_user | length > 0 else '''' }}''. Error was a <class ''ansible.errors.AnsibleError''>, original message: Unexpected templating type error occurred on ({{ ''SAPINST_REMOTE_ACCESS_USER='' + sap_swpm_swpm_remote_access_user + '' SAPINST_REMOTE_ACCESS_USER_IS_TRUSTED=true'' if sap_swpm_swpm_observer_mode and sap_swpm_swpm_remote_access_user is defined and sap_swpm_swpm_remote_access_user | length > 0 else '''' }}): object of type ''NoneType'' has no len(). object of type ''NoneType'' has no len()'

The error does not happen when sap_swpm_swpm_remote_access_user is defined, e.g. as 'root' or ''.

I have not yet been able to reproduce this issue with a simple yml test file which contains just this task.

The related PR is #749 .

The ansible version is ansible [core 2.16.7], with jinja version = 3.1.4 and python version 3.12.3

@rob0d
Copy link
Contributor

rob0d commented Aug 15, 2024

Sorry for the delay @berndfinger . I'll have a look next week.

@rob0d
Copy link
Contributor

rob0d commented Aug 30, 2024

I was able to replicate this.

rob0d pushed a commit to rob0d/community.sap_install that referenced this issue Aug 30, 2024
rob0d pushed a commit to rob0d/community.sap_install that referenced this issue Aug 30, 2024
rob0d pushed a commit to rob0d/community.sap_install that referenced this issue Sep 2, 2024
…ed, but empty and observer mode is on (lint fixes)
berndfinger added a commit that referenced this issue Sep 3, 2024
sap_swpm:  fix issue #792 - error when observer user defined, but empty and observer mode is on
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