ich eine lokale Puppet-Installation haben, auf die ich getan habe:Puppet Problem mit apt :: Quelle und Stufen
# 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)
Ich habe auch die folgenden nodes.pp
, die ich anwenden möchten:
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
}
}
Wenn ich versuche, es anzuwenden, die ich erhalte:
# 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
Das Problem in den stage => 'setup'
Parametern zu legen scheint, aber ich würde gerne verstehen, was los ist und was ich tun kann, um dieses Problem zu lösen (ich habe eine große Codebase geerbt - das obige ist nur ein Beweis des Konzepts - das die stage
Sache verwendet und ich möchte es nicht gerade entfernen , da ich Puppets Inneres nicht sehr gut atm) verstehe.
Update # 1
den apt::source
Schritt zum setup
Bühne, wie dies Versuchte bewegt:
class cassandra {
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
}
}
node default {
include stdlib
class {'apt':
always_apt_update => true,
disable_keys => true,
stage => setup
}
->
class {'cassandra': stage => setup}
}
Dies ist jedoch nicht das Problem lösen, erzeugt nur einen anderen Abhängigkeitszyklus.
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] => Anchor[apt::update] => Class[Apt] => Class[Cassandra] => Apt::Source[cassandra] => File[cassandra.list])
Vollständige Debugausgabe here. Das Abhängigkeitsdiagramm ist
So scheint mir, dass der Versuch, die Reihenfolge der Operationen auf eine "natürliche" Weise (über den ->
-Operator) zu erzwingen, zu diesem merkwürdigen Abhängigkeitszyklus führt.
Was Sie sagen, macht Sinn, also habe ich versucht, die 'apt :: source' auf die 'setup' Bühne zu bringen, aber das hat auch nicht sehr gut funktioniert (siehe die Bearbeitung) – Unknown
Ausgezeichnet mit der Kopfgeld als Antwort erklärte ziemlich viel, was vor sich geht. – Unknown
Aber kein wirklicher Vorschlag für eine Reparatur? –