我正在尝试在 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
我不太清楚为什么会发生这种依赖循环,有什么想法吗?
最佳答案
您的最后一次更改是什么(这可能是您添加循环的那一刻)。
尝试生成图表的建议。将生成的点文件作为 gist 发布,以便我们进一步调查。
看看Debugging cycle or missing dependency .
请注意,某些依赖项是显式的(需要,->)或隐式的(资源提供者自己添加依赖项)......查看点文件应该会有所帮助。
关于puppet - 带有apt源的依赖循环,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13568748/