Eric Snow
2010-Dec-10 03:12 UTC
[Puppet Users] some files are getting errors during source => "puppet:///..."
I get the following error: ... Failed to retrieve current state of resource: Could not retrieve information from source(s) ... My understanding is that the file server had trouble pulling the metadata for the file (on the server side). This could be due to a connectivity issue, or a permissions issue. What other reasons are there? Does the target affect it as well? Where in the puppet code does all this happen? (for instance that error is coming from type/ file/source.rb, so what gets to that code?). I have verified all my permissions (both of files and directories). All the connections are fine. However, some of my files work fine and others do not. The same files in both cases, every time. The files that work are ones that were done back when I had one modules directory in my module_path. However, now I have several. The ones that are in modules I have added since I split my modules directories are the ones that do not work. The old ones work even though I moved them into the new modules directories. This is driving me crazy. Any thoughts? -eric -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Eric Snow
2010-Dec-10 18:17 UTC
[Puppet Users] Re: some files are getting errors during source => "puppet:///..."
I just tried using the REST API to pull the file metadata and noticed that the environment is not part of the API for files: http://docs.puppetlabs.com/guides/rest_api.html Does that mean that it will not respect my environments for the following: file { ''test'': source => ''puppet:///modules/somemodule/test'' } If not then which "environment" from the puppet.conf does it use? [main]? Thanks. -eric On Dec 9, 8:12 pm, Eric Snow <es...@verio.net> wrote:> I get the following error: > > ... Failed to retrieve current state of resource: Could not retrieve > information from source(s) ... > > My understanding is that the file server had trouble pulling the > metadata for the file (on the server side). This could be due to a > connectivity issue, or a permissions issue. What other reasons are > there? Does the target affect it as well? Where in the puppet code > does all this happen? (for instance that error is coming from type/ > file/source.rb, so what gets to that code?). > > I have verified all my permissions (both of files and directories). > All the connections are fine. However, some of my files work fine and > others do not. The same files in both cases, every time. > > The files that work are ones that were done back when I had one > modules directory in my module_path. However, now I have several. > The ones that are in modules I have added since I split my modules > directories are the ones that do not work. The old ones work even > though I moved them into the new modules directories. > > This is driving me crazy. Any thoughts? > > -eric-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Eric Snow
2010-Dec-10 19:36 UTC
[Puppet Users] Re: some files are getting errors during source => "puppet:///..."
So it looks like that doc is misleading. It would help if there were a curl example for the API request for files... As it is, it may be that the environment is factored in after all. Still trying to figure it out. Any ideas would be great! -eric On Dec 10, 11:17 am, Eric Snow <es...@verio.net> wrote:> I just tried using the REST API to pull the file metadata and noticed > that the environment is not part of the API for files: > > http://docs.puppetlabs.com/guides/rest_api.html > > Does that mean that it will not respect my environments for the > following: > > file { ''test'': > source => ''puppet:///modules/somemodule/test'' > > } > > If not then which "environment" from the puppet.conf does it use? > [main]? > > Thanks. > > -eric > > On Dec 9, 8:12 pm, Eric Snow <es...@verio.net> wrote: > > > > > > > > > I get the following error: > > > ... Failed to retrieve current state of resource: Could not retrieve > > information from source(s) ... > > > My understanding is that the file server had trouble pulling the > > metadata for the file (on the server side). This could be due to a > > connectivity issue, or a permissions issue. What other reasons are > > there? Does the target affect it as well? Where in the puppet code > > does all this happen? (for instance that error is coming from type/ > > file/source.rb, so what gets to that code?). > > > I have verified all my permissions (both of files and directories). > > All the connections are fine. However, some of my files work fine and > > others do not. The same files in both cases, every time. > > > The files that work are ones that were done back when I had one > > modules directory in my module_path. However, now I have several. > > The ones that are in modules I have added since I split my modules > > directories are the ones that do not work. The old ones work even > > though I moved them into the new modules directories. > > > This is driving me crazy. Any thoughts? > > > -eric-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Eric Snow
2010-Dec-10 20:50 UTC
[Puppet Users] Re: some files are getting errors during source => "puppet:///..."
So I got past the confusion. Here is what the rest_api.html doc should say (it was missing the underscore) for an example: curl -H "Accept: yaml" https://puppetmaster:8140/production/file_metadata/modules/puppet/puppet.conf As to the problem I am having, I am guessing that I have something configured incorrectly. When I send the request via the REST API, the environment is set correctly to development (for my tests) and the metadata is pulled correctly. However, when I do a puppet run it is using the production environment, where only some of my files live. So if I pass the --environment flag set to development my problem goes away. Why doesn''t it use the environment passed from the node classifier? -eric On Dec 10, 12:36 pm, Eric Snow <es...@verio.net> wrote:> So it looks like that doc is misleading. It would help if there were > a curl example for the API request for files... As it is, it may be > that the environment is factored in after all. Still trying to figure > it out. Any ideas would be great! > > -eric > > On Dec 10, 11:17 am, Eric Snow <es...@verio.net> wrote: > > > > > > > > > I just tried using the REST API to pull the file metadata and noticed > > that the environment is not part of the API for files: > > > http://docs.puppetlabs.com/guides/rest_api.html > > > Does that mean that it will not respect my environments for the > > following: > > > file { ''test'': > > source => ''puppet:///modules/somemodule/test'' > > > } > > > If not then which "environment" from the puppet.conf does it use? > > [main]? > > > Thanks. > > > -eric > > > On Dec 9, 8:12 pm, Eric Snow <es...@verio.net> wrote: > > > > I get the following error: > > > > ... Failed to retrieve current state of resource: Could not retrieve > > > information from source(s) ... > > > > My understanding is that the file server had trouble pulling the > > > metadata for the file (on the server side). This could be due to a > > > connectivity issue, or a permissions issue. What other reasons are > > > there? Does the target affect it as well? Where in the puppet code > > > does all this happen? (for instance that error is coming from type/ > > > file/source.rb, so what gets to that code?). > > > > I have verified all my permissions (both of files and directories). > > > All the connections are fine. However, some of my files work fine and > > > others do not. The same files in both cases, every time. > > > > The files that work are ones that were done back when I had one > > > modules directory in my module_path. However, now I have several. > > > The ones that are in modules I have added since I split my modules > > > directories are the ones that do not work. The old ones work even > > > though I moved them into the new modules directories. > > > > This is driving me crazy. Any thoughts? > > > > -eric-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2010-Dec-11 02:00 UTC
Re: [Puppet Users] Re: some files are getting errors during source => "puppet:///..."
On Fri, Dec 10, 2010 at 12:50 PM, Eric Snow <esnow@verio.net> wrote:> So I got past the confusion. Here is what the rest_api.html doc > should say (it was missing the underscore) for an example: > > curl -H "Accept: yaml" https://puppetmaster:8140/production/file_metadata/modules/puppet/puppet.conf > > As to the problem I am having, I am guessing that I have something > configured incorrectly. When I send the request via the REST API, the > environment is set correctly to development (for my tests) and the > metadata is pulled correctly. However, when I do a puppet run it is > using the production environment, where only some of my files live. > > So if I pass the --environment flag set to development my problem goes > away. Why doesn''t it use the environment passed from the node > classifier?I know this got answered in the other thread, but for the purposes of the archive, the relevant bug is http://projects.puppetlabs.com/issues/3910> > -eric > > On Dec 10, 12:36 pm, Eric Snow <es...@verio.net> wrote: >> So it looks like that doc is misleading. It would help if there were >> a curl example for the API request for files... As it is, it may be >> that the environment is factored in after all. Still trying to figure >> it out. Any ideas would be great! >> >> -eric >> >> On Dec 10, 11:17 am, Eric Snow <es...@verio.net> wrote: >> >> >> >> >> >> >> >> > I just tried using the REST API to pull the file metadata and noticed >> > that the environment is not part of the API for files: >> >> > http://docs.puppetlabs.com/guides/rest_api.html >> >> > Does that mean that it will not respect my environments for the >> > following: >> >> > file { ''test'': >> > source => ''puppet:///modules/somemodule/test'' >> >> > } >> >> > If not then which "environment" from the puppet.conf does it use? >> > [main]? >> >> > Thanks. >> >> > -eric >> >> > On Dec 9, 8:12 pm, Eric Snow <es...@verio.net> wrote: >> >> > > I get the following error: >> >> > > ... Failed to retrieve current state of resource: Could not retrieve >> > > information from source(s) ... >> >> > > My understanding is that the file server had trouble pulling the >> > > metadata for the file (on the server side). This could be due to a >> > > connectivity issue, or a permissions issue. What other reasons are >> > > there? Does the target affect it as well? Where in the puppet code >> > > does all this happen? (for instance that error is coming from type/ >> > > file/source.rb, so what gets to that code?). >> >> > > I have verified all my permissions (both of files and directories). >> > > All the connections are fine. However, some of my files work fine and >> > > others do not. The same files in both cases, every time. >> >> > > The files that work are ones that were done back when I had one >> > > modules directory in my module_path. However, now I have several. >> > > The ones that are in modules I have added since I split my modules >> > > directories are the ones that do not work. The old ones work even >> > > though I moved them into the new modules directories. >> >> > > This is driving me crazy. Any thoughts? >> >> > > -eric > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- Nigel Kersten - Puppet Labs - http://www.puppetlabs.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.