Open slubb opened 1 year ago
Hi @slubb , the error occurs because these Ansible Tasks statically use /tmp
.
Can you provide justification why you want to change the Temporary Directory for the installation, and why /usr/sap/tmp
(which should really be reserved <sid>adm
processes)?
I am unsure whether adding a variable to switch the Temporary Directory is a good idea. I would need convincing.
I have a customer and the have mounted their /tmp
on noexec
. This fails the default installation. If I change the TEMP
it goes fine except for the hardcoded parts. I've started internal investigations why this is mounted like that, but it's still silent from that part. Don't know if the noexec
part is convincing enough ;-) ?
@slubb looks like there is no guidance from SAP on this topic, all we have is SAP Note 2063079 - "Child has signaled an exec error (-138)" and "Permission Denied" - Error to extract SWPM
Will ask someone from Red Hat or SUSE to comment. If I recall correctly, /tmp
is frequently set by default as noexec
when installing from ISO of either OS.
Same issue here. VM hardening mandate noexec on temp folders. What about a pre and post task to change them while the install is in flight?
@wuftymerguftyguff That would probably be considered a security vulnerability to make that alteration as part of the code. This GH Issue still needs comment from SUSE or Red Hat.
In that case I think that the static use of /tmp needs to be removed to allow the adoption of the guidance in 2063079
Solution might be to use variable ansible_env (collected as part of ansible facts) instead of hard coding '/tmp'. As per SAP documentation $TEMP is used to place sapinst_instdir, not /tmp
So this is indeed an issue - because role does not support standard SAP functionality.
@berndfinger is this still open issue?
I'm installing SAP using a different
TEMP
directory:Installation works as expected however there are 2 issues:
TASK [community.sap_install.sap_swpm : SAP SWPM - Find last installation location] *** fatal: [xxhost]: FAILED! => { "changed": false, "cmd": [ "cat", "/tmp/sapinst_instdir/.lastInstallationLocation" ], "delta": "0:00:00.008100", "end": "2023-03-17 12:14:35.335597", "msg": "non-zero return code", "rc": 1, "start": "2023-03-17 12:14:35.327497", "stderr": "cat: /tmp/sapinst_instdir/.lastInstallationLocation: No such file or directory", "stderr_lines": [ "cat: /tmp/sapinst_instdir/.lastInstallationLocation: No such file or directory" ], "stdout": "", "stdout_lines": [] }