Hi, I have a local Puppet installation on which I''ve done: # puppet module install puppetlabs/apt Preparing to install into /etc/puppet/modules ... Downloading from http://forge.puppetlabs.com ... Installing -- do not interrupt ... /etc/puppet/modules └─┬ puppetlabs-apt (v1.1.0) └── puppetlabs-stdlib (v3.2.0) I also have the following nodes.pp which I want to apply: node default { include stdlib class {''apt'': always_apt_update => true, disable_keys => true, stage => ''setup'' } -> apt::source { "cassandra": location => "http://debian.datastax.com/community", release => "stable", repos => "main", key => "B999A372", key_source => "http://debian.datastax.com/debian/repo_key", include_src => false } } When I try to apply it, I get: # puppet apply nodes.pp err: Could not apply complete catalog: Found 1 dependency cycle: (Anchor[apt::key B999A372 present] => Apt::Key[Add key: B999A372 from Apt::Source cassandra] => File[cassandra.list] => Exec[apt_update] => Class[Apt::Update] => Stage[setup] => Stage[main] => Class[Main] => Node[default] => Apt::Source[cassandra] => File[cassandra.list]) Try the ''--graph'' option and opening the resulting ''.dot'' file in OmniGraffle or GraphViz notice: Finished catalog run in 0.12 seconds The problem seems to be in the stage => ''setup'' parameter, but I''d like to understand what''s going on and what can I do to solve this issue (this is just a proof of concept of what''s going on in the larger puppet codebase I''ve inherited). I''m using Puppet 2.7.20. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Mar-14 14:14 UTC
[Puppet Users] Re: Need help with apt::source and stages
On Wednesday, March 13, 2013 8:46:42 AM UTC-5, Cosmin Luță wrote:> > Hi, > > I have a local Puppet installation on which I''ve done: > > # puppet module install puppetlabs/apt > Preparing to install into /etc/puppet/modules ... > Downloading from http://forge.puppetlabs.com ... > Installing -- do not interrupt ... > /etc/puppet/modules > └─┬ puppetlabs-apt (v1.1.0) > └── puppetlabs-stdlib (v3.2.0) > > > I also have the following nodes.pp which I want to apply: > > node default { > include stdlib > > class {''apt'': > always_apt_update => true, > disable_keys => true, > stage => ''setup'' > } > -> > apt::source { "cassandra": > location => "http://debian.datastax.com/community", > release => "stable", > repos => "main", > key => "B999A372", > key_source => "http://debian.datastax.com/debian/repo_key", > include_src => false > } > } > > > When I try to apply it, I get: > > # puppet apply nodes.pp > err: Could not apply complete catalog: Found 1 dependency cycle: > (Anchor[apt::key B999A372 present] => Apt::Key[Add key: B999A372 from Apt::Source cassandra] => File[cassandra.list] => Exec[apt_update] => Class[Apt::Update] => Stage[setup] => Stage[main] => Class[Main] => Node[default] => Apt::Source[cassandra] => File[cassandra.list]) > Try the ''--graph'' option and opening the resulting ''.dot'' file in OmniGraffle or GraphViz > notice: Finished catalog run in 0.12 seconds > > > The problem seems to be in the stage => ''setup'' parameter, but I''d like > to understand what''s going on and what can I do to solve this issue (this > is just a proof of concept of what''s going on in the larger puppet codebase > I''ve inherited). > > I''m using Puppet 2.7.20. >I''d need to see the code of your class "apt" to be sure, but you are probably running into http://projects.puppetlabs.com/issues/8263. If that''s so, then the solution is to either use ordinary relationships instead of run stages, or to update your class(es) to propagate the run stage assigned to them to classes they themselves declare (where it is appropriate to do so). The $stage magic variable can help you do that. 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+unsubscribe@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Cosmin Luță
2013-Mar-15 13:21 UTC
[Puppet Users] Re: Need help with apt::source and stages
The "apt" code I''m using is from https://github.com/puppetlabs/puppetlabs-apt , commit-id e01bbb61b294be1358b147e8de4966d5f4c6efda . I''ve read http://projects.puppetlabs.com/issues/8263 ''s comments, so the anchor pattern should take care of it ? But the apt module I have is using that pattern... As for using regular relationships instead of stages, that''s kinda hard since the manifests I have have been designed to use stages, it would be a big change to make for someone that barely grasps the concepts of puppet :) On Thursday, March 14, 2013 4:14:27 PM UTC+2, jcbollinger wrote:> > > > On Wednesday, March 13, 2013 8:46:42 AM UTC-5, Cosmin Luță wrote: >> >> Hi, >> >> I have a local Puppet installation on which I''ve done: >> >> # puppet module install puppetlabs/apt >> Preparing to install into /etc/puppet/modules ... >> Downloading from http://forge.puppetlabs.com ... >> Installing -- do not interrupt ... >> /etc/puppet/modules >> └─┬ puppetlabs-apt (v1.1.0) >> └── puppetlabs-stdlib (v3.2.0) >> >> >> I also have the following nodes.pp which I want to apply: >> >> node default { >> include stdlib >> >> class {''apt'': >> always_apt_update => true, >> disable_keys => true, >> stage => ''setup'' >> } >> -> >> apt::source { "cassandra": >> location => "http://debian.datastax.com/community", >> release => "stable", >> repos => "main", >> key => "B999A372", >> key_source => "http://debian.datastax.com/debian/repo_key", >> include_src => false >> } >> } >> >> >> When I try to apply it, I get: >> >> # puppet apply nodes.pp >> err: Could not apply complete catalog: Found 1 dependency cycle: >> (Anchor[apt::key B999A372 present] => Apt::Key[Add key: B999A372 from Apt::Source cassandra] => File[cassandra.list] => Exec[apt_update] => Class[Apt::Update] => Stage[setup] => Stage[main] => Class[Main] => Node[default] => Apt::Source[cassandra] => File[cassandra.list]) >> Try the ''--graph'' option and opening the resulting ''.dot'' file in OmniGraffle or GraphViz >> notice: Finished catalog run in 0.12 seconds >> >> >> The problem seems to be in the stage => ''setup'' parameter, but I''d like >> to understand what''s going on and what can I do to solve this issue (this >> is just a proof of concept of what''s going on in the larger puppet codebase >> I''ve inherited). >> >> I''m using Puppet 2.7.20. >> > > > I''d need to see the code of your class "apt" to be sure, but you are > probably running into http://projects.puppetlabs.com/issues/8263. If > that''s so, then the solution is to either use ordinary relationships > instead of run stages, or to update your class(es) to propagate the run > stage assigned to them to classes they themselves declare (where it is > appropriate to do so). The $stage magic variable can help you do that. > > > 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+unsubscribe@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.