lib/puppet/transaction.rb
# We need to know if a resource has any failed dependencies before
# we try to process it. We keep track of this by keeping a list on
# each resource of the failed dependencies, and incrementally
# computing it as the union of the failed dependencies of each
# first-order dependency. We have to do this as-we-go instead of
# up-front at failure time because the graph may be mutated as we
# walk it.
We need to know if a resource has any failed dependencies before
we try to process it. We keep track of this by keeping a list on
each resource of the failed dependencies, and incrementally
computing it as the union of the failed dependencies of each
first-order dependency. We have to do this as-we-go instead of
up-front at failure time because the graph may be mutated as we
walk it.
We need to know if a resource has any failed dependencies before we try to process it . We keep track of this by keeping a list on each resource of the failed dependencies and incrementally computing it as the union of the failed dependencies of each first - order dependency . We have to do this as - we - go instead of up - front at failure time because the graph may be mutated as we walk it .
def propagate_failure(resource)
    failed = Set.new
    relationship_graph.direct_dependencies_of(resource).each do |dep|
      if (s = resource_status(dep))
        failed.merge(s.failed_dependencies) if s.dependency_failed?
        if s.failed?
          failed.add(dep)
        end
      end
    end
    resource_status(resource).failed_dependencies = failed.to_a
  end
def propagate_failure ( resource ) failed = Set . new relationship_graph . direct_dependencies_of ( resource ) . each do | dep | if ( s = resource_status ( dep ) ) failed . merge ( s . failed_dependencies ) if s . dependency_failed? if s . failed? failed . add ( dep ) end end end resource_status ( resource ) . failed_dependencies = failed . to_a end
We need to know if a resource has any failed dependencies before
we try to process it.
We need to know if a resource has any failed dependencies before we try to process it .
resource
<not_specific>