Serving files from custom mount point in Puppet 4

519 views
Skip to first unread message

mohammad kashif

unread,
Jan 11, 2016, 4:57:34 AM1/11/16
to puppet-users
Hi

Is serving files from custom mount point depreciated in puppet 4? I configured fileserver.conf file in same way as  in puppet 3 but it is not working. I could not find any explicit statement in puppet 4 documents about custom mount points. Has any one managed to serve from custom mount point in puppet 4?

Thanks

Kashif

Eric Sorenson

unread,
Jan 11, 2016, 12:38:41 PM1/11/16
to Puppet Users
It is not deprecated at all.

Can you please post your configuration (fileserver.conf, auth.conf, and the puppet manifest which causes the error) along with the exact error messages?

--eric0

kashif

unread,
Jan 12, 2016, 9:21:47 AM1/12/16
to Puppet Users
Hi Eric

rpm -qa | grep puppet
puppet-agent-1.3.2-1.el6.x86_64
puppetlabs-release-pc1-1.0.0-1.el6.noarch
puppetserver-2.2.1-1.el6.noarch

cat /etc/puppetlabs/puppet/fileserver.conf

[site_files]
   path /etc/puppetlabs/codes/files
   allow *

I haven't changed auth.conf file
cat /etc/puppetlabs/puppetserver/conf.d/auth.conf

....

 {
            # Allow nodes to access all file services; this is necessary for
            # pluginsync, file serving from modules, and file serving from
            # custom mount points (see fileserver.conf). Note that the `/file`
            # prefix matches requests to file_metadata, file_content, and
            # file_bucket_file paths.
            match-request: {
                path: "/puppet/v3/file"
                type: path
            }
            allow: "*"
            sort-order: 500
            name: "puppetlabs file"
        },
...

Test manifest

file { '/root/puppet_test':
   source => "puppet:///site_files/puppet-test",
   ensure => present,
 }

Error
Puppet Not authorized to call find on /file_metadata/site_files/puppet-test with {:links=>"manage", :checksum_type=>"md5", :source_permissions=>"ignore", :rest=>"site_files/puppet-test"

Thanks

Kashif

Eric Sorenson

unread,
Jan 13, 2016, 2:59:02 PM1/13/16
to puppet...@googlegroups.com
On Jan 12, 2016, at 6:21 AM, kashif <kashi...@gmail.com> wrote:

Hi Eric

rpm -qa | grep puppet
puppet-agent-1.3.2-1.el6.x86_64
puppetlabs-release-pc1-1.0.0-1.el6.noarch
puppetserver-2.2.1-1.el6.noarch

cat /etc/puppetlabs/puppet/fileserver.conf

[site_files]
   path /etc/puppetlabs/codes/files
   allow *


This should be /etc/puppetlabs/code/files ...


I haven't changed auth.conf file
cat /etc/puppetlabs/puppetserver/conf.d/auth.conf

 [ ... ]

Test manifest

file { '/root/puppet_test':
   source => "puppet:///site_files/puppet-test",
   ensure => present,
 }

Error
Puppet Not authorized to call find on /file_metadata/site_files/puppet-test with {:links=>"manage", :checksum_type=>"md5", :source_permissions=>"ignore", :rest=>"site_files/puppet-test"


This message is on the agent, there should be a corresponding message in the server logs -- can you include that if you still have trouble after fixing the 'codes' -> 'code' path in fileserver.conf?

Eric Sorenson - eric.s...@puppetlabs.com - freenode #puppet: eric0
puppet platform // coffee // techno // bicycles

kashif

unread,
Jan 18, 2016, 10:13:12 AM1/18/16
to Puppet Users
Thanks Eric


> This should be /etc/puppetlabs/code/files ...

Oops, sorry for the noise

Cheers

Kashif
Reply all
Reply to author
Forward
0 new messages