Ask Your Question

How to serve files from custom mount point?

asked 2013-09-04 03:27:24 -0600

deric gravatar image

updated 2013-09-28 17:39:30 -0600

Serving files from puppet:///modules/{module_name} works for me, however when I try to get file from custom mount point it fails.


   path /etc/puppet/files
   allow *

   allow *

   path /etc/puppet/munin-plugins
   allow *


path /file
allow *

module code:

  $real_source = $source ? {
      ''      =>  "munin/plugins/${plugin_src}",
      default => $source

  file { "munin_plugin_${name}":
    path    => "${munin::plugin::scriptpaths::script_path}/${name}",
    source  => "puppet:///${mountpoint}/${real_source}",
    owner   => root,
    group   => 0,
    mode    => '0755';


  munin::plugin::deploy { 'redis_':
    source     => 'redis-munin/redis_memory_',
    mountpoint => 'munin-plugins'

full path to the file: /etc/puppet/munin-plugins/redis-munin/redis_memory_

I keep getting error 400:


  /Stage[main]//Node ...
edit retag flag offensive close merge delete


Are those the complete fileserver.conf and auth.conf files? If not, can you post the entire contents of each?

GregLarkin gravatar imageGregLarkin ( 2013-09-04 07:21:42 -0600 )edit

`auth.conf` is the default version, I guess. It's pretty long, so here's the link:

deric gravatar imagederic ( 2013-09-04 10:51:43 -0600 )edit

Please post the .pp file that uses the custom mountpoint, too.

GregLarkin gravatar imageGregLarkin ( 2013-09-04 20:18:47 -0600 )edit

I've updated the question

deric gravatar imagederic ( 2013-09-05 03:21:24 -0600 )edit

What is `real_source` in your module code? Is it different than the `source` parameter you are passing to your `munin::plugin::deploy` define?

Stefan gravatar imageStefan ( 2013-09-08 08:41:08 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2016-10-17 20:04:13 -0600

In case someone else stumbles here looking for the correct answer, add the following to your auth.conf:

path ~ ^/file_(metadata|content)s?/munin-plugins/
auth any
allow *
edit flag offensive delete link more

answered 2013-09-04 10:25:19 -0600

Ancillas gravatar image

Make sure the permissions on /etc/puppet/munin-plugins, and its children, are set appropriately so that the user that Puppet runs as has access.

edit flag offensive delete link more


The permissions are the same as for all the modules. I don't think that should cause any troubles.

deric gravatar imagederic ( 2013-09-04 10:52:49 -0600 )edit

answered 2013-09-04 20:27:51 -0600

GregLarkin gravatar image

Please add this stanza before line 72 in your auth.conf and report back here if it works or not:

path ~ ^/file_(metadata|content)/munin-plugins/
allow *
edit flag offensive delete link more


still the same error: `Not authorized to call find on /file_metadata/munin-plugins/redis-munin/redis_memory_ with {:links=>"manage"}`

deric gravatar imagederic ( 2013-09-05 03:22:29 -0600 )edit

Just to be 100% sure, did you add those lines before the "path /file" line in the file?

GregLarkin gravatar imageGregLarkin ( 2013-09-05 14:39:50 -0600 )edit

Also, what version of Puppet are you using, and is it a fresh install or an upgrade from a previous version?

GregLarkin gravatar imageGregLarkin ( 2013-09-05 17:26:38 -0600 )edit

Yes, it was before "path /file". I have puppet 3.2.4, but it was upgraded from 2.7 I guess. Are the default auth.conf and fileserver.conf very ...(more)

deric gravatar imagederic ( 2013-09-06 15:56:57 -0600 )edit

answered 2013-09-09 08:15:58 -0600

Simon gravatar image

Doe it work with "auth any"?

path ~ ^/file_(metadata|content)/munin-plugins/
auth any
allow *
edit flag offensive delete link more


No, it doesn't help. Is there a way how to print directories where is puppet searching for files? In case when path `puppet:///modules` is used I don't ...(more)

deric gravatar imagederic ( 2013-09-16 08:26:04 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-09-04 03:27:24 -0600

Seen: 1,140 times

Last updated: Oct 17 '16