puppetserver custom mount Error 400

32 views
Skip to first unread message

ch...@netki.com

unread,
Aug 7, 2016, 9:58:59 PM8/7/16
to Puppet Users
Hello all, I'm trying to get a custom mount point working and have been chasing my tail -- hoping someone has some fresh ideas to lend or sees something obvious I missed here?
Thank you!!
-chet
------------
puppetserver 4.5.3 from puppet-collections-rc1

# custom mount point & file we are using for testing:
/home/admin/ops/configs/production/service/file.conf

# fileserverconfig = /etc/puppetlabs/puppet/fileserver.conf
[service]
    path /home/admin/ops/configs/production/service
    allow *

# the manifest:
node testnode01 {
file { '/etc/service/file.conf':
ensure => present,
source => "puppet:///service/file.conf",
}
}

# on testnode01 run:
'puppet agent -t --noop'

#the output:
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Applying configuration version '1470528025'
Error: /Stage[main]/Main/Node[testnode01]/File[/etc/service/file.conf]: Could not evaluate: Could not retrieve file metadata for puppet:///service/file.conf: Error 400 on SERVER: Not authorized to call find on /file_metadata/service/file.conf with {:rest=>"service/file.conf", :links=>"manage", :checksum_type=>"md5", :source_permissions=>"ignore"}

# /etc/puppetlabs/puppet/puppet.conf:
[main]
  dns_alt_names = puppet, puppet.test.domain
  rest_authconfig = /etc/puppetlabs/puppetserver/conf.d/auth.conf
  log_level = debug
[master]
  vardir = /opt/puppetlabs/server/data/puppetserver
  logdir = /var/log/puppetlabs/puppetserver
  rundir = /var/run/puppetlabs/puppetserver
  pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
  codedir = /etc/puppetlabs/code
  dns_alt_names = puppet, puppet.test.domain

# extra 'puppet config print' info
config_file_name = puppet.conf
config = /etc/puppetlabs/puppet/puppet.conf
rest_authconfig = /etc/puppetlabs/puppetserver/conf.d/auth.conf
fileserverconfig = /etc/puppetlabs/puppet/fileserver.conf

# other configs
#/etc/puppetlabs/puppetserver/conf.d/puppetserver.conf: (default) +use-legacy-auth-conf: false
#/etc/puppetlabs/puppetserver/conf.d/auth.conf: (default)  

# puppetserver.log:
2016-08-07 00:34:23,478 DEBUG [qtp327710486-24] [p.r.core] Processing :get /puppet/v3/file_metadata/service/file.conf
2016-08-07 00:34:23,483 DEBUG [qtp327710486-24] [puppetserver] Puppet Evaluating match for Route /^\/puppet\//
2016-08-07 00:34:23,483 DEBUG [qtp327710486-24] [puppetserver] Puppet Evaluating match for Route /v3/
2016-08-07 00:34:23,484 DEBUG [qtp327710486-24] [puppetserver] Puppet Evaluating match for Route /^\/environments$/
2016-08-07 00:34:23,484 DEBUG [qtp327710486-24] [puppetserver] Puppet Did not match path ("/file_metadata/service/file.conf")
2016-08-07 00:34:23,484 DEBUG [qtp327710486-24] [puppetserver] Puppet Evaluating match for Route /\/environment\/[^\/]+$/
2016-08-07 00:34:23,485 DEBUG [qtp327710486-24] [puppetserver] Puppet Did not match path ("/file_metadata/service/file.conf")
2016-08-07 00:34:23,485 DEBUG [qtp327710486-24] [puppetserver] Puppet Evaluating match for Route /.*/
2016-08-07 00:34:23,485 DEBUG [qtp327710486-24] [puppetserver] Puppet Evicting cache entry for environment 'production'
2016-08-07 00:34:23,486 DEBUG [qtp327710486-24] [p.s.j.puppet-environments] Removing environment 'production' from registry
2016-08-07 00:34:23,488 DEBUG [qtp327710486-24] [p.s.j.puppet-environments] Registering environment 'production'
2016-08-07 00:34:23,488 DEBUG [qtp327710486-24] [puppetserver] Puppet Caching environment 'production' (ttl = 0 sec)
2016-08-07 00:34:23,501 ERROR [qtp327710486-24] [puppetserver] Puppet Not authorized to call find on /file_metadata/service/file.conf with {:rest=>"service/file.conf", :links=>"manage", :checksum_type=>"md5", :source_permissions=>"ignore"}

Rob Nelson

unread,
Aug 7, 2016, 10:21:08 PM8/7/16
to puppet...@googlegroups.com
Chet,

It looks like you have followed the directions at https://docs.puppet.com/puppet/4.5/reference/file_serving.html, but it's unclear if you checked the permissions of the path to make sure the puppet user can read it. Also, I am guessing that you need to restart puppetserver, though the page doesn't say one way or the other.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/867ae5d1-abb1-43f6-8a3c-7ede08fcce3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Josh Sinfield

unread,
Aug 8, 2016, 8:32:14 AM8/8/16
to Puppet Users
Hi Chet,
As Rob has stated - make sure the user that the Puppet master process is running as has permission to read + execute.

Cheers,
Josh

ch...@netki.com

unread,
Aug 9, 2016, 4:14:47 AM8/9/16
to Puppet Users
The permissions of the dirs on the path to the file indeed were correct with +x 
In the end, I went and yum removed the install, deleted the /etc/puppet* and /opt/puppet* dirs and reinstalled. 
 
Everything seems to be working as expected now, which is perplexing (and a little frustrated, considering the time spent without finding the root cause hah) but I'll be content with getting back on track.
Thanks for your replies! 
Reply all
Reply to author
Forward
0 new messages