Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

needs_write_access param in prm-config.yml not implemented #79

Open
sanfrancrisko opened this issue Dec 22, 2021 · 0 comments
Open

needs_write_access param in prm-config.yml not implemented #79

sanfrancrisko opened this issue Dec 22, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@sanfrancrisko
Copy link

If you have a tool with needs_write_access undefined or set to false, the tool is built and the codepath mounted to /code in the container with RW permissions:

---
plugin:
  author: puppetlabs
  id: foo
  display: foo
  version: 0.1.0
  upstream_project_url: https://example.com/foo
prm exec puppetlabs/foo --toolArgs="apply -e ' file { "/code/foo": ensure => "present", }'

The tool should exit with an error as Puppet should not be able to write to /code, with something like this:

Notice: Compiled catalog for ciarans-macbook-pro.local in environment production in 0.02 seconds
Warning: /Stage[main]/Main/File[/code/foo]: Could not stat; permission denied
Error: Could not set 'present' on ensure: Permission denied @ rb_sysopen - /code/foo (line: 1)
Error: Could not set 'present' on ensure: Permission denied @ rb_sysopen - /code/foo (line: 1)
Wrapped exception:
Permission denied @ rb_sysopen -/code/foo
Error: /Stage[main]/Main/File[/code/foo]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: Permission denied @ rb_sysopen - /code/foo (line: 1)
Notice: Applied catalog in 0.01 seconds

Instead, the containerised Puppet instance succeeds in creating a file at /code/foo

@sanfrancrisko sanfrancrisko added the bug Something isn't working label Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant