Skip to content
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

Suggest noexec may be an issue if the task is not executable for local transport #3329

Open
abottchen opened this issue Jun 26, 2024 · 1 comment
Labels
Feature New features and improvements.

Comments

@abottchen
Copy link

Use Case

If a user has noexec set on their tmp directory, bolt tasks will fail to execute.

When using the ssh transport, the error in this situation is very clear:

Failed on remote-system:
  The task failed with exit code 126 and no stdout, but stderr contained:
  sh: line 1: /tmp/f950023f-a3ff-40d0-88e2-a5296f280922/puppet_agent/tasks/install_shell.sh: Permission denied


  This might be caused by the default tmpdir being mounted using 'noexec'. See http://pup.pt/task-failure for details and workarounds.
Failed on 1 target: remote-system
Ran on 1 target

But not when the local transport is used:

Failed on localhost:
  Permission denied - /tmp/091d252f-bffb-44b5-b283-bc8b12a49b7f/pkcs7/tasks/secret_createkeys.rb
Failed on 1 target: localhost
Ran on 1 target

Describe the Solution You Would Like

The same informative error message returned when using the ssh transport should be present for the local transport.

Additional Context

The error message improvement that is in place for the ssh transport was in dontlaugh@83acfd4.

@abottchen abottchen added the Feature New features and improvements. label Jun 26, 2024
@donoghuc
Copy link
Member

Looks doable, might be nice to add the same trace debugging too there for the open3 command on local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New features and improvements.
Projects
None yet
Development

No branches or pull requests

2 participants