apt源的依赖循环

时间:2012-11-26 16:16:25

标签: puppet

我正在尝试在https://github.com/dwerder/puppet-mongodb

安装puppet模块

它的工作要求之一是设置mongodb存储库。由于我正在尝试在Debian上部署它,我尝试使用以下类添加源:

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
  }
}

但是,在尝试安装模块(在测试节点上)时,我得到以下输出:

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

注意:完成的目录在0.06秒内运行

该类包含在https://github.com/dwerder/puppet-mongodb/blob/master/manifests/install.pp

的模块安装类中

我不太清楚为什么会出现这种依赖循环,有什么想法?

1 个答案:

答案 0 :(得分:0)

你最后的改变是什么(可能是你添加周期的那一刻)。

尝试使用建议来生成图表。将生成的点文件作为gist发布,以便我们进一步调查。

看看Debugging cycle or missing dependency

请注意,某些依赖项是显式的(require, - >)或隐式的(资源提供程序通过它自己添加依赖项)...查看点文件应该有所帮助。