Mr Pink
2012-Mar-08 15:34 UTC
[Puppet Users] apt-get update running before installing packages - dependency not working
Hi, I''m having some issues with it doing an apt-get update before installing packages. In my Apt modules I have Exec["apt-update"] -> Package <| |> and in the run itself I see debug: /Stage[main]/Apt/Exec[apt-update]/before: requires Package[libmysqlclient-dev] debug: /Stage[main]/Apt/Exec[apt-update]/before: requires Package[mysql-server] but then it does the following without the update debug: Puppet::Type::Package::ProviderApt: Executing ''/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install libmysqlclient-dev=5.1.*'' Not sure if this correct but it definitely doesn''t appear to be doing the update Any help most appreciated, Will -- 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.
jcbollinger
2012-Mar-09 14:28 UTC
[Puppet Users] Re: apt-get update running before installing packages - dependency not working
On Mar 8, 9:34 am, Mr Pink <w...@monterosa.co.uk> wrote:> Hi, > > I''m having some issues with it doing an apt-get update before > installing packages. In my Apt modules I have > > Exec["apt-update"] -> Package <| |> > > and in the run itself I see > > debug: /Stage[main]/Apt/Exec[apt-update]/before: requires > Package[libmysqlclient-dev] > debug: /Stage[main]/Apt/Exec[apt-update]/before: requires > Package[mysql-server] > > but then it does the following without the update > > debug: Puppet::Type::Package::ProviderApt: Executing ''/usr/bin/apt-get > -q -y -o DPkg::Options::=--force-confold --force-yes install > libmysqlclient-dev=5.1.*'' > > Not sure if this correct but it definitely doesn''t appear to be doing > the update > > Any help most appreciated,Check elsewhere in your log for messages about dependency cycles. As I recall, when you have a dependency cycle Puppet will break it in some unspecified manner instead of failing the catalog altogether. In many cases that allows Puppet to still reach the target configuration, albeit in more than one run. You haven''t shown much manifest code, but my bet would be that Exec[''apt-update''] has a relationship on the apt package. The chain you showed would set up the complementary relationship, thus closing a cycle. John -- 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.