summaryrefslogtreecommitdiffstats
path: root/lib/puppet/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-07 17:48:50 -0600
committerLuke Kanies <luke@madstop.com>2007-11-07 17:48:50 -0600
commit065a1d0281ba326674e37a00d8ced1e3a2dd57e4 (patch)
tree64645147721a20d49d94d354037db8edf7134f4d /lib/puppet/node
parent3f21e93599653e3a6c82ab0a131ce250503a771e (diff)
downloadpuppet-065a1d0281ba326674e37a00d8ced1e3a2dd57e4.tar.gz
puppet-065a1d0281ba326674e37a00d8ced1e3a2dd57e4.tar.xz
puppet-065a1d0281ba326674e37a00d8ced1e3a2dd57e4.zip
Switching the graph base class from GRATR::Digraph
to Puppet::SimpleGraph, which should dramatically enhance performance. It should be largely functionally equivalent, with the only difference being that edges are no longer deduplicated.
Diffstat (limited to 'lib/puppet/node')
-rw-r--r--lib/puppet/node/configuration.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/node/configuration.rb b/lib/puppet/node/configuration.rb
index 1365767b6..e49090d70 100644
--- a/lib/puppet/node/configuration.rb
+++ b/lib/puppet/node/configuration.rb
@@ -83,6 +83,7 @@ class Puppet::Node::Configuration < Puppet::PGraph
transaction.addtimes :config_retrieval => @retrieval_duration
+
begin
transaction.evaluate
rescue Puppet::Error => detail
@@ -304,7 +305,7 @@ class Puppet::Node::Configuration < Puppet::PGraph
# Lastly, add in any autorequires
@relationship_graph.vertices.each do |vertex|
vertex.autorequire.each do |edge|
- unless @relationship_graph.edge?(edge)
+ unless @relationship_graph.edge?(edge.source, edge.target) # don't let automatic relationships conflict with manual ones.
unless @relationship_graph.edge?(edge.target, edge.source)
vertex.debug "Autorequiring %s" % [edge.source]
@relationship_graph.add_edge!(edge)