For "local-shell-script" runner, on readonly filesystems, don't attempt to run chmod +x on script_action.#6073
Merged
arm4b merged 2 commits intoStackStorm:masterfrom Nov 28, 2023
Merged
Conversation
arm4b
approved these changes
Nov 27, 2023
Member
arm4b
left a comment
There was a problem hiding this comment.
Looks good, thanks for the fix!
nzlosh
approved these changes
Nov 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-scriptrunners, the runner tries to ensure thescript_actionis executable by running:On readonly filesystems, such as when StackStorm is deployed in HA on Kubernetes - this
chmod +xcommand 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
Trueif the filesystem thatself.entry_point(which is the script that will attemped to bechmod +x'ed) is on is readonly, andFalseotherwise.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. :)