Execute source using /bin/bash not /bin/sh#547
Execute source using /bin/bash not /bin/sh#547shinglerb wants to merge 1 commit intoClusterLabs:mainfrom
Conversation
|
Can one of the admins verify this patch? |
| # POSIX: name shall not contain '=', value doesn't contain '\0' | ||
| output = subprocess.check_output("source {} && env -0".format(env_file), shell=True, | ||
| executable="/bin/sh") | ||
| executable="/bin/bash") |
There was a problem hiding this comment.
in that case, the bash´ism should be removed. /bin/bash is not available on all systems.
There was a problem hiding this comment.
It works fine if you replace "source" with "." (tested with bash, dash and sh on FreeBSD):
output = subprocess.check_output(". {} && env -0".format(env_file), shell=True, executable="/bin/sh")
|
Can one of the admins check and authorise this run please: https://ci.kronosnet.org/job/fence-agents-pipeline/job/PR-547/1/input |
|
It seems like replacing |
|
I can confirm this still causes issues on Ubuntu 24.04, for what it's worth. I ran into it with the fence_openstack agent. Two good resolutions have been suggested, and it seems that determining which one is better needs to be informed by the intention of compatibility:
To sum up, unless I've misunderstood project goals, this PR looks like the right solution. |
|
i have just come here to add my "me too" to the comment from @DEmmons. i have stumbled across the same issue with fence_openstack, and i am also eagerly awaiting a solution that doesn't involve me manually patching fencing.py. :-) per @DEmmons third bullet
if there is reluctance to enact either of the first two options, then it seems that allowing |
Attempting to execute source in /bin/sh doesn't work if /bin/sh isn't bash