[Puppet Users] Re: Puppet fails to install package, whilst it's okay to do manually
On Friday, October 11, 2013 5:42:27 AM UTC-5, Sans wrote: > > True! I didn't show that it actually installed from the command line but > it does/did. After a bit digging, I found a rather strange issue - that was > the very first installation just after spinning up the instance and puppet > needed an *apt-get update* first to carry-on with installation, whilst it > was just fine from the CLI, without issuing *update* first. It happened > on a number of nodes in my cluster, so I tested several times. Any further > thought/comments on that? > > I am not sufficiently familiar with details of apt to speculate on what * particular* difference in execution environment might explain the discrepancy, but clearly, if the same command produces different results in different contexts then the differences must arise from the context. Puppet itself is not particularly distinguished from any other program (such as a shell) that launches other programs, except inasmuch as it follows good security practices by ruthlessly limiting the environment variables it provides to such external programs to a very small set of essential ones variables. However, I also observe that it's a good practice to have run apt-get updatebefore managing packages. You could add an Exec that runs it, and make each apt package 'require' it. Also, you should have a look at PuppetLabs's add-in module for apt: https://forge.puppetlabs.com/puppetlabs/apt. John -- 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+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet fails to install package, whilst it's okay to do manually
True! I didn't show that it actually installed from the command line but it does/did. After a bit digging, I found a rather strange issue - that was the very first installation just after spinning up the instance and puppet needed an *apt-get update* first to carry-on with installation, whilst it was just fine from the CLI, without issuing *update* first. It happened on a number of nodes in my cluster, so I tested several times. Any further thought/comments on that? -San On Thursday, October 10, 2013 3:06:40 PM UTC+1, jcbollinger wrote: > > > I don't think you've demonstrated that it does run fine from the command > line. It appears to me that the error reported by Puppet would not > manifest on the command line until after the point where your transcript > cuts off. > > Anyway, if a command succeeds when run from the command line but fails > when executed by Puppet then the usual problem is a difference in execution > environment, typically in the environment variables. Puppet intentionally > provides a very sparse environment to external commands it executes. Your > case is unusual in that the command seems to mostly work. Could it be that > you need a proxy server configured for FTP, but not for HTTP? > > > John > > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Puppet fails to install package, whilst it's okay to do manually
On Thursday, October 10, 2013 4:34:59 AM UTC-5, Sans wrote: > > Dear all, > > I'm seeing this strange thing: When I run "*puppet agent -td*" on the > node (Nagios, in this example case), puppet fails to install Nagios3 (on > Debian) with this: > [...] > But if I run the same command (well, without '-y') on the node, it works > just fine. > > I don't think you've demonstrated that it does run fine from the command line. It appears to me that the error reported by Puppet would not manifest on the command line until after the point where your transcript cuts off. Anyway, if a command succeeds when run from the command line but fails when executed by Puppet then the usual problem is a difference in execution environment, typically in the environment variables. Puppet intentionally provides a very sparse environment to external commands it executes. Your case is unusual in that the command seems to mostly work. Could it be that you need a proxy server configured for FTP, but not for HTTP? John -- 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+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.