-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
"local-shell-script" does not work on read only file systems #5591
Comments
This may present itself in HA, but the bug cannot be addressed in the helm chart. The action runner needs to be modified to support read only file systems and skip chmod in that case. |
How the scripts would run if they had no executable bit before and chmod is required? @anrajme does it still complain if you make the scripts executable in advance? |
@cognifloyd - absolutely..! @armab - yeah, tried that approach. Though the scripts already have exec permission enabled, the runner tries to "chmod +x" every time it executes. Maybe we can add a condition to the action runner code to verify the permission and try chmod only if the exec bits are not enabled. In that case, we can set the file permission in advance before creating st2 pack image and ensure this step will be passed. I'm still learning, wondering whether this is the right piece of code for that. In the interim, I'm planning to switch to a python-script runner to get things going. cheers! |
@anrajme For sure, the condition to skip chmod +x when the executable bit is already set makes perfect sense 👍 |
Just hit this myself. Although I do question why we'd want to run Unless of course I am missing the situation, where there may be a file being ran, thats user provided and not in the pack itself, and thus needs permissions set at run time? Then again, if the file system is read-only - only files present in the installed pack could be used, and there wouldn't be a way for the user provide this theoretical file.. |
SUMMARY
While using the action runner type "local-shell-script", the action always try to set execute permission for the action script before the execution.
For example, action runner logs for the core.sendmail action
This "chmod +x " operation cause failure when you are using stackstorm-ha helm chart based deployment with an immutable file system for packs.
https://docs.stackstorm.com/install/k8s_ha.html#method-1-st2packs-images-the-default
For example, my custom pack deployed via the st2pack image method fails to run the action since the "chmod +x" instruction cannot be executed on a read-only file system.
Logs:
I guess it's failing because of the condition mentioned here below for the local shell script runner.
https://github.com/StackStorm/st2/blob/master/contrib/runners/local_runner/local_runner/base.py#L121
STACKSTORM VERSION
OS, environment, install method
stackstorm-ha helm deployed k8s environment running on EKS cluster
Steps to reproduce the problem
Follow the method mentioned here to deploy a custom st2 pack image and try to execute the action with runner type as "local-shell-script"
https://docs.stackstorm.com/install/k8s_ha.html#method-1-st2packs-images-the-default
Expected Results
The action executes fine without a "chmod: changing permissions of '/opt/stackstorm/packs/custom-pack/actions/custom-script.sh': Read-only file system" failure and return the results.
Actual Results
Thanks!
The text was updated successfully, but these errors were encountered: