Issue with Role-Profile implementation

180 views
Skip to first unread message

Varun Utagikar

unread,
Jul 9, 2014, 4:59:40 AM7/9/14
to puppet...@googlegroups.com
Hello

I am trying to implement role-profile structure . I have referred below mentioned docs/links :


I have hit a brick wall. I am trying to pull a file on an agent from a master where I have defined a sample role and profile structure. I have tested using Puppet 3.6.2 , Puppet 3.6.1 and the free enterprise version of Puppet. I am getting the same error :

<agentsnip>
Error: /Stage[main]/Siler/File[/tmp/a]: Could not evaluate: Could not retrieve file metadata for puppet:///puppet/modules/siler/a: Error 400 on SERVER: Not authorized to call find on /file_metadata/puppet/modules/siler/a with {:links=>"follow", :source_permissions=>"ignore"}
Wrapped exception:
Error 400 on SERVER: Not authorized to call find on /file_metadata/puppet/modules/siler/a with {:links=>"follow", :source_permissions=>"ignore"}
</agentsnip>

<mastersnip>
Debug: Evaluating match for Route /^\/v2\.0/
Debug: Did not match path ("/production/file_metadata/puppet/modules/siler/a")
Debug: Evaluating match for Route /.*/
Error: Not authorized to call find on /file_metadata/puppet/modules/siler/a with {:links=>"follow", :source_permissions=>"ignore"}
Debug: Routes Registered:
Debug: Route /^\/v2\.0/
</mastersnip>

My puppet dir. hierarchy :

puppet/
├── auth.conf
├── environments
│   └── example_env
│       ├── manifests
│       ├── modules
│       └── README.environment
├── fileserver.conf
├── manifests
│   ├── nodes
│   │   └── pu.pp
│   └── site.pp
├── modules
│   ├── profile
│   │   └── manifests
│   │       └── init.pp
│   ├── role
│   │   └── manifests
│   │       └── init.pp
│   ├── siler
│   │   ├── file
│   │   │   ├── a
│   │   │   ├── b
│   │   │   ├── c
│   │   │   ├── d
│   │   │   └── e
│   │   └── manifests
│   │       └── init.pp
│   └── xyz
│       ├── files
│       │   └── xyz
│       └── manifests
│           └── init.pp
└── puppet.conf

I am attaching my sample manifest files. 
I am using CentOS 6.3 x86_64 on both master and agent.
# uname -a
Linux puppet.example.in 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 6.3 (Final)

I am using /etc/hosts file for name resolution.

I tried in vain all the troubleshooting steps that i could find . I am not sure whether its just a simple configuration issue or a bug. I am unable to troubleshoot further due to non availability of documentation on role-profile definitions.I request you to help me in sorting this out.

Varun A Utagikar
p.s. - Sorry for the long mail.
puppet_issue.tar

Daniel De Marco

unread,
Jul 9, 2014, 9:45:22 AM7/9/14
to puppet...@googlegroups.com
Varun,

the files directory under siler should be named files, not file.

Daniel.

* Varun Utagikar <varun.u...@gmail.com> [07/09/2014 08:30]:
> --
> 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 [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/acba6f33-34da-420b-a638-9837ca0d16d4%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/acba6f33-34da-420b-a638-9837ca0d16d4%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

> -rw-r--r-- puppet/puppet 20 2014-07-07 05:35 etc/puppet/manifests/site.pp
> -rw-r--r-- puppet/puppet 124 2014-07-08 08:23 etc/puppet/manifests/nodes/pu.pp
> -rw-r--r-- root/root 42 2014-07-08 08:23 etc/puppet/modules/profile/manifests/init.pp
> -rw-r--r-- root/root 41 2014-07-08 08:22 etc/puppet/modules/role/manifests/init.pp
> -rwxrwxrwx root/root 152 2014-07-08 08:42 etc/puppet/modules/siler/manifests/init.pp

Varun Utagikar

unread,
Jul 9, 2014, 10:45:00 PM7/9/14
to puppet...@googlegroups.com
Hey Daniel

I was performing several changes to trouble shoot the issue , some where i must have renamed the dir to file , here's my o/p after reverting to the mentioned 'files' change :

/etc/puppet/
├── auth.conf
├── environments
│   └── example_env
│       ├── manifests
│       ├── modules
│       └── README.environment
├── fileserver.conf
├── manifests
│   ├── nodes
│   │   └── pu.pp
│   └── site.pp
├── modules
│   ├── profile
│   │   └── manifests
│   │       └── init.pp
│   ├── role
│   │   └── manifests
│   │       └── init.pp
│   ├── siler
│   │   ├── files
│   │   │   ├── a
│   │   │   ├── b
│   │   │   ├── c
│   │   │   ├── d
│   │   │   └── e
│   │   └── manifests
│   │       └── init.pp
│   └── xyz
│       ├── files
│       │   └── xyz
│       └── manifests
│           └── init.pp
└── puppet.conf

<mastersnip>
Debug: Evaluating match for Route /^\/v2\.0/
Debug: Did not match path ("/production/file_metadata/puppet/modules/siler/a")
Debug: Evaluating match for Route /.*/
Error: Not authorized to call find on /file_metadata/puppet/modules/siler/a with {:links=>"follow", :source_permissions=>"ignore"}
Debug: Routes Registered:
</mastersnip>

<agentsnip>
Debug: file_metadata supports formats: pson yaml b64_zlib_yaml raw
Error: /Stage[main]/Siler/File[/tmp/a]: Could not evaluate: Could not retrieve file metadata for puppet:///puppet/modules/siler/a: Error 400 on SERVER: Not authorized to call find on /file_metadata/puppet/modules/siler/a with {:links=>"follow", :source_permissions=>"ignore"}
Wrapped exception:
Error 400 on SERVER: Not authorized to call find on /file_metadata/puppet/modules/siler/a with {:links=>"follow", :source_permissions=>"ignore"}
Debug: Finishing transaction 69946493782000
</agentsnip>

Issue still persists.

Varun Utagikar

unread,
Jul 10, 2014, 12:04:50 AM7/10/14
to puppet...@googlegroups.com
Adding to my below post , I would like to inform that I upgraded the kernel to CentOS 6.5 X86_64

[root@puppet ~]# uname -a
Linux puppet.xoriant.in 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Issue still persists

José Luis Ledesma

unread,
Jul 10, 2014, 3:53:49 AM7/10/14
to puppet...@googlegroups.com

You should specify
puppet://puppet/modules/...
or
puppet:///modules/...

Regards,

To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/df431132-8779-4b99-b3ac-7d4c470060aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Varun Utagikar

unread,
Jul 10, 2014, 5:26:11 AM7/10/14
to puppet...@googlegroups.com
Thanks Jose Luis Ledesma 

That helped , i dont know how/why i committed that error , I think should be more cautious while writing my modules.
Reply all
Reply to author
Forward
0 new messages