【问题标题】:Dependency cycle with apt source带有apt源的依赖循环
【发布时间】:2012-11-14 03:50:23
【问题描述】:

我正在尝试在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

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

【问题讨论】:

  • 你有没有想过这个问题?我也有类似的问题。

标签: puppet


【解决方案1】:

您最后一次更改是什么(可能是您添加循环的那一刻)。

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

看看Debugging cycle or missing dependency

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

【讨论】:

    猜你喜欢
    • 2017-03-09
    • 2016-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-17
    • 1970-01-01
    • 1970-01-01
    • 2019-06-02
    相关资源
    最近更新 更多