6
votes

I'm trying to install the puppet module at https://github.com/dwerder/puppet-mongodb

One of the requirements for it to work is to have the mongodb repository set-up. Since I'm trying to deploy it on Debian I tried using the following class to add the source:

class mongodb::apt::repo {
  include apt

  apt::source { '10gen':
    location   => 'http://downloads-distro.mongodb.org/repo/debian-sysvinit',
    release     => 'dist',
    repos       => '10gen',
    key         => '7F0CEB10',
    key_server  => 'keyserver.ubuntu.com',
    include_src => false
  }
}

However, upon trying to install the module (on a test node) I get the following output:

root@debian:/etc/puppet/modules# puppet agent --test
info: Caching catalog for debian.lan
info: Applying configuration version '1353946258'
err: Could not apply complete catalog: Found 1 dependency cycle:
(Exec[apt_update] => Class[Apt::Update] => Anchor[apt::source::10gen] => Anchor[apt::source::10gen] => Apt::Source[10gen] => Class[Mongodb::Apt::Repo] => Package[mongodb-10gen] => Anchor[mongodb::install::end] => Anchor[mongodb::install::end] => File[10gen.list] => Apt::Source[10gen])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz

notice: Finished catalog run in 0.06 seconds

The class is included in the module's install class at https://github.com/dwerder/puppet-mongodb/blob/master/manifests/install.pp

I'm not quite sure why this dependency cycle happens, any ideas?

1
Did you ever figure this out? I'm having a similar problem. - user879121

1 Answers

0
votes

What was your last change (that's probably the moment you added the cycle).

Try the suggestion to generate the graph. Post the generated dot file as gist so that we can investigate further.

Take a look at Debugging cycle or missing dependency.

Note that some dependencies are explicit (require, ->) or implicit (the resource provider add the dependency by it self)... having a look at the dot file should help.