For "local-shell-script" runner, on readonly filesystems, don't attempt to run chmod +x on script_action. #6073
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5591.
For
local-shell-script
runners, the runner tries to ensure thescript_action
is executable by running:On readonly filesystems, such as when StackStorm is deployed in HA on Kubernetes - this
chmod +x
command fails:(Note since this command isn't
&&
with the actual action, that still runs fine - there's just an error logged in the action output)This is fixed, by only running this block if the filesystem is read-writeable - by adding the following to the conditional check:
Which returns
True
if the filesystem thatself.entry_point
(which is the script that will attemped to bechmod +x
'ed) is on is readonly, andFalse
otherwise.This fix maintains functionally where there this worked previously (read-writeable fs), while fixing the bug on readonly fs. As per my comment on #5591, I think we should just drop this block all together - but that could be a change in
3.9.0
- for now this fixes the bug without changing anything else. :)